From 4ed85d416431e8325c0af7ed53c23161d8812ea9 Mon Sep 17 00:00:00 2001 From: Videodr0me <22127864+Videodr0me@users.noreply.github.com> Date: Fri, 20 Jul 2018 10:37:10 +0200 Subject: [PATCH] Add files via upload --- src/mcts/search.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mcts/search.cc b/src/mcts/search.cc index 2700313..3bb6a3b 100644 --- a/src/mcts/search.cc +++ b/src/mcts/search.cc @@ -504,7 +504,7 @@ Node* GetBestChild(Node* parent, int kCertaintyProp, Node* root) { // and the certain draw (twofold, or by backpropagation) if parent v > 0 // Parent != Root: Choose only non loosing moves and if theres a certain win choose that. - std::tuple<int, float, float> best(-1, 0.0, 0.0); + std::tuple<int, float, float> best(-2, 0.0, 0.0); Node* best_node_certain = nullptr; float best_v_certain = -100.0f; for (Node* node : parent->Children()) { @@ -524,8 +524,8 @@ Node* GetBestChild(Node* parent, int kCertaintyProp, Node* root) { best_v_certain = node->GetV(); } } - // If win is certain use that node instead of above criteria - if (kCertaintyProp && node->IsCertain() && (node->GetV() == 1.0f)) + // If win is terminal use that node instead of above criteria + if (kCertaintyProp && node->IsTerminal() && (node->GetV() == 1.0f)) { best_node = node; best = val;