Player using UCT. More...
#include <GoUctPlayer.h>
Classes | |
struct | Statistics |
Statistics collected by GoUctPlayer. More... | |
Public Member Functions | |
GoUctPlayer (const GoBoard &bd) | |
Constructor. | |
~GoUctPlayer () | |
SEARCH & | GlobalSearch () |
const SEARCH & | GlobalSearch () const |
GoUctRootFilter & | RootFilter () |
Return the current root filter. | |
void | SetRootFilter (GoUctRootFilter *filter) |
Set a new root filter. | |
void | SetMpiSynchronizer (const SgMpiSynchronizerHandle &synchronizerHandle) |
SgMpiSynchronizerHandle | GetMpiSynchronizer () |
GoBoard & | Board () |
const GoBoard & | Board () const |
virtual SgPoint | GenMove (const SgTimeRecord &time, SgBlackWhite toPlay)=0 |
virtual std::string | Name () const |
SgNode * | CurrentNode () const |
void | ClearSearchTraces () |
SgNode * | TransferSearchTraces () |
virtual int | MoveValue (SgPoint p) |
virtual void | OnGameFinished () |
virtual void | OnNewGame () |
virtual void | Ponder () |
int | Variant () const |
void | SetVariant (int variant) |
void | SetSubscriber (GoBoard &subscriber) |
void | UpdateSubscriber () |
virtual GoUctSearch & | Search ()=0 |
virtual const GoUctSearch & | Search () const =0 |
Virtual functions of GoBoardSynchronizer | |
void | OnBoardChange () |
Virtual functions of GoPlayer | |
SgPoint | GenMove (const SgTimeRecord &time, SgBlackWhite toPlay) |
std::string | Name () const |
void | Ponder () |
Virtual functions of SgObjectWithDefaultTimeControl | |
SgDefaultTimeControl & | TimeControl () |
const SgDefaultTimeControl & | TimeControl () const |
const Statistics & | GetStatistics () const |
void | ClearStatistics () |
Virtual functions of GoUctObjectWithSearch | |
GoUctSearch & | Search () |
const GoUctSearch & | Search () const |
Parameters | |
bool | AutoParam () const |
Automatically adapt the search parameters optimized for the current board size. | |
void | SetAutoParam (bool enable) |
See AutoParam(). | |
bool | EarlyPass () const |
Pass early. | |
void | SetEarlyPass (bool enable) |
See EarlyPass(). | |
bool | ForcedOpeningMoves () const |
Enforce opening moves in the corner on large boards. | |
void | SetForcedOpeningMoves (bool enable) |
See ForcedOpeningMoves(). | |
bool | IgnoreClock () const |
Ignore time settings of the game. | |
void | SetIgnoreClock (bool enable) |
See IgnoreClock(). | |
SgUctValue | MaxGames () const |
Limit on number of simulated games per move. | |
void | SetMaxGames (SgUctValue maxGames) |
See MaxGames(). | |
bool | EnablePonder () const |
Think during the opponents time. | |
void | SetEnablePonder (bool enable) |
See EnablePonder(). | |
double | MaxPonderTime () const |
Maximum ponder time in seconds. | |
void | SetMaxPonderTime (double seconds) |
See MaxPonderTime(). | |
SgUctValue | ResignMinGames () const |
Minimum number of simulations to check for resign. | |
void | SetResignMinGames (SgUctValue n) |
See ResignMinGames(). | |
bool | UseRootFilter () const |
Use the root filter. | |
void | SetUseRootFilter (bool enable) |
See UseRootFilter(). | |
bool | ReuseSubtree () const |
Reuse subtree from last search. | |
void | SetReuseSubtree (bool enable) |
See ReuseSubtree(). | |
SgUctValue | ResignThreshold () const |
Threshold for position value to resign. | |
void | SetResignThreshold (SgUctValue threshold) |
See ResignThreshold(). | |
GoUctGlobalSearchMode | SearchMode () const |
See GoUctGlobalSearchMode. | |
void | SetSearchMode (GoUctGlobalSearchMode mode) |
See GoUctGlobalSearchMode. | |
bool | WriteDebugOutput () const |
Print output of GoUctSearch. | |
void | SetWriteDebugOutput (bool flag) |
See WriteDebugOutput(). | |
Public Attributes | |
GoUctPlayoutPolicyParam | m_playoutPolicyParam |
Protected Member Functions | |
virtual void | OnBoardChange () |
virtual void | PrePlay (GoPlayerMove move) |
virtual void | OnPlay (GoPlayerMove move) |
virtual void | PreUndo () |
virtual void | OnUndo () |
Protected Attributes | |
SgNode * | m_currentNode |
Private Member Functions | |
SgMove | GenMovePlayoutPolicy (SgBlackWhite toPlay) |
bool | DoEarlyPassSearch (SgUctValue maxGames, double maxTime, SgPoint &move) |
Perform a search after playing a pass and see if it is still a win and all points are safe as determined by territory statistics. | |
SgPoint | DoSearch (SgBlackWhite toPlay, double maxTime, bool isDuringPondering) |
Run the search for a given color. | |
void | FindInitTree (SgUctTree &initTree, SgBlackWhite toPlay, double maxTime) |
Find initial tree for search, if subtree reusing is enabled. | |
void | SetDefaultParameters (int boardSize) |
bool | VerifyNeutralMove (SgUctValue maxGames, double maxTime, SgPoint move) |
Verify that the move selected by DoEarlyPassSearch is viable. | |
Private Attributes | |
GoUctGlobalSearchMode | m_searchMode |
See GoUctGlobalSearchMode. | |
bool | m_autoParam |
See AutoParam(). | |
bool | m_forcedOpeningMoves |
See ForcedOpeningMoves(). | |
bool | m_ignoreClock |
See IgnoreClock(). | |
bool | m_enablePonder |
See EnablePonder(). | |
bool | m_useRootFilter |
See UseRootFilter(). | |
bool | m_reuseSubtree |
See ReuseSubtree(). | |
bool | m_earlyPass |
See EarlyPass(). | |
SgUctValue | m_resignThreshold |
See ResignThreshold(). | |
int | m_lastBoardSize |
Used in OnBoardChange(). | |
SgUctValue | m_maxGames |
SgUctValue | m_resignMinGames |
double | m_maxPonderTime |
SEARCH | m_search |
GoTimeControl | m_timeControl |
Statistics | m_statistics |
boost::scoped_ptr < GoUctRootFilter > | m_rootFilter |
boost::scoped_ptr < GoUctPlayoutPolicy< GoBoard > > | m_playoutPolicy |
Playout policy used if search mode is GOUCT_SEARCHMODE_PLAYOUTPOLICY. | |
SgMpiSynchronizerHandle | m_mpiSynchronizer |
bool | m_writeDebugOutput |
Player using UCT.
Definition at line 53 of file GoUctPlayer.h.
GoUctPlayer< SEARCH, THREAD >::GoUctPlayer | ( | const GoBoard & | bd | ) |
Constructor.
bd | The board. |
Definition at line 540 of file GoUctPlayer.h.
References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, GoUctPlayer< SEARCH, THREAD >::m_search, and GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters().
GoUctPlayer< SEARCH, THREAD >::~GoUctPlayer | ( | ) |
Definition at line 569 of file GoUctPlayer.h.
bool GoUctPlayer< SEARCH, THREAD >::AutoParam | ( | ) | const |
Automatically adapt the search parameters optimized for the current board size.
If on, GoUctGlobalSearch::SetDefaultParameters will automatically be called, if the board size changes.
Definition at line 323 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_autoParam.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::ClearStatistics | ( | ) |
Definition at line 574 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::Statistics::Clear(), and GoUctPlayer< SEARCH, THREAD >::m_statistics.
bool GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch | ( | SgUctValue | maxGames, | |
double | maxTime, | |||
SgPoint & | move | |||
) | [private] |
Perform a search after playing a pass and see if it is still a win and all points are safe as determined by territory statistics.
maxGames | Maximum simulations for the search | |
maxTime | Maximum time for the search | |
[out] | move | The move to play (pass or a neutral point to fill) |
true
, if it is still a win and everything is safe after a pass Definition at line 586 of file GoUctPlayer.h.
References GoPlayer::Board(), GoBoard::IsBorder(), GoBoard::IsLegal(), GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_search, GoBoard::Play(), GoBoardUtil::SelfAtari(), SG_PASS, SgDebug(), GoBoard::ToPlay(), GoBoardUtil::TrompTaylorPassWins(), GoBoard::Undo(), and GoUctPlayer< SEARCH, THREAD >::VerifyNeutralMove().
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch().
SgPoint GoUctPlayer< SEARCH, THREAD >::DoSearch | ( | SgBlackWhite | toPlay, | |
double | maxTime, | |||
bool | isDuringPondering | |||
) | [private] |
Run the search for a given color.
toPlay | ||
maxTime | ||
isDuringPondering | Hint that search is done during pondering (this handles the decision to discard an aborted FindInitTree differently) |
isDuringPondering
, no search was performed, because DoSearch() was aborted during FindInitTree()). Definition at line 707 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch(), GoUctPlayer< SEARCH, THREAD >::FindInitTree(), SgTimer::GetTime(), GoUctPlayer< SEARCH, THREAD >::m_earlyPass, GoUctPlayer< SEARCH, THREAD >::m_maxGames, SgUctEarlyAbortParam::m_minGames, GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, SgUctEarlyAbortParam::m_reductionFactor, GoUctPlayer< SEARCH, THREAD >::m_resignMinGames, GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree, GoUctPlayer< SEARCH, THREAD >::m_rootFilter, GoUctPlayer< SEARCH, THREAD >::m_search, SgUctEarlyAbortParam::m_threshold, GoUctPlayer< SEARCH, THREAD >::m_useRootFilter, GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput, SG_NULLMOVE, SG_PASS, SG_RESIGN, SgDebug(), SgUserAbort(), and GoUctSearchUtil::TrompTaylorPassCheck().
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), and GoUctPlayer< SEARCH, THREAD >::Ponder().
bool GoUctPlayer< SEARCH, THREAD >::EarlyPass | ( | ) | const |
Pass early.
Aborts search early, if value is above 1 - ResignThreshold(), and performs a second search to see, if it is still a win and all points are safe (using territory statistics) after playing a pass. If this is true, it plays a pass.
Definition at line 342 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_earlyPass.
Referenced by GoUctCommands::CmdParamPlayer().
bool GoUctPlayer< SEARCH, THREAD >::EnablePonder | ( | ) | const |
Think during the opponents time.
For enabling pondering, ReuseSubtree() also has to be true. Pondering search will be terminated after MaxGames() or MaxPonderTime().
Definition at line 348 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_enablePonder.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::FindInitTree | ( | SgUctTree & | initTree, | |
SgBlackWhite | toPlay, | |||
double | maxTime | |||
) | [private] |
Find initial tree for search, if subtree reusing is enabled.
Goes back in the tree until the node is found, the search tree is valid for and checks if the path of nodes corresponds to an alternating sequence of moves starting with the color to play of the search tree.
Definition at line 808 of file GoUctPlayer.h.
References SgStatisticsExt< VALUE, COUNT >::Add(), GoPlayer::Board(), SgUctTree::Clear(), SgUctTreeUtil::ExtractSubtree(), SgUctNode::HasChildren(), GoBoardHistory::IsAlternatePlayFollowUpOf(), GoBoard::IsLegal(), GoUctPlayer< SEARCH, THREAD >::Statistics::m_reuse, GoUctPlayer< SEARCH, THREAD >::m_search, GoUctPlayer< SEARCH, THREAD >::m_statistics, SgUctTree::NuNodes(), SgUctTree::Root(), GoBoardHistory::SetFromBoard(), GoBoard::SetToPlay(), SG_ASSERT, SgDebug(), and SgWarning().
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch().
bool GoUctPlayer< SEARCH, THREAD >::ForcedOpeningMoves | ( | ) | const |
Enforce opening moves in the corner on large boards.
See GoUctUtil::GenForcedOpeningMove. Default is true.
Definition at line 354 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves.
Referenced by GoUctCommands::CmdParamPlayer().
SgPoint GoUctPlayer< SEARCH, THREAD >::GenMove | ( | const SgTimeRecord & | time, | |
SgBlackWhite | toPlay | |||
) |
Definition at line 858 of file GoUctPlayer.h.
References SgStatisticsExt< VALUE, COUNT >::Add(), GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctUtil::GenForcedOpeningMove(), GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy(), GOUCT_SEARCHMODE_ONEPLY, GOUCT_SEARCHMODE_PLAYOUTPOLICY, GOUCT_SEARCHMODE_UCT, GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves, GoUctPlayer< SEARCH, THREAD >::Statistics::m_gamesPerSecond, GoUctPlayer< SEARCH, THREAD >::m_ignoreClock, GoUctPlayer< SEARCH, THREAD >::m_maxGames, GoUctPlayer< SEARCH, THREAD >::Statistics::m_nuGenMove, GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_search, GoUctPlayer< SEARCH, THREAD >::m_searchMode, GoUctPlayer< SEARCH, THREAD >::m_statistics, GoUctPlayer< SEARCH, THREAD >::m_timeControl, GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput, SG_ASSERT, SG_NULLMOVE, SG_PASS, SG_RESIGN, SgDebug(), SgDefaultTimeControl::TimeForCurrentMove(), and GoBoardUtil::TrompTaylorPassWins().
SgMove GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy | ( | SgBlackWhite | toPlay | ) | [private] |
Definition at line 911 of file GoUctPlayer.h.
References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::m_playoutPolicy, GoUctPlayer< SEARCH, THREAD >::m_playoutPolicyParam, GoBoard::SetToPlay(), SG_NULLMOVE, SG_PASS, and SgDebug().
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove().
SgMpiSynchronizerHandle GoUctPlayer< SEARCH, THREAD >::GetMpiSynchronizer | ( | ) |
Definition at line 496 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer.
const GoUctPlayer< SEARCH, THREAD >::Statistics & GoUctPlayer< SEARCH, THREAD >::GetStatistics | ( | ) | const |
Definition at line 933 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_statistics.
SEARCH & GoUctPlayer< SEARCH, THREAD >::GlobalSearch | ( | ) |
Definition at line 330 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_search.
const SEARCH & GoUctPlayer< SEARCH, THREAD >::GlobalSearch | ( | ) | const |
Definition at line 336 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_search.
bool GoUctPlayer< SEARCH, THREAD >::IgnoreClock | ( | ) | const |
Ignore time settings of the game.
Ignore time record given to GenMove() and only obeys maximum number of games and maximum time. Default is true.
Definition at line 360 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_ignoreClock.
Referenced by GoUctCommands::CmdParamPlayer().
SgUctValue GoUctPlayer< SEARCH, THREAD >::MaxGames | ( | ) | const |
Limit on number of simulated games per move.
Definition at line 366 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_maxGames.
Referenced by GoUctCommands::CmdParamPlayer().
double GoUctPlayer< SEARCH, THREAD >::MaxPonderTime | ( | ) | const |
Maximum ponder time in seconds.
Definition at line 372 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_maxPonderTime.
Referenced by GoUctCommands::CmdParamPlayer().
std::string GoUctPlayer< SEARCH, THREAD >::Name | ( | ) | const |
Definition at line 939 of file GoUctPlayer.h.
void GoUctPlayer< SEARCH, THREAD >::OnBoardChange | ( | ) |
void GoUctPlayer< SEARCH, THREAD >::Ponder | ( | ) |
Definition at line 959 of file GoUctPlayer.h.
References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::DoSearch(), GOUCT_SEARCHMODE_UCT, GoUctPlayer< SEARCH, THREAD >::m_enablePonder, GoUctPlayer< SEARCH, THREAD >::m_maxPonderTime, GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree, GoUctPlayer< SEARCH, THREAD >::m_searchMode, SgDebug(), SgWarning(), and GoBoard::ToPlay().
SgUctValue GoUctPlayer< SEARCH, THREAD >::ResignMinGames | ( | ) | const |
Minimum number of simulations to check for resign.
This minimum number of simulations is also required to apply the early pass check (see EarlyPass()). Default is 3000.
Definition at line 384 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_resignMinGames.
Referenced by GoUctCommands::CmdParamPlayer().
SgUctValue GoUctPlayer< SEARCH, THREAD >::ResignThreshold | ( | ) | const |
Threshold for position value to resign.
Default is 0.01.
Definition at line 390 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_resignThreshold.
Referenced by GoUctCommands::CmdParamPlayer().
bool GoUctPlayer< SEARCH, THREAD >::ReuseSubtree | ( | ) | const |
Reuse subtree from last search.
Reuses the subtree from the last search, if the current position is a number of regular game moves later than the position that the previous search corresponds to. Default is true.
Definition at line 396 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree.
Referenced by GoUctCommands::CmdParamPlayer().
GoUctRootFilter & GoUctPlayer< SEARCH, THREAD >::RootFilter | ( | ) |
Return the current root filter.
Definition at line 402 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_rootFilter.
virtual GoUctSearch& GoUctObjectWithSearch::Search | ( | ) | [pure virtual, inherited] |
const GoUctSearch & GoUctPlayer< SEARCH, THREAD >::Search | ( | ) | const |
Definition at line 983 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_search.
virtual const GoUctSearch& GoUctObjectWithSearch::Search | ( | ) | const [pure virtual, inherited] |
GoUctSearch & GoUctPlayer< SEARCH, THREAD >::Search | ( | ) |
Definition at line 977 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_search.
GoUctGlobalSearchMode GoUctPlayer< SEARCH, THREAD >::SearchMode | ( | ) | const |
See GoUctGlobalSearchMode.
Definition at line 408 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_searchMode.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetAutoParam | ( | bool | enable | ) |
See AutoParam().
Definition at line 414 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_autoParam.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters | ( | int | boardSize | ) | [private] |
Definition at line 989 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_timeControl, SgDefaultTimeControl::SetFastOpenMoves(), SgDefaultTimeControl::SetMinTime(), and SgDefaultTimeControl::SetRemainingConstant().
Referenced by GoUctPlayer< SEARCH, THREAD >::GoUctPlayer(), and GoUctPlayer< SEARCH, THREAD >::OnBoardChange().
void GoUctPlayer< SEARCH, THREAD >::SetEarlyPass | ( | bool | enable | ) |
See EarlyPass().
Definition at line 420 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_earlyPass.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetEnablePonder | ( | bool | enable | ) |
See EnablePonder().
Definition at line 426 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_enablePonder.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetForcedOpeningMoves | ( | bool | enable | ) |
See ForcedOpeningMoves().
Definition at line 432 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetIgnoreClock | ( | bool | enable | ) |
See IgnoreClock().
Definition at line 438 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_ignoreClock.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetMaxGames | ( | SgUctValue | maxGames | ) |
See MaxGames().
Definition at line 444 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_maxGames.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetMaxPonderTime | ( | double | seconds | ) |
See MaxPonderTime().
Definition at line 450 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_maxPonderTime.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetMpiSynchronizer | ( | const SgMpiSynchronizerHandle & | synchronizerHandle | ) |
Definition at line 488 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, and GoUctPlayer< SEARCH, THREAD >::m_search.
void GoUctPlayer< SEARCH, THREAD >::SetResignMinGames | ( | SgUctValue | n | ) |
See ResignMinGames().
Definition at line 462 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_resignMinGames.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetResignThreshold | ( | SgUctValue | threshold | ) |
See ResignThreshold().
Definition at line 468 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_resignThreshold.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetReuseSubtree | ( | bool | enable | ) |
See ReuseSubtree().
Definition at line 1007 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetRootFilter | ( | GoUctRootFilter * | filter | ) |
Set a new root filter.
Deletes the old root filter and takes ownership of the new filter.
Definition at line 474 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_rootFilter.
void GoUctPlayer< SEARCH, THREAD >::SetSearchMode | ( | GoUctGlobalSearchMode | mode | ) |
See GoUctGlobalSearchMode.
Definition at line 482 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_searchMode.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetUseRootFilter | ( | bool | enable | ) |
See UseRootFilter().
Definition at line 456 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_useRootFilter.
Referenced by GoUctCommands::CmdParamPlayer().
void GoUctPlayer< SEARCH, THREAD >::SetWriteDebugOutput | ( | bool | flag | ) |
See WriteDebugOutput().
Definition at line 522 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput.
SgDefaultTimeControl & GoUctPlayer< SEARCH, THREAD >::TimeControl | ( | ) | [virtual] |
Implements SgObjectWithDefaultTimeControl.
Definition at line 1013 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_timeControl.
const SgDefaultTimeControl & GoUctPlayer< SEARCH, THREAD >::TimeControl | ( | ) | const [virtual] |
Implements SgObjectWithDefaultTimeControl.
Definition at line 1019 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_timeControl.
bool GoUctPlayer< SEARCH, THREAD >::UseRootFilter | ( | ) | const |
Use the root filter.
Definition at line 378 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_useRootFilter.
Referenced by GoUctCommands::CmdParamPlayer().
bool GoUctPlayer< SEARCH, THREAD >::VerifyNeutralMove | ( | SgUctValue | maxGames, | |
double | maxTime, | |||
SgPoint | move | |||
) | [private] |
Verify that the move selected by DoEarlyPassSearch is viable.
Prevent blunders from so-called neutral moves that are not.
Definition at line 1027 of file GoUctPlayer.h.
References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_search, GoBoard::Play(), and GoBoard::Undo().
Referenced by GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch().
bool GoUctPlayer< SEARCH, THREAD >::WriteDebugOutput | ( | ) | const |
Print output of GoUctSearch.
Definition at line 516 of file GoUctPlayer.h.
References GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput.
bool GoUctPlayer< SEARCH, THREAD >::m_autoParam [private] |
See AutoParam().
Definition at line 259 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::AutoParam(), GoUctPlayer< SEARCH, THREAD >::OnBoardChange(), and GoUctPlayer< SEARCH, THREAD >::SetAutoParam().
bool GoUctPlayer< SEARCH, THREAD >::m_earlyPass [private] |
See EarlyPass().
Definition at line 277 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::EarlyPass(), and GoUctPlayer< SEARCH, THREAD >::SetEarlyPass().
bool GoUctPlayer< SEARCH, THREAD >::m_enablePonder [private] |
See EnablePonder().
Definition at line 268 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::EnablePonder(), GoUctPlayer< SEARCH, THREAD >::Ponder(), and GoUctPlayer< SEARCH, THREAD >::SetEnablePonder().
bool GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves [private] |
See ForcedOpeningMoves().
Definition at line 262 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::ForcedOpeningMoves(), GoUctPlayer< SEARCH, THREAD >::GenMove(), and GoUctPlayer< SEARCH, THREAD >::SetForcedOpeningMoves().
bool GoUctPlayer< SEARCH, THREAD >::m_ignoreClock [private] |
See IgnoreClock().
Definition at line 265 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::IgnoreClock(), and GoUctPlayer< SEARCH, THREAD >::SetIgnoreClock().
int GoUctPlayer< SEARCH, THREAD >::m_lastBoardSize [private] |
Used in OnBoardChange().
Definition at line 283 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::OnBoardChange().
SgUctValue GoUctPlayer< SEARCH, THREAD >::m_maxGames [private] |
Definition at line 285 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::MaxGames(), and GoUctPlayer< SEARCH, THREAD >::SetMaxGames().
double GoUctPlayer< SEARCH, THREAD >::m_maxPonderTime [private] |
Definition at line 289 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::MaxPonderTime(), GoUctPlayer< SEARCH, THREAD >::Ponder(), and GoUctPlayer< SEARCH, THREAD >::SetMaxPonderTime().
SgMpiSynchronizerHandle GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer [private] |
Definition at line 303 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch(), GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::GetMpiSynchronizer(), GoUctPlayer< SEARCH, THREAD >::GoUctPlayer(), and GoUctPlayer< SEARCH, THREAD >::SetMpiSynchronizer().
boost::scoped_ptr<GoUctPlayoutPolicy<GoBoard> > GoUctPlayer< SEARCH, THREAD >::m_playoutPolicy [private] |
Playout policy used if search mode is GOUCT_SEARCHMODE_PLAYOUTPOLICY.
Definition at line 301 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy().
GoUctPlayoutPolicyParam GoUctPlayer< SEARCH, THREAD >::m_playoutPolicyParam |
Definition at line 76 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy().
SgUctValue GoUctPlayer< SEARCH, THREAD >::m_resignMinGames [private] |
Definition at line 287 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::ResignMinGames(), and GoUctPlayer< SEARCH, THREAD >::SetResignMinGames().
SgUctValue GoUctPlayer< SEARCH, THREAD >::m_resignThreshold [private] |
See ResignThreshold().
Definition at line 280 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch(), GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::ResignThreshold(), GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters(), GoUctPlayer< SEARCH, THREAD >::SetResignThreshold(), and GoUctPlayer< SEARCH, THREAD >::VerifyNeutralMove().
bool GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree [private] |
See ReuseSubtree().
Definition at line 274 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::Ponder(), GoUctPlayer< SEARCH, THREAD >::ReuseSubtree(), and GoUctPlayer< SEARCH, THREAD >::SetReuseSubtree().
boost::scoped_ptr<GoUctRootFilter> GoUctPlayer< SEARCH, THREAD >::m_rootFilter [private] |
Definition at line 297 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::RootFilter(), and GoUctPlayer< SEARCH, THREAD >::SetRootFilter().
SEARCH GoUctPlayer< SEARCH, THREAD >::m_search [private] |
Definition at line 291 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch(), GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::FindInitTree(), GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::GlobalSearch(), GoUctPlayer< SEARCH, THREAD >::GoUctPlayer(), GoUctPlayer< SEARCH, THREAD >::OnBoardChange(), GoUctPlayer< SEARCH, THREAD >::Search(), GoUctPlayer< SEARCH, THREAD >::SetMpiSynchronizer(), and GoUctPlayer< SEARCH, THREAD >::VerifyNeutralMove().
GoUctGlobalSearchMode GoUctPlayer< SEARCH, THREAD >::m_searchMode [private] |
See GoUctGlobalSearchMode.
Definition at line 256 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::Ponder(), GoUctPlayer< SEARCH, THREAD >::SearchMode(), and GoUctPlayer< SEARCH, THREAD >::SetSearchMode().
Statistics GoUctPlayer< SEARCH, THREAD >::m_statistics [private] |
Definition at line 295 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::ClearStatistics(), GoUctPlayer< SEARCH, THREAD >::FindInitTree(), GoUctPlayer< SEARCH, THREAD >::GenMove(), and GoUctPlayer< SEARCH, THREAD >::GetStatistics().
GoTimeControl GoUctPlayer< SEARCH, THREAD >::m_timeControl [private] |
Definition at line 293 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters(), and GoUctPlayer< SEARCH, THREAD >::TimeControl().
bool GoUctPlayer< SEARCH, THREAD >::m_useRootFilter [private] |
See UseRootFilter().
Definition at line 271 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::SetUseRootFilter(), and GoUctPlayer< SEARCH, THREAD >::UseRootFilter().
bool GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput [private] |
Definition at line 305 of file GoUctPlayer.h.
Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::SetWriteDebugOutput(), and GoUctPlayer< SEARCH, THREAD >::WriteDebugOutput().