-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.h
executable file
·58 lines (41 loc) · 1.12 KB
/
player.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef PLAYER_H
#define PLAYER_H
#include "board.h"
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <iostream>
#include <cmath>
#define pii pair<int,int>
using namespace std;
static clock_t start;
struct move
{
pii start ;
pii end ;
};
class player
{
public:
int id ;
player(int a)
{
id = a ;
}
vector<string> generate_initial_removal(int id ,board& b);
vector<string> generate_simple_moves(int id ,board& b);
vector<string> generate_neighbour(int id ,board& b);
string generate_move(int id , board& b);
vector<string> generate_ring_place(board& b); //generate
string generate_ring_move( board& b) ;
double maxim(int id, board& b, int depth);
double minim(int next_player, board& b, int depth);
void execute_move(int id ,string str,board& b);
double maxnode(int id , board& b , int depth , string& str , double alpha , double beta);
double minnode(int id , board& b , int depth , string& str , double alpha , double beta);
string minimax(int id , board& b , int depth);
//vector<string> truncate(vector<string> inp , int t);
};
void print_board(board& b);
#endif