Skip to content

Commit 4ed85d4

Browse files
authored
Add files via upload
1 parent 9c68c41 commit 4ed85d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mcts/search.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ Node* GetBestChild(Node* parent, int kCertaintyProp, Node* root) {
504504
// and the certain draw (twofold, or by backpropagation) if parent v > 0
505505
// Parent != Root: Choose only non loosing moves and if theres a certain win choose that.
506506

507-
std::tuple<int, float, float> best(-1, 0.0, 0.0);
507+
std::tuple<int, float, float> best(-2, 0.0, 0.0);
508508
Node* best_node_certain = nullptr;
509509
float best_v_certain = -100.0f;
510510
for (Node* node : parent->Children()) {
@@ -524,8 +524,8 @@ Node* GetBestChild(Node* parent, int kCertaintyProp, Node* root) {
524524
best_v_certain = node->GetV();
525525
}
526526
}
527-
// If win is certain use that node instead of above criteria
528-
if (kCertaintyProp && node->IsCertain() && (node->GetV() == 1.0f))
527+
// If win is terminal use that node instead of above criteria
528+
if (kCertaintyProp && node->IsTerminal() && (node->GetV() == 1.0f))
529529
{
530530
best_node = node;
531531
best = val;

0 commit comments

Comments
 (0)