-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameAI.h
56 lines (48 loc) · 1.18 KB
/
GameAI.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
#ifndef _GAMEAI_H
#define _GAMEAI_H
#include "pruneEmm.h"
#include "TDLearning.h"
#include "config.h"
#include <string>
class GameAI_PLAYING_EMM{
public:
GameAI_PLAYING_EMM(){
// always called before do something
// initialize all the game settings
GameSetting::init();
initialSeed = 517;
resultFileName = "result_playingTD+EMM.txt";
isDumpResult = true;
for(int i = 0; i < 32; i++) statistic[i] = 0;
}
~GameAI_PLAYING_EMM(){;}
void playGame();
void updateStatistic(board_t b);
void playNGames(int numberOfGames);
void printStatistic();
void findPossibleBestMoves();
void setResultFileName(string s);
void setInitialSeed(unsigned int seed);
void setDumpable(const bool isDump);
private:
EMM emm;
string resultFileName;
unsigned int initialSeed;
bool isDumpResult;
int statistic[32];
};
class GameAI_TDLearning{
public:
GameAI_TDLearning(){
// always called before do something
// initialize all the game settings
GameSetting::init();
}
~GameAI_TDLearning(){;}
void training(int numberOfGames, int selector, const bool isSave);
void getScoresFromTuples(board_t b);
void getScoresOfBoardsFromTuples(board_t* b, int numberOfBoards);
private:
TD t;
};
#endif