forked from chncwang/FoolGo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab.cc
More file actions
37 lines (28 loc) · 890 Bytes
/
lab.cc
File metadata and controls
37 lines (28 loc) · 890 Bytes
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
#include <cstdint>
#include <cstdlib>
#include <iostream>
#include "board/zob_hasher.h"
#include "def.h"
#include "game/fresh_game.h"
#include "game/game.h"
#include "util/rand.h"
#include "player/random_player.h"
#include "player/uct_player.h"
using namespace foolgo;
using namespace std;
int main(int argc, const char *argv[]) {
uint32_t seed = GetTimeSeed();
// uint32_t seed = 2479583645;
cout << "seed:" << seed << std::endl;
srand(seed);
ZobHasher<MAIN_BOARD_LEN>::Init(seed);
//Player<MAIN_BOARD_LEN> *black_player = new RandomPlayer<MAIN_BOARD_LEN>(seed);
Player<MAIN_BOARD_LEN> *black_player =
new UctPlayer<MAIN_BOARD_LEN>(seed, 1000, 1);
Player<MAIN_BOARD_LEN> *white_player =
new UctPlayer<MAIN_BOARD_LEN>(seed, 1000, 1);
auto game =
FreshGame<MAIN_BOARD_LEN>::BuildFreshGame(black_player, white_player);
game->Run();
return 0;
}