Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoUctSearchUtil Namespace Reference


Detailed Description

Utility functions for users of GoUctSearch.


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.


Function Documentation

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.

Parameters:
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())
Returns:
The second best move, if the above applies and such a move exists.

Definition at line 281 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().


17 Jun 2010 Doxygen 1.4.7