This commit is contained in:
Mylloon 2023-03-29 20:20:38 +02:00
parent ec89afcb7e
commit 48c0bad191
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

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