#include <ow_aisearch_scout.h>
Public Member Functions | |
ow_aisearch_scout (ow_board *owboard) | |
int | search (ow_move prinvar[], ow_board *board, int boardside, int depth) |
~ow_aisearch_scout () | |
Private Member Functions | |
int | _scout (ow_move_eval prinvar[], ow_board *board, int boardside, int depth, int *nodecount) |
int | _test (ow_board *board, int boardside, int depth, int score) |
int | _test_rand (ow_board *board, int boardside, int depth, int score) |
ow_aisearch_scout::ow_aisearch_scout | ( | ow_board * | owboard | ) |
Creates a new ow_aisearch_scout object width default values.
owboard | Pointer to the board used during the game, where to look for moves. |
ow_aisearch_scout::~ow_aisearch_scout | ( | ) |
Deletes the ow_aisearch_scout object
int ow_aisearch_scout::_scout | ( | ow_move_eval | prinvar[], | |
ow_board * | board, | |||
int | boardside, | |||
int | depth, | |||
int * | nodecount | |||
) | [private] |
Scout search algoritm
prinvar | Principal variation found during the IA search. | |
board | Pointer to the board. | |
boardside | Side of the board where to look for best move. | |
depth | Depth of the search algoritm | |
nodecount | Nodes (positions) analyzed during AI search. |
int ow_aisearch_scout::_test | ( | ow_board * | board, | |
int | boardside, | |||
int | depth, | |||
int | score | |||
) | [private] |
Test() auxiliar probe for scout search algoritm
board | Pointer to the board. | |
boardside | Side of the board where to look for best move. | |
depth | Depth of the search algoritm | |
score | Score achieved during the probe incursion. |
int ow_aisearch_scout::_test_rand | ( | ow_board * | board, | |
int | boardside, | |||
int | depth, | |||
int | score | |||
) | [private] |
Test() auxiliar probe for scout search algoritm Random version. When nodes get the same probe eval, it selects one of them randomly.
board | Pointer to the board. | |
boardside | Side of the board where to look for best move. | |
depth | Depth of the search algoritm | |
score | Score achieved during the probe incursion. |
int ow_aisearch_scout::search | ( | ow_move | prinvar[], | |
ow_board * | board, | |||
int | boardside, | |||
int | depth | |||
) | [virtual] |
Abstract method to the search algoritm (scout)
prinvar | Principal variation found during the IA search. | |
board | Pointer to the board. | |
boardside | Side of the board where to look for best move. | |
depth | Depth of the search algoritm |
Reimplemented from ow_aisearch.