This commit is contained in:
Mylloon 2023-03-29 16:48:15 +02:00
parent bcebf52552
commit d3bfc7d913
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -203,17 +203,24 @@ bt_move_t bt_t::get_mcts_move(double max_time) {
tree->nb_simulation = 0; tree->nb_simulation = 0;
tree->wins = 0; tree->wins = 0;
// Copy board
bt_t b_copy = *this;
// MCTS // MCTS
auto now = std::chrono::steady_clock::now(); auto now = std::chrono::steady_clock::now();
std::chrono::duration<double> elapsed{}; std::chrono::duration<double> elapsed{};
while (elapsed.count() < max_time) { while (elapsed.count() < max_time) {
// Selection // Selection
std::cerr << "selection\n";
// Expansion // Expansion
std::cerr << "expansion\n";
// Simulation // Simulation
std::cerr << "simulation\n";
// Update // Update
std::cerr << "update\n";
// Time constraint // Time constraint
elapsed = std::chrono::steady_clock::now() - now; elapsed = std::chrono::steady_clock::now() - now;