From 48c0bad191988f87b21b02db0f52372768f09b85 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 29 Mar 2023 20:20:38 +0200 Subject: [PATCH] fixes --- TP2/src/mybt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TP2/src/mybt.cpp b/TP2/src/mybt.cpp index c1168bf..692e56a 100644 --- a/TP2/src/mybt.cpp +++ b/TP2/src/mybt.cpp @@ -228,14 +228,14 @@ void bt_t::mcts_expansion(bt_node_t *root) { // Add child to root root->children.push_back(tmp); } + + // Avoid re-add same moves + nb_moves = 0; } bool bt_t::mcts_simulation(bt_node_t *node) { int me = (turn % 2 == 0) ? WHITE : BLACK; - // try to play my move - play(node->move); - // then play randomly 'til the game is over while (endgame() != EMPTY) { play(get_rand_move());