#include <ow_aisearch.h>
Public Member Functions | |
ow_aisearch (ow_board *owboard) | |
virtual int | search (ow_move prinvar[], ow_board *board, int boardside, int depth) |
void | setevalfunc (int idfunct) |
virtual | ~ow_aisearch () |
Protected Attributes | |
ow_board * | owboard |
int(* | evalfunct )(ow_board *owboard, int boardside) |
ow_aisearch::ow_aisearch | ( | ow_board * | owboard | ) |
Creates a new ow_aisearch object width default values.
owboard | Pointer to the board used during the game, where to look for moves. |
ow_aisearch::~ow_aisearch | ( | ) | [virtual] |
Deletes the ow_aisearch object
int ow_aisearch::search | ( | ow_move | prinvar[], | |
ow_board * | board, | |||
int | boardside, | |||
int | depth | |||
) | [virtual] |
Virtual method implemented by derived clases. Starts or continues a search for the best position to move in that boardside.
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 in ow_aisearch_alphabeta, ow_aisearch_negamax, ow_aisearch_scout, and ow_aisearch_simple.
void ow_aisearch::setevalfunc | ( | int | idfunct | ) |
Sets the evaluation function to be used by the aisearch algoritm.
idfunct | Selected function id (AI_RANDOM_FUNC) |