ow_aisearch_alphabeta Class Reference

#include <ow_aisearch_alphabeta.h>

Inheritance diagram for ow_aisearch_alphabeta:

ow_aisearch

List of all members.

Public Member Functions

 ow_aisearch_alphabeta (ow_board *owboard)
int search (ow_move prinvar[], ow_board *board, int boardside, int depth)
 ~ow_aisearch_alphabeta ()

Private Member Functions

int _alphabeta (ow_move prinvar[], ow_board *board, int boardside, int depth, int alpha, int beta, int *nodecount)
int _alphabeta_rand (ow_move prinvar[], ow_board *board, int boardside, int depth, int alpha, int beta, int *nodecount)


Detailed Description

Author:
David Torres <aiken669@gmail.com>

Constructor & Destructor Documentation

ow_aisearch_alphabeta::ow_aisearch_alphabeta ( ow_board owboard  ) 

Creates a new ow_aisearch_alphabeta object width default values.

Parameters:
owboard Pointer to the board used during the game, where to look for moves.
Returns:
New ow_aisearch_alphabeta object.

ow_aisearch_alphabeta::~ow_aisearch_alphabeta (  ) 

Deletes the ow_aisearch_alphabeta object


Member Function Documentation

int ow_aisearch_alphabeta::_alphabeta ( ow_move  prinvar[],
ow_board board,
int  boardside,
int  depth,
int  alpha,
int  beta,
int *  nodecount 
) [private]

AlphaBeta search algoritm

Parameters:
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.
Returns:
-1 if not found yet, >=0 if best move found, also it is the max eval value.

int ow_aisearch_alphabeta::_alphabeta_rand ( ow_move  prinvar[],
ow_board board,
int  boardside,
int  depth,
int  alpha,
int  beta,
int *  nodecount 
) [private]

AlphaBeta search algoritm (random version) If two nodes have the same evaluation it chooses one randomly.

Parameters:
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.
Returns:
-1 if not found yet, >=0 if best move found, also it is the max eval value.

int ow_aisearch_alphabeta::search ( ow_move  prinvar[],
ow_board board,
int  boardside,
int  depth 
) [virtual]

Abstract method to the search algoritm (alphabeta)

Parameters:
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
Returns:
-1 if not found yet, >=0 if best move found, also it is the max eval value.

Reimplemented from ow_aisearch.


The documentation for this class was generated from the following files:
Generated on Sun Jun 22 13:45:47 2008 for Omweso by  doxygen 1.5.3