-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
42 lines (37 loc) · 1.12 KB
/
main.cpp
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
#include <iostream>
#include <sstream>
#include <chrono>
#include <string>
#include <vector>
#include <iomanip>
#include <map>
#include <algorithm>
#include <random>
#include <chrono> // for random
#include <thread>
#include <utility>
#include "cantstop.h"
#include "dicey.h"
#include "ai.h"
#include "play.h"
#include "monte.h"
using namespace std;
namespace rng {
rng::Dice dice;
}
int main() {
vector<unique_ptr<cs_ai::AI>> plys;
//plys.push_back(make_unique<cs_ai::AImonte>(500));
plys.push_back(make_unique<cs_ai::AIplayer>("Vivi"));
//plys.push_back(make_unique<cs_ai::AImonteUCT>(100000, 1.2));
plys.push_back(make_unique<cs_ai::AIcantstop>());
plys.push_back(make_unique<cs_ai::AIcantstop>());
plys.push_back(make_unique<cs_ai::AIcantstop>());
int n = 1;
chrono::steady_clock::time_point begin = chrono::steady_clock::now();
joli scores = few_games(plys, n);
chrono::steady_clock::time_point end = chrono::steady_clock::now();
cout << (float)scores[0]/(float)n*100 << " % winrate of player 0" << endl;
cout << "In " << (float)chrono::duration_cast<chrono::microseconds>(end - begin).count()/1E6 << "s" << endl;
return 0;
}