Play the move

This commit is contained in:
Mylloon 2023-03-31 12:21:32 +02:00
parent a40a403703
commit cab2f7ed88
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -217,6 +217,13 @@ bt_node_t *bt_t::mcts_selection(bt_node_t *node) {
void bt_t::mcts_expansion(bt_node_t *root) { void bt_t::mcts_expansion(bt_node_t *root) {
update_moves(); update_moves();
// Play the move
if (can_play(root->move)) {
play(root->move);
} else {
fprintf(stderr, "?????");
}
for (int i = 0; i < nb_moves; i++) { for (int i = 0; i < nb_moves; i++) {
// Child // Child
bt_node_t *tmp = new bt_node_t; bt_node_t *tmp = new bt_node_t;