diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -8,6 +8,14 @@ using namespace std; +#ifndef AI_CHOICE +#define AI_CHOICE MC +#endif + +#define STR_(x) #x +#define STR(x) STR_(x) +#define AI_CHOICE_STR STR(AI_CHOICE) + static void skipLine(istream &stream) { while (stream.get() != '\n'); @@ -15,7 +23,7 @@ static void skipLine(istream &stream) { static Move findMove(const Board &bd, int player) { clock_t start = clock(); - Move mv = AI::MC::findMove(bd, player); + Move mv = AI:: AI_CHOICE ::findMove(bd, player); clock_t diff = clock() - start; cerr << "Time taken: " << (double)diff / CLOCKS_PER_SEC << " seconds" << endl; return mv; @@ -26,6 +34,8 @@ int main() { gettimeofday(&tv, nullptr); srand(tv.tv_sec * 1000000UL + tv.tv_usec); + cerr << "Using AI: " << AI_CHOICE_STR << endl; + Board bd = Board::makeInitial(); // cerr << bd << endl; |