Add primitive MCTS search.

This commit is contained in:
Tomasz Sobczyk
2021-05-26 13:43:20 +02:00
committed by Stéphane Nicolet
parent a44b1115c4
commit 9094255f50
4 changed files with 862 additions and 0 deletions
+11
View File
@@ -27,6 +27,7 @@
#include <ostream>
#include <string>
#include <vector>
#include <iostream>
#include <cstdint>
#include <cmath>
@@ -52,6 +53,16 @@ void dbg_hit_on(bool c, bool b);
void dbg_mean_of(int v);
void dbg_print();
#if defined(NDEBUG)
template <typename... Ts>
void debug_print(const Ts&...) {}
#else
template <typename... Ts>
void debug_print(const Ts&... v) {
((std::cerr << v), ...);
}
#endif
typedef std::chrono::milliseconds::rep TimePoint; // A value in milliseconds
static_assert(sizeof(TimePoint) == sizeof(int64_t), "TimePoint should be 64 bits");
inline TimePoint now() {