-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathengine_ai.h
More file actions
55 lines (40 loc) · 1.11 KB
/
Copy pathengine_ai.h
File metadata and controls
55 lines (40 loc) · 1.11 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef _ENGINE_AI_H
#define _ENGINE_AI_H
#include "board.h"
#include <cstdio>
#define AI_EASY 1
#define AI_MEDIUM 2
#define AI_HARD 3
#define AI_OPENING 10
#define AI_MIDDLE_GAME 11
#define AI_END_GAME 12
class EngineAI:public Board
{
private:
int minimize(int depth, int max_depth, int alpha, int beta, int extra);
int maximize(int depth, int max_depth,int alpha, int beta, int extra);
moves minimax_base(int depth,int alpha=-100000000, int beta=100000000);
int CountPossibleMoves(bool);
int EvaluateOpening();
int EvaluateMiddleGame();
int EvaluateEndGame();
int EvaluateFunction();
float quies_factor;
bool castled1;
bool castled2;
int pieces_lost1[7];
int pieces_lost2[7];
int level;
int stage;
int total_moves;
int quies_extra_max;
int max_d;
moves best_move;
bool modified;
static long unsigned int __stdcall AIThread(void *input);
public:
EngineAI(Board board):Board(board){ castled1 = false; castled2 = false; modified = false;}
moves GetBestMove(int level = AI_EASY);
void PrintInfo();
};
#endif //_ENGINE_AI_H