#include <GoUctCommands.h>
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 26 of file GoUctCommands.h.
Public Member Functions | |
| GoUctCommands (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 (std::size_t threadId) |
| void | Register (GtpEngine &e, const std::string &command, GtpCallback< GoUctCommands >::Method method) |
| GoUctSearch & | Search () |
| GoUctGlobalSearchState< GoUctPlayoutPolicy< GoUctBoard > > & | ThreadState (std::size_t threadId) |
| Return state of first thread, if search is of type GoUctGlobalSearch. | |
Private Attributes | |
| GoBoard & | m_bd |
| GoPlayer *& | m_player |
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 166 of file GoUctCommands.cpp.
| void GoUctCommands::AddGoGuiAnalyzeCommands | ( | GtpCommand & | cmd | ) |
Definition at line 172 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 207 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), SgUctSearch::GetBound(), SgUctSearch::Rave(), SgUctTree::Root(), Search(), SG_PASS, and SgUctSearch::Tree().
Referenced by Register().
| void GoUctCommands::CmdDefaultPolicy | ( | GtpCommand & | cmd | ) |
Definition at line 236 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 251 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArg(), GoUctEstimatorStat::Compute(), Search(), and GtpCommand::SizeTypeArg().
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 266 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 283 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArg(), 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 315 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 331 of file GoUctCommands.cpp.
References GtpCommand::CheckNuArgLessEqual(), SgUctSearch::MaxNodes(), GtpCommand::NuArg(), Search(), SgUctSearch::SetMaxNodes(), and GtpCommand::SizeTypeArg().
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 348 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 371 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::BoolArg(), GtpCommand::CheckNuArgLessEqual(), GtpCommand::FloatArg(), 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 reuse_subtree See GoUctPlayer::ReuseSubtree use_root_filter See GoUctPlayer::UseRootFilter max_games See GoUctPlayer::MaxGames resign_min_games See GoUctPlayer::ResignMinGames resign_threshold See GoUctPlayer::ResignThreshold search_mode playout|uct|one_ply See GoUctPlayer::SearchMode Definition at line 426 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GoUctPlayer< SEARCH, THREAD >::AutoParam(), GtpCommand::BoolArg(), GtpCommand::CheckNuArgLessEqual(), GoUctPlayer< SEARCH, THREAD >::EarlyPass(), GoUctPlayer< SEARCH, THREAD >::EnablePonder(), GtpCommand::FloatArg(), GoUctPlayer< SEARCH, THREAD >::ForcedOpeningMoves(), GoUctPlayer< SEARCH, THREAD >::IgnoreClock(), GoUctPlayer< SEARCH, THREAD >::MaxGames(), GtpCommand::NuArg(), Player(), GoUctPlayer< SEARCH, THREAD >::ResignMinGames(), GoUctPlayer< SEARCH, THREAD >::ResignThreshold(), GoUctPlayer< SEARCH, THREAD >::ReuseSubtree(), GoUctPlayer< SEARCH, THREAD >::SearchMode(), SearchModeArg(), SearchModeToString(), 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 >::SetResignMinGames(), GoUctPlayer< SEARCH, THREAD >::SetResignThreshold(), GoUctPlayer< SEARCH, THREAD >::SetReuseSubtree(), GoUctPlayer< SEARCH, THREAD >::SetSearchMode(), GoUctPlayer< SEARCH, THREAD >::SetUseRootFilter(), GtpCommand::SizeTypeArg(), 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 490 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::BoolArg(), GtpCommand::CheckNuArgLessEqual(), GtpCommand::IntArg(), 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 524 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::BoolArg(), 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:
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 573 of file GoUctCommands.cpp.
References GtpCommand::Arg(), SgUctSearch::BiasTermConstant(), GtpCommand::BoolArg(), GtpCommand::CheckNuArgLessEqual(), SgUctSearch::ExpandThreshold(), SgUctSearch::FirstPlayUrgency(), GtpCommand::FloatArg(), GtpCommand::IntArg(), GoUctSearch::KeepGames(), SgUctSearch::KnowledgeThreshold(), KnowledgeThresholdFromString(), KnowledgeThresholdToString(), GoUctSearch::LiveGfx(), LiveGfxArg(), GoUctSearch::LiveGfxInterval(), LiveGfxToString(), SgUctSearch::LockFree(), SgUctSearch::LogGames(), SgUctSearch::MaxNodes(), SgUctSearch::MoveSelect(), MoveSelectArg(), MoveSelectToString(), GtpCommand::NuArg(), SgUctSearch::NumberPlayouts(), SgUctSearch::NumberThreads(), SgUctSearch::PruneFullTree(), SgUctSearch::PruneMinCount(), SgUctSearch::RandomizeRaveFrequency(), SgUctSearch::Rave(), SgUctSearch::RaveWeightFinal(), SgUctSearch::RaveWeightInitial(), Search(), SgUctSearch::SetBiasTermConstant(), 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(), GtpCommand::SizeTypeArg(), 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 665 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 679 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), GoUctPlayoutPolicy< BOARD >::GenerateMove(), GoUctPlayoutPolicy< BOARD >::GetEquivalentBestMoves(), GoUctPlayoutPolicyTypeStr(), m_bd, GoUctPlayoutPolicy< BOARD >::MoveType(), Player(), SgSList< 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 701 of file GoUctCommands.cpp.
References GtpCommand::CheckNuArgLessEqual(), GoUctGlobalSearchState< POLICY >::GenerateAllMoves(), SgUctSearch::InverseEval(), m_bd, GtpCommand::NuArg(), SG_BLACK, GtpCommand::SizeTypeArg(), 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 745 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), m_bd, SgUctSearch::Rave(), Search(), SG_PASS, GoBoard::Size(), and SgUctSearch::Tree().
Referenced by Register().
| void GoUctCommands::CmdRootFilter | ( | GtpCommand & | cmd | ) |
Return filtered root moves.
Definition at line 770 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 803 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArg(), 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 783 of file GoUctCommands.cpp.
References GtpCommand::Arg(), GtpCommand::CheckNuArgLessEqual(), GtpCommand::IntArg(), 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 822 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 844 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 854 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 864 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 877 of file GoUctCommands.cpp.
References GtpCommand::CheckArgNone(), Player(), Policy(), 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 890 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 900 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 919 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 938 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 947 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 960 of file GoUctCommands.cpp.
References SgStatistics< VALUE, COUNT >::Add(), Contains(), GoSafetySolver::FindSafePoints(), GoBoard::GetStone(), GlobalSearch(), SgPointSet::Include(), m_bd, GoUctGlobalSearch< POLICY, FACTORY >::m_param, m_player, GoUctGlobalSearchStateParam::m_territoryStatistics, SgStatistics< VALUE, COUNT >::Mean(), SgUctSearch::Search(), SG_BLACK, SG_PASS, SG_WHITE, SgDebug(), SgOppBW(), ThreadState(), GoBoardUtil::TwoPasses(), and GoPlayer::UpdateSubscriber().
Referenced by CmdFinalScore(), and CmdFinalStatusList().
| GoUctGlobalSearch< GoUctPlayoutPolicy< GoUctBoard >, GoUctPlayoutPolicyFactory< GoUctBoard > > & GoUctCommands::GlobalSearch | ( | ) | [private] |
Definition at line 1033 of file GoUctCommands.cpp.
References Player().
Referenced by CmdParamGlobalSearch(), and DoFinalStatusSearch().
| GoUctPlayerType & GoUctCommands::Player | ( | ) | [private] |
Definition at line 1038 of file GoUctCommands.cpp.
References m_player.
Referenced by CmdParamPlayer(), CmdParamPolicy(), CmdParamRootFilter(), CmdPolicyMoves(), CmdRootFilter(), CmdStatPlayer(), CmdStatPlayerClear(), CmdStatPolicy(), and GlobalSearch().
| GoUctPlayoutPolicy< GoUctBoard > & GoUctCommands::Policy | ( | std::size_t | threadId | ) | [private] |
Definition at line 1053 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] |
| void GoUctCommands::Register | ( | GtpEngine & | engine | ) |
Definition at line 1063 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 1104 of file GoUctCommands.cpp.
References GoUctObjectWithSearch::Search().
Referenced by CmdBounds(), CmdEstimatorStat(), CmdGfx(), CmdMaxMemory(), CmdMoves(), CmdParamSearch(), CmdRaveValues(), CmdSaveGames(), CmdSaveTree(), CmdSequence(), CmdStatSearch(), CmdValue(), CmdValueBlack(), and ThreadState().
| GoUctGlobalSearchState< GoUctPlayoutPolicy< GoUctBoard > > & GoUctCommands::ThreadState | ( | std::size_t | 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 1123 of file GoUctCommands.cpp.
References SgUctSearch::CreateThreads(), Search(), SgUctSearch::ThreadsCreated(), and SgUctSearch::ThreadState().
Referenced by CmdPriorKnowledge(), CmdStatTerritory(), DoFinalStatusSearch(), and Policy().
GoBoard& GoUctCommands::m_bd [private] |
Definition at line 110 of file GoUctCommands.h.
Referenced by CmdDefaultPolicy(), CmdFinalScore(), CmdFinalStatusList(), CmdPatterns(), CmdPolicyMoves(), CmdPriorKnowledge(), CmdRaveValues(), CmdScore(), CmdStatTerritory(), and DoFinalStatusSearch().
GoPlayer*& GoUctCommands::m_player [private] |