Utility functions for users of GoUctSearch. More...
Functions | |
SgPoint | TrompTaylorPassCheck (SgPoint move, const GoUctSearch &search) |
Checks if move is a bad pass move, if Tromp-Taylor rules are used, and tries to fix it. |
Utility functions for users of GoUctSearch.
SgPoint GoUctSearchUtil::TrompTaylorPassCheck | ( | SgPoint | move, | |
const GoUctSearch & | search | |||
) |
Checks if move is a bad pass move, if Tromp-Taylor rules are used, and tries to fix it.
The rationale for this function is, that a UCT search sometimes plays an early pass move, which allows the opponent to end the game by also playing pass, and might lose the game, because all stones on the board are considered alive under Tromp-Taylor rules. This happens mostly if the UCT search uses RAVE or prior knowledge and the pass move by the opponent will not be explored for a while. Fortunately, this can be fixed after the search: if the Tromp-Taylor score of the current position is worse than the value of the root node of the search, then we extract the second best move from the search tree.
move | The move returned by the search | |
search | The search, containing the tree with the last search and other needed information (like board, rules, SgUctSearch::ToPlay(), SgUctSearch::UseCount()) |
Definition at line 289 of file GoUctSearch.cpp.
References GoUctSearch::Board(), GoRules::CaptureDead(), SgUctSearch::FindBestChild(), GoBoard::GetLastMove(), GoRules::Komi(), SgUctNode::Mean(), SgUctNode::Move(), SgUctTree::Root(), GoBoard::Rules(), SG_BLACK, SG_PASS, SgDebug(), GoKomi::ToFloat(), GoUctSearch::ToPlay(), SgUctSearch::Tree(), and GoBoardUtil::TrompTaylorScore().
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch().