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());