-
Notifications
You must be signed in to change notification settings - Fork 7
/
ai.h
33 lines (26 loc) · 812 Bytes
/
ai.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _AI_H_
#define _AI_H_
#include "CBoard.h"
#include "CMoveList.h"
#include "CHashTable.h"
#include "CTime.h"
class AI
{
public:
AI(CBoard& board) : m_board(board), m_nodes(), m_hashTable(), m_hashEntry(),
m_moveList(), m_timeEnd(), m_pvSearch(), m_killerMove()
{m_moveList.clear();}
CMove find_best_move(int wTime = 0, int bTime = 0, int movesToGo = 0);
private:
int search(int alpha, int beta, int level, CMoveList& pv);
int quiescence(int alpha, int beta, CMoveList& pv);
CBoard& m_board;
unsigned long m_nodes;
CHashTable m_hashTable;
CHashEntry m_hashEntry;
CMoveList m_moveList;
CTime m_timeEnd;
bool m_pvSearch;
CMove m_killerMove;
}; // end of class AI
#endif // _AI_H_