Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Videodr0me authored Jul 20, 2018
1 parent 9c68c41 commit 4ed85d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mcts/search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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;
Expand Down

0 comments on commit 4ed85d4

Please sign in to comment.