diff --git a/src/UCTNode.cpp b/src/UCTNode.cpp index c11ef4fd7..29d839121 100644 --- a/src/UCTNode.cpp +++ b/src/UCTNode.cpp @@ -418,9 +418,9 @@ UCTNode::node_ptr_t UCTNode::find_new_root(const int move) { } } } - // Should never fail to find the child. - assert(false); - return nullptr; + // Can happen for example if we resigned. Return a clean + // root for the next game or position. + return std::make_unique(FastBoard::PASS, 0.0f, 0.5f); } // Use this version if the child could be anywhere.