📄 searchagent.h
字号:
/****************************************************
Author: S. Senthil kumar
Class Name: Search Agent
Purpose: The Game Engine. Selects best move
******************************************************/
class SearchAgent
{
int actualcolor; //Which side should the best move be found
int actualdepth; //What is the depth to be searched
int maxval; //Max value to search
int minval; //Min value to search
OneMove currentmove; //Stores the current move being analysed.
OneMove player_bestmove; //Stores the best move found
//OneMove opponent_bestmove;
public:
int tempboard[8][8]; //Temporary board
int checkmate; //Whether checkmate occurred during search
int RetVal; //The Value returned by the Search routine
int checking_for_mate; //Boolean variable to indicate whether call is from CheckForCheckMate()
//CString GetBoardArray(int board[8][8]);
SearchAgent(int color,int board[8][8],int depth,int alpha,int beta,int chformate=0);//Constructor
int RealSearch(int currentcolor,int cboard[8][8],int depth,int alpha,int beta); //The Real Game Engine. Recursively called depth times and then moves up to find the best move
void ApplyMove(int currentboard[8][8],OneMove *temp); //To move the piece in the board
OneMove getBestMove(); //Returns best move
int eval(int currentboard[8][8],int color); //Evaluation function that evaluates the current board position.
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -