GTP commands for GoUctPlayer. More...
#include <GoUctCommands.h>
Public Member Functions | |
GoUctCommands (const GoBoard &bd, GoPlayer *&player) | |
Constructor. | |
void | AddGoGuiAnalyzeCommands (GtpCommand &cmd) |
void | Register (GtpEngine &engine) |
Command Callbacks | |
void | CmdBounds (GtpCommand &cmd) |
Show UCT bounds of moves in root node. | |
void | CmdDefaultPolicy (GtpCommand &cmd) |
void | CmdEstimatorStat (GtpCommand &cmd) |
Compute estimator statistics. | |
void | CmdFinalScore (GtpCommand &) |
Return final score. | |
void | CmdFinalStatusList (GtpCommand &) |
Return final status of stones. | |
void | CmdGfx (GtpCommand &cmd) |
Show move values and sample numbers of last search. | |
void | CmdMaxMemory (GtpCommand &cmd) |
Computes the maximum number of nodes in search tree given the maximum allowed memory for the tree. | |
void | CmdMoves (GtpCommand &cmd) |
Return a list of all moves that the search would generate in the current position. | |
void | CmdParamGlobalSearch (GtpCommand &cmd) |
Get and set GoUctGlobalSearch parameters. | |
void | CmdParamPolicy (GtpCommand &cmd) |
Get and set GoUctPlayoutPolicy parameters. | |
void | CmdParamPlayer (GtpCommand &cmd) |
Get and set GoUctPlayer parameters. | |
void | CmdParamRootFilter (GtpCommand &cmd) |
Get and set GoUctDefaultRootFilter parameters. | |
void | CmdParamSearch (GtpCommand &cmd) |
Get and set SgUctSearch and GoUctSearch parameters. | |
void | CmdPatterns (GtpCommand &cmd) |
Show matching patterns. | |
void | CmdPolicyMoves (GtpCommand &cmd) |
Return equivalent best moves in playout policy. | |
void | CmdPriorKnowledge (GtpCommand &cmd) |
Show prior knowledge. | |
void | CmdRaveValues (GtpCommand &cmd) |
Show RAVE values of last search at root position. | |
void | CmdRootFilter (GtpCommand &cmd) |
Return filtered root moves. | |
void | CmdSaveGames (GtpCommand &cmd) |
Save all random games. | |
void | CmdSaveTree (GtpCommand &cmd) |
Save the UCT tree in SGF format. | |
void | CmdScore (GtpCommand &cmd) |
Count the score using the scoring function of UCT. | |
void | CmdSequence (GtpCommand &cmd) |
Show the best sequence from last search. | |
void | CmdStatPlayer (GtpCommand &cmd) |
Write statistics of GoUctPlayer. | |
void | CmdStatPlayerClear (GtpCommand &cmd) |
Clear statistics of GoUctPlayer. | |
void | CmdStatPolicy (GtpCommand &cmd) |
Write statistics of playout policy. | |
void | CmdStatPolicyClear (GtpCommand &cmd) |
Clear statistics of GoUctPlayoutPolicy Arguments: none Only the statistics of the first thread's policy used. | |
void | CmdStatSearch (GtpCommand &cmd) |
Write statistics of search and tree. | |
void | CmdStatTerritory (GtpCommand &cmd) |
Write average point status. | |
void | CmdValue (GtpCommand &cmd) |
Return value of root node from last search. | |
void | CmdValueBlack (GtpCommand &cmd) |
Return value of root node from last search, from Black's point of view. | |
Private Member Functions | |
SgPointSet | DoFinalStatusSearch () |
Do a small search with territory statistics enabled to determine what blocks are dead for the final_status_list and final_score commands. | |
GoUctGlobalSearch < GoUctPlayoutPolicy < GoUctBoard > , GoUctPlayoutPolicyFactory < GoUctBoard > > & | GlobalSearch () |
GoUctPlayer< GoUctGlobalSearch < GoUctPlayoutPolicy < GoUctBoard > , GoUctPlayoutPolicyFactory < GoUctBoard > >, GoUctGlobalSearchState < GoUctPlayoutPolicy < GoUctBoard > > > & | Player () |
GoUctPlayoutPolicy< GoUctBoard > & | Policy (unsigned int threadId) |
void | Register (GtpEngine &e, const std::string &command, GtpCallback< GoUctCommands >::Method method) |
GoUctSearch & | Search () |
GoUctGlobalSearchState < GoUctPlayoutPolicy < GoUctBoard > > & | ThreadState (unsigned int threadId) |
Return state of first thread, if search is of type GoUctGlobalSearch. | |
Private Attributes | |
const GoBoard & | m_bd |
GoPlayer *& | m_player |
GTP commands for GoUctPlayer.
Some of the commands are also usable for other players, as long as they use a subclass of GoUctSearch (and implement GoUctObjectWithSearch).
Definition at line 24 of file GoUctCommands.h.
Constructor.
bd | The game board. | |
player | Reference to pointer to current player, this player can be null or a different player, but those commands of this class that need a GoUctPlayer will fail, if the current player is not GoUctPlayer. |
Definition at line 165 of file GoUctCommands.cpp.
void GoUctCommands::AddGoGuiAnalyzeCommands | ( | GtpCommand & | cmd | ) |
Definition at line 171 of file GoUctCommands.cpp.
void GoUctCommands::CmdBounds | ( | GtpCommand & | cmd | ) |
Show UCT bounds of moves in root node.
This command is compatible with the GoGui analyze command type "gfx". Move bounds are shown as labels on the board, the pass move bound is shown as text in the status line.
Definition at line 205 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctSearch::GetBound(), SgUctNode::Move(), SgUctSearch::Rave(), SgUctTree::Root(), Search(), SG_PASS, and SgUctSearch::Tree().
Referenced by Register().
void GoUctCommands::CmdDefaultPolicy | ( | GtpCommand & | cmd | ) |
Definition at line 234 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoUctDefaultPriorKnowledge::FindGlobalPatternAndAtariMoves(), and m_bd.
Referenced by Register().
void GoUctCommands::CmdEstimatorStat | ( | GtpCommand & | cmd | ) |
Compute estimator statistics.
Arguments: trueValueMaxGames maxGames stepSize fileName
Definition at line 248 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArg(), GoUctEstimatorStat::Compute(), and Search().
Referenced by Register().
void GoUctCommands::CmdFinalScore | ( | GtpCommand & | cmd | ) |
Return final score.
Does a small search and uses the territory statistics to determine the status of blocks.
Definition at line 262 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), DoFinalStatusSearch(), m_bd, GoBoardUtil::ScorePosition(), and GoUtil::ScoreToString().
Referenced by Register().
void GoUctCommands::CmdFinalStatusList | ( | GtpCommand & | cmd | ) |
Return final status of stones.
Does a small search and uses the territory statistics to determine the status of blocks. The engine cannot detect seki, so according to the GTP standard, all stones that are not dead are reported as alive, the response to seki is an empty list.
Arguments: alive|seki|dead
Definition at line 278 of file GoUctCommands.cpp.
References GtpCommand::Arg(), SgPointSet::Contains(), DoFinalStatusSearch(), and m_bd.
Referenced by Register().
void GoUctCommands::CmdGfx | ( | GtpCommand & | cmd | ) |
Show move values and sample numbers of last search.
Arguments: none
Definition at line 308 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoUctUtil::GfxBestMove(), GoUctUtil::GfxCounts(), GoUctUtil::GfxMoveValues(), GoUctUtil::GfxStatus(), Search(), GoUctSearch::ToPlay(), and SgUctSearch::Tree().
Referenced by Register().
void GoUctCommands::CmdMaxMemory | ( | GtpCommand & | cmd | ) |
Computes the maximum number of nodes in search tree given the maximum allowed memory for the tree.
Assumes two trees. Returns current memory usage if no arguments. Arguments: max memory for trees
Definition at line 323 of file GoUctCommands.cpp.
References GtpCommand::ArgMin(), GtpCommand::CheckNuArgLessEqual(), SgUctSearch::MaxNodes(), GtpCommand::NuArg(), Search(), and SgUctSearch::SetMaxNodes().
Referenced by Register().
void GoUctCommands::CmdMoves | ( | GtpCommand & | cmd | ) |
Return a list of all moves that the search would generate in the current position.
Arguments: none
Definition at line 339 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctSearch::GenerateAllMoves(), and Search().
Referenced by Register().
void GoUctCommands::CmdParamGlobalSearch | ( | GtpCommand & | cmd | ) |
Get and set GoUctGlobalSearch parameters.
This command is compatible with the GoGui analyze command type "param".
Parameters:
live_gfx
See GoUctGlobalSearch::GlobalSearchLiveGfx mercy_rule
See GoUctGlobalSearchStateParam::m_mercyRule territory_statistics
See GoUctGlobalSearchStateParam::m_territoryStatistics length_modification
See GoUctGlobalSearchStateParam::m_langthModification score_modification
See GoUctGlobalSearchStateParam::m_scoreModification Definition at line 361 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArgLessEqual(), GlobalSearch(), GoUctGlobalSearch< POLICY, FACTORY >::GlobalSearchLiveGfx(), GoUctGlobalSearchStateParam::m_lengthModification, GoUctGlobalSearchStateParam::m_mercyRule, GoUctGlobalSearch< POLICY, FACTORY >::m_param, GoUctGlobalSearchStateParam::m_scoreModification, GoUctGlobalSearchStateParam::m_territoryStatistics, GtpCommand::NuArg(), and GoUctGlobalSearch< POLICY, FACTORY >::SetGlobalSearchLiveGfx().
Referenced by Register().
void GoUctCommands::CmdParamPlayer | ( | GtpCommand & | cmd | ) |
Get and set GoUctPlayer parameters.
This command is compatible with the GoGui analyze command type "param".
Parameters:
auto_param
See GoUctPlayer::AutoParam early_pass
See GoUctPlayer::EarlyPass forced_opening_moves
See GoUctPlayer::ForcedOpeningMoves ignore_clock
See GoUctPlayer::IgnoreClock ponder
See GoUctPlayer::EnablePonder reuse_subtree
See GoUctPlayer::ReuseSubtree use_root_filter
See GoUctPlayer::UseRootFilter max_games
See GoUctPlayer::MaxGames max_ponder_time
See GoUctPlayer::MaxPonderTime resign_min_games
See GoUctPlayer::ResignMinGames resign_threshold
See GoUctPlayer::ResignThreshold search_mode
playout|uct|one_ply
See GoUctPlayer::SearchMode Definition at line 417 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::ArgMin(), GtpCommand::ArgMinMax(), GoUctPlayer< SEARCH, THREAD >::AutoParam(), GtpCommand::CheckNuArgLessEqual(), GoUctPlayer< SEARCH, THREAD >::EarlyPass(), GoUctPlayer< SEARCH, THREAD >::EnablePonder(), GoUctPlayer< SEARCH, THREAD >::ForcedOpeningMoves(), GoUctPlayer< SEARCH, THREAD >::IgnoreClock(), GoUctPlayer< SEARCH, THREAD >::MaxGames(), GoUctPlayer< SEARCH, THREAD >::MaxPonderTime(), GtpCommand::NuArg(), Player(), GoUctPlayer< SEARCH, THREAD >::ResignMinGames(), GoUctPlayer< SEARCH, THREAD >::ResignThreshold(), GoUctPlayer< SEARCH, THREAD >::ReuseSubtree(), GoUctPlayer< SEARCH, THREAD >::SearchMode(), GoUctPlayer< SEARCH, THREAD >::SetAutoParam(), GoUctPlayer< SEARCH, THREAD >::SetEarlyPass(), GoUctPlayer< SEARCH, THREAD >::SetEnablePonder(), GoUctPlayer< SEARCH, THREAD >::SetForcedOpeningMoves(), GoUctPlayer< SEARCH, THREAD >::SetIgnoreClock(), GoUctPlayer< SEARCH, THREAD >::SetMaxGames(), GoUctPlayer< SEARCH, THREAD >::SetMaxPonderTime(), GoUctPlayer< SEARCH, THREAD >::SetResignMinGames(), GoUctPlayer< SEARCH, THREAD >::SetResignThreshold(), GoUctPlayer< SEARCH, THREAD >::SetReuseSubtree(), GoUctPlayer< SEARCH, THREAD >::SetSearchMode(), GoUctPlayer< SEARCH, THREAD >::SetUseRootFilter(), and GoUctPlayer< SEARCH, THREAD >::UseRootFilter().
Referenced by Register().
void GoUctCommands::CmdParamPolicy | ( | GtpCommand & | cmd | ) |
Get and set GoUctPlayoutPolicy parameters.
This command is compatible with the GoGui analyze command type "param".
Parameters:
statistics_enabled
See GoUctPlayoutPolicyParam::m_statisticsEnabled nakade_heuristic
See GoUctPlayoutPolicyParam::m_useNakadeHeuristic fillboard_tries
See GoUctPlayoutPolicyParam::m_fillboardTries Definition at line 483 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArgLessEqual(), GoUctPlayoutPolicyParam::m_fillboardTries, GoUctPlayoutPolicyParam::m_statisticsEnabled, GoUctPlayoutPolicyParam::m_useNakadeHeuristic, GtpCommand::NuArg(), and Player().
Referenced by Register().
void GoUctCommands::CmdParamRootFilter | ( | GtpCommand & | cmd | ) |
Get and set GoUctDefaultRootFilter parameters.
This command is compatible with the GoGui analyze command type "param".
Parameters:
check_ladders
See GoUctDefaultRootFilter::CheckLadders() Definition at line 516 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GoUctDefaultRootFilter::CheckLadders(), GtpCommand::CheckNuArgLessEqual(), GtpCommand::NuArg(), Player(), and GoUctDefaultRootFilter::SetCheckLadders().
Referenced by Register().
void GoUctCommands::CmdParamSearch | ( | GtpCommand & | cmd | ) |
Get and set SgUctSearch and GoUctSearch parameters.
This command is compatible with the GoGui analyze command type "param".
Parameters:
check_float_precision
See GoUctSearch::CheckFloatPrecision keep_games
See GoUctSearch::KeepGames lock_free
See SgUctSearch::LockFree log_games
See SgUctSearch::LogGames prune_full_tree
See SgUctSearch::PruneFullTree rave
See SgUctSearch::Rave weight_rave_updates
SgUctSearch::WeightRaveUpdates bias_term_constant
See SgUctSearch::BiasTermConstant expand_threshold
See SgUctSearch::ExpandThreshold first_play_urgency
See SgUctSearch::FirstPlayUrgency knowledge_threshold
See SgUctSearch::KnowledgeThreshold live_gfx
none|counts|sequence
See GoUctSearch::LiveGfx live_gfx_interval
See GoUctSearch::LiveGfxInterval max_nodes
See SgUctSearch::MaxNodes move_select
value|count|bound|rave
See SgUctSearch::MoveSelect number_threads
See SgUctSearch::NumberThreads number_playouts
See SgUctSearch::NumberPlayouts prune_min_count
See SgUctSearch::PruneMinCount rave_weight_final
See SgUctSearch::RaveWeightFinal rave_weight_initial
See SgUctSearch::RaveWeightInitial Definition at line 565 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::ArgMin(), SgUctSearch::BiasTermConstant(), SgUctSearch::CheckFloatPrecision(), GtpCommand::CheckNuArgLessEqual(), SgUctSearch::ExpandThreshold(), SgUctSearch::FirstPlayUrgency(), GoUctSearch::KeepGames(), SgUctSearch::KnowledgeThreshold(), GoUctSearch::LiveGfx(), GoUctSearch::LiveGfxInterval(), SgUctSearch::LockFree(), SgUctSearch::LogGames(), SgUctSearch::MaxNodes(), SgUctSearch::MoveSelect(), GtpCommand::NuArg(), SgUctSearch::NumberPlayouts(), SgUctSearch::NumberThreads(), SgUctSearch::PruneFullTree(), SgUctSearch::PruneMinCount(), SgUctSearch::RandomizeRaveFrequency(), SgUctSearch::Rave(), SgUctSearch::RaveWeightFinal(), SgUctSearch::RaveWeightInitial(), Search(), SgUctSearch::SetBiasTermConstant(), SgUctSearch::SetCheckFloatPrecision(), SgUctSearch::SetExpandThreshold(), SgUctSearch::SetFirstPlayUrgency(), GoUctSearch::SetKeepGames(), SgUctSearch::SetKnowledgeThreshold(), GoUctSearch::SetLiveGfx(), GoUctSearch::SetLiveGfxInterval(), SgUctSearch::SetLockFree(), SgUctSearch::SetLogGames(), SgUctSearch::SetMaxNodes(), SgUctSearch::SetMoveSelect(), SgUctSearch::SetNumberPlayouts(), SgUctSearch::SetNumberThreads(), SgUctSearch::SetPruneFullTree(), SgUctSearch::SetPruneMinCount(), SgUctSearch::SetRandomizeRaveFrequency(), SgUctSearch::SetRave(), SgUctSearch::SetRaveWeightFinal(), SgUctSearch::SetRaveWeightInitial(), SgUctSearch::SetVirtualLoss(), SgUctSearch::SetWeightRaveUpdates(), SgUctSearch::VirtualLoss(), and SgUctSearch::WeightRaveUpdates().
Referenced by Register().
void GoUctCommands::CmdPatterns | ( | GtpCommand & | cmd | ) |
Show matching patterns.
Returns: List of points for matching patterns
Definition at line 660 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoBoard::IsEmpty(), m_bd, and GoUctPatterns< BOARD >::MatchAny().
Referenced by Register().
void GoUctCommands::CmdPolicyMoves | ( | GtpCommand & | cmd | ) |
Return equivalent best moves in playout policy.
See GoUctPlayoutPolicy::GetEquivalentBestMoves()
Arguments: none
Returns: Move type string followed by move list on a single line.
Definition at line 673 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoUctPlayoutPolicy< BOARD >::GenerateMove(), GoUctPlayoutPolicy< BOARD >::GetEquivalentBestMoves(), GoUctPlayoutPolicyTypeStr(), m_bd, GoUctPlayoutPolicy< BOARD >::MoveType(), Player(), SgArrayList< T, SIZE >::Sort(), and GoUctPlayoutPolicy< BOARD >::StartPlayout().
Referenced by Register().
void GoUctCommands::CmdPriorKnowledge | ( | GtpCommand & | cmd | ) |
Show prior knowledge.
The response is compatible to the GoGui analyze command type gfx
and shows the prior knowledge values as influence and the counts as labels.
Definition at line 694 of file GoUctCommands.cpp.
References GtpCommand::ArgMin(), GtpCommand::CheckNuArgLessEqual(), GoUctGlobalSearchState< POLICY >::GenerateAllMoves(), SgUctSearch::InverseEval(), m_bd, GtpCommand::NuArg(), SG_BLACK, GoUctGlobalSearchState< POLICY >::StartSearch(), ThreadState(), and GoBoard::ToPlay().
Referenced by Register().
void GoUctCommands::CmdRaveValues | ( | GtpCommand & | cmd | ) |
Show RAVE values of last search at root position.
This command is compatible to the GoGui analyze command type sboard
. The values are scaled to [-1,+1] from Black's point of view.
Definition at line 736 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctNode::HasRaveValue(), m_bd, SgUctNode::Move(), SgUctSearch::Rave(), SgUctNode::RaveValue(), SgUctTree::Root(), Search(), SG_PASS, GoBoard::Size(), and SgUctSearch::Tree().
Referenced by Register().
void GoUctCommands::CmdRootFilter | ( | GtpCommand & | cmd | ) |
Return filtered root moves.
Definition at line 760 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), Get(), and Player().
Referenced by Register().
void GoUctCommands::CmdSaveGames | ( | GtpCommand & | cmd | ) |
Save all random games.
Arguments: filename
Definition at line 791 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GoUctSearch::SaveGames(), Search(), and SgException::what().
Referenced by Register().
void GoUctCommands::CmdSaveTree | ( | GtpCommand & | cmd | ) |
Save the UCT tree in SGF format.
Arguments: filename [max_depth]
max_depth is an optional argument to cut the tree at a certain depth (the root node has depth 0). If it is not used, the full tree will be saved.
Definition at line 772 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::ArgMin(), GtpCommand::CheckNuArgLessEqual(), GtpCommand::NuArg(), GoUctSearch::SaveTree(), and Search().
Referenced by Register().
void GoUctCommands::CmdScore | ( | GtpCommand & | cmd | ) |
Count the score using the scoring function of UCT.
Arguments: none
Returns: Score (Win/Loss)
Definition at line 808 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoRules::Komi(), m_bd, GoBoard::Rules(), GoBoardUtil::ScoreSimpleEndPosition(), GoKomi::ToFloat(), and SgException::what().
Referenced by Register().
void GoUctCommands::CmdSequence | ( | GtpCommand & | cmd | ) |
Show the best sequence from last search.
This command is compatible with the GoGui analyze command type "gfx" (There is no "var" command type supported in GoGui 1.1, which allows to specify the first color to move within the response, and this command returns the sequence of the last search, which is unrelated to the current color to play on the board.)
Arguments: none
Definition at line 829 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoUctUtil::GfxSequence(), and Search().
Referenced by Register().
void GoUctCommands::CmdStatPlayer | ( | GtpCommand & | cmd | ) |
Write statistics of GoUctPlayer.
Arguments: none
Definition at line 838 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), and Player().
Referenced by Register().
void GoUctCommands::CmdStatPlayerClear | ( | GtpCommand & | cmd | ) |
Clear statistics of GoUctPlayer.
Arguments: none
Definition at line 847 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), and Player().
Referenced by Register().
void GoUctCommands::CmdStatPolicy | ( | GtpCommand & | cmd | ) |
Write statistics of playout policy.
Arguments: none
Needs enabling the statistics with uct_param_policy statistics_enabled
Only the statistics of the first thread's policy used.
Definition at line 859 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), Player(), Policy(), SG_BLACK, SG_WHITE, and SgWarning().
Referenced by Register().
void GoUctCommands::CmdStatPolicyClear | ( | GtpCommand & | cmd | ) |
Clear statistics of GoUctPlayoutPolicy Arguments: none
Only the statistics of the first thread's policy used.
Definition at line 874 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), and Policy().
Referenced by Register().
void GoUctCommands::CmdStatSearch | ( | GtpCommand & | cmd | ) |
Write statistics of search and tree.
Arguments: none
Definition at line 883 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctTreeStatistics::Compute(), Search(), SgUctSearch::Tree(), and SgUctSearch::WriteStatistics().
Referenced by Register().
void GoUctCommands::CmdStatTerritory | ( | GtpCommand & | cmd | ) |
Write average point status.
This command is compatible with the GoGui analyze type dboard
.
Statistics are only collected, if enabled with uct_param_global_search territory_statistics 1
.
Arguments: none
Definition at line 901 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), m_bd, GoBoard::Size(), and ThreadState().
Referenced by Register().
void GoUctCommands::CmdValue | ( | GtpCommand & | cmd | ) |
Return value of root node from last search.
Arguments: none
Definition at line 919 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctNode::Mean(), SgUctTree::Root(), Search(), and SgUctSearch::Tree().
Referenced by Register().
void GoUctCommands::CmdValueBlack | ( | GtpCommand & | cmd | ) |
Return value of root node from last search, from Black's point of view.
Arguments: none
Definition at line 927 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctSearch::InverseEval(), SgUctNode::Mean(), SgUctTree::Root(), Search(), SG_WHITE, and SgUctSearch::Tree().
Referenced by Register().
SgPointSet GoUctCommands::DoFinalStatusSearch | ( | ) | [private] |
Do a small search with territory statistics enabled to determine what blocks are dead for the final_status_list and final_score commands.
Definition at line 939 of file GoUctCommands.cpp.
References SgStatistics< VALUE, COUNT >::Add(), GoModBoard::Board(), GoRules::CaptureDead(), GoSafetySolver::FindSafePoints(), GoBoard::GetLastMove(), GoBoard::GetStone(), GlobalSearch(), SgPointSet::Include(), m_bd, GoUctGlobalSearch< POLICY, FACTORY >::m_param, m_player, GoUctGlobalSearchStateParam::m_territoryStatistics, SgStatistics< VALUE, COUNT >::Mean(), GoBoard::Play(), GoBoard::Rules(), SgUctSearch::Search(), SG_BLACK, SG_PASS, SG_WHITE, SgDebug(), SgOppBW(), ThreadState(), GoBoard::ToPlay(), GoBoardUtil::TwoPasses(), GoBoard::Undo(), and GoPlayer::UpdateSubscriber().
Referenced by CmdFinalScore(), and CmdFinalStatusList().
GoUctGlobalSearch< GoUctPlayoutPolicy< GoUctBoard >, GoUctPlayoutPolicyFactory< GoUctBoard > > & GoUctCommands::GlobalSearch | ( | ) | [private] |
Definition at line 1014 of file GoUctCommands.cpp.
References Player().
Referenced by CmdParamGlobalSearch(), and DoFinalStatusSearch().
GoUctPlayerType & GoUctCommands::Player | ( | ) | [private] |
Definition at line 1019 of file GoUctCommands.cpp.
References m_player.
Referenced by CmdParamPlayer(), CmdParamPolicy(), CmdParamRootFilter(), CmdPolicyMoves(), CmdRootFilter(), CmdStatPlayer(), CmdStatPlayerClear(), CmdStatPolicy(), and GlobalSearch().
GoUctPlayoutPolicy< GoUctBoard > & GoUctCommands::Policy | ( | unsigned int | threadId | ) | [private] |
Definition at line 1034 of file GoUctCommands.cpp.
References ThreadState().
Referenced by CmdStatPolicy(), and CmdStatPolicyClear().
void GoUctCommands::Register | ( | GtpEngine & | e, | |
const std::string & | command, | |||
GtpCallback< GoUctCommands >::Method | method | |||
) | [private] |
Definition at line 1079 of file GoUctCommands.cpp.
References GtpEngine::Register().
void GoUctCommands::Register | ( | GtpEngine & | engine | ) |
Definition at line 1044 of file GoUctCommands.cpp.
References CmdBounds(), CmdDefaultPolicy(), CmdEstimatorStat(), CmdFinalScore(), CmdFinalStatusList(), CmdGfx(), CmdMaxMemory(), CmdMoves(), CmdParamGlobalSearch(), CmdParamPlayer(), CmdParamPolicy(), CmdParamRootFilter(), CmdParamSearch(), CmdPatterns(), CmdPolicyMoves(), CmdPriorKnowledge(), CmdRaveValues(), CmdRootFilter(), CmdSaveGames(), CmdSaveTree(), CmdScore(), CmdSequence(), CmdStatPlayer(), CmdStatPlayerClear(), CmdStatPolicy(), CmdStatPolicyClear(), CmdStatSearch(), CmdStatTerritory(), CmdValue(), and CmdValueBlack().
GoUctSearch & GoUctCommands::Search | ( | ) | [private] |
Definition at line 1085 of file GoUctCommands.cpp.
References SgUctSearch::Search().
Referenced by CmdBounds(), CmdEstimatorStat(), CmdGfx(), CmdMaxMemory(), CmdMoves(), CmdParamSearch(), CmdRaveValues(), CmdSaveGames(), CmdSaveTree(), CmdSequence(), CmdStatSearch(), CmdValue(), CmdValueBlack(), and ThreadState().
GoUctGlobalSearchState< GoUctPlayoutPolicy< GoUctBoard > > & GoUctCommands::ThreadState | ( | unsigned int | threadId | ) | [private] |
Return state of first thread, if search is of type GoUctGlobalSearch.
GtpFailure,if | search is a different subclass or threads are not yet created. |
Definition at line 1103 of file GoUctCommands.cpp.
References SgUctSearch::CreateThreads(), Search(), SgUctSearch::ThreadsCreated(), and SgUctSearch::ThreadState().
Referenced by CmdPriorKnowledge(), CmdStatTerritory(), DoFinalStatusSearch(), and Policy().
const GoBoard& GoUctCommands::m_bd [private] |
Definition at line 106 of file GoUctCommands.h.
Referenced by CmdDefaultPolicy(), CmdFinalScore(), CmdFinalStatusList(), CmdPatterns(), CmdPolicyMoves(), CmdPriorKnowledge(), CmdRaveValues(), CmdScore(), CmdStatTerritory(), and DoFinalStatusSearch().
GoPlayer*& GoUctCommands::m_player [private] |
Definition at line 108 of file GoUctCommands.h.
Referenced by DoFinalStatusSearch(), and Player().