Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoUctPlayer< SEARCH, THREAD > Class Template Reference

#include <GoUctPlayer.h>

Inheritance diagram for GoUctPlayer< SEARCH, THREAD >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class SEARCH, class THREAD>
class GoUctPlayer< SEARCH, THREAD >

Player using UCT.

Definition at line 54 of file GoUctPlayer.h.

Public Member Functions

 GoUctPlayer (GoBoard &bd)
 Constructor.
 ~GoUctPlayer ()
SEARCH & GlobalSearch ()
const SEARCH & GlobalSearch () const
GoUctRootFilterRootFilter ()
 Return the current root filter.
void SetRootFilter (GoUctRootFilter *filter)
 Set a new root filter.
void SetMpiSynchronizer (const SgMpiSynchronizerHandle &synchronizerHandle)
SgMpiSynchronizerHandle GetMpiSynchronizer ()
GoBoardBoard ()
const GoBoardBoard () const
SgNodeCurrentNode () const
void SetCurrentNode (SgNode *node)
virtual int MoveValue (SgPoint p)
virtual void OnGameFinished ()
virtual void OnNewGame ()
int Variant () const
void SetVariant (int variant)
void SetSubscriber (GoBoard &subscriber)
void UpdateSubscriber ()
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
SgDefaultTimeControlTimeControl ()
const SgDefaultTimeControlTimeControl () const
Virtual functions of GoUctObjectWithSearch
GoUctSearchSearch ()
const GoUctSearchSearch () 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().
std::size_t MaxGames () const
 Limit on number of simulated games per move.
void SetMaxGames (std::size_t maxGames)
 See MaxGames().
bool EnablePonder () const
 Think during the opponents time.
void SetEnablePonder (bool enable)
 See EnablePonder().
std::size_t ResignMinGames () const
 Minimum number of simulations to check for resign.
void SetResignMinGames (std::size_t 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().
double ResignThreshold () const
 Threshold for position value to resign.
void SetResignThreshold (double 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().
Virtual functions of SgObjectWithDefaultTimeControl
const StatisticsGetStatistics () const
void ClearStatistics ()

Public Attributes

GoUctPlayoutPolicyParam m_playoutPolicyParam

Protected Member Functions

virtual void PrePlay (GoPlayerMove move)
virtual void OnPlay (GoPlayerMove move)
virtual void PreUndo ()
virtual void OnUndo ()

Protected Attributes

SgNodem_currentNode

Private Member Functions

SgMove GenMovePlayoutPolicy (SgBlackWhite toPlay)
bool DoEarlyPassSearch (size_t 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 (size_t 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().
double m_resignThreshold
 See ResignThreshold().
int m_lastBoardSize
 Used in OnBoardChange().
std::size_t m_maxGames
std::size_t m_resignMinGames
SEARCH m_search
GoTimeControl m_timeControl
Statistics m_statistics
boost::scoped_ptr< GoUctRootFilterm_rootFilter
boost::scoped_ptr< GoUctPlayoutPolicy<
GoBoard > > 
m_playoutPolicy
 Playout policy used if search mode is GOUCT_SEARCHMODE_PLAYOUTPOLICY.
SgMpiSynchronizerHandle m_mpiSynchronizer
bool m_writeDebugOutput

Classes

struct  Statistics
 Statistics collected by GoUctPlayer. More...


Constructor & Destructor Documentation

template<class SEARCH, class THREAD>
GoUctPlayer< SEARCH, THREAD >::GoUctPlayer ( GoBoard bd  ) 

Constructor.

Parameters:
bd The board.

Definition at line 529 of file GoUctPlayer.h.

References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, GoUctPlayer< SEARCH, THREAD >::m_search, and GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters().

template<class SEARCH, class THREAD>
GoUctPlayer< SEARCH, THREAD >::~GoUctPlayer (  ) 

Definition at line 557 of file GoUctPlayer.h.


Member Function Documentation

template<class SEARCH, class THREAD>
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 324 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_autoParam.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::ClearStatistics (  ) 

Definition at line 562 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::Statistics::Clear(), and GoUctPlayer< SEARCH, THREAD >::m_statistics.

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::DoEarlyPassSearch ( size_t  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.

Parameters:
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)
Returns:
true, if it is still a win and everything is safe after a pass

Definition at line 575 of file GoUctPlayer.h.

References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_search, GoBoardUtil::PassWins(), GoBoard::Play(), GoBoardUtil::SelfAtari(), SG_PASS, SgDebug(), GoBoard::ToPlay(), GoBoard::Undo(), and GoUctPlayer< SEARCH, THREAD >::VerifyNeutralMove().

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch().

template<class SEARCH, class THREAD>
SgPoint GoUctPlayer< SEARCH, THREAD >::DoSearch ( SgBlackWhite  toPlay,
double  maxTime,
bool  isDuringPondering 
) [private]

Run the search for a given color.

Parameters:
toPlay 
maxTime 
isDuringPondering Hint that search is done during pondering (this handles the decision to discard an aborted FindInitTree differently)
Returns:
The best move or SG_NULLMOVE if terminal position (can also happen, if isDuringPondering, no search was performed, because DoSearch() was aborted during FindInitTree()).

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

template<class SEARCH, class THREAD>
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 343 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_earlyPass.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
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 60 min.

Definition at line 349 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_enablePonder.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
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.

See also:
SetReuseSubtree

Definition at line 799 of file GoUctPlayer.h.

References SgStatisticsExt< VALUE, COUNT >::Add(), GoPlayer::Board(), SgUctTreeUtil::ExtractSubtree(), GoBoardHistory::IsAlternatePlayFollowUpOf(), GoUctPlayer< SEARCH, THREAD >::Statistics::m_reuse, GoUctPlayer< SEARCH, THREAD >::m_search, GoUctPlayer< SEARCH, THREAD >::m_statistics, SgUctTree::NuNodes(), GoBoardHistory::SetFromBoard(), GoBoard::SetToPlay(), SG_ASSERT, SgDebug(), and SgWarning().

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::ForcedOpeningMoves (  )  const

Enforce opening moves in the corner on large boards.

See GoUctUtil::GenForcedOpeningMove. Default is true.

Definition at line 355 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
SgPoint GoUctPlayer< SEARCH, THREAD >::GenMove ( const SgTimeRecord time,
SgBlackWhite  toPlay 
) [virtual]

Implements GoPlayer.

Definition at line 846 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, GoBoardUtil::PassWins(), SG_ASSERT, SG_NULLMOVE, SG_PASS, SG_RESIGN, SgDebug(), and GoTimeControl::TimeForCurrentMove().

template<class SEARCH, class THREAD>
SgMove GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy ( SgBlackWhite  toPlay  )  [private]

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

template<class SEARCH, class THREAD>
SgMpiSynchronizerHandle GoUctPlayer< SEARCH, THREAD >::GetMpiSynchronizer (  ) 

Definition at line 485 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer.

template<class SEARCH, class THREAD>
const GoUctPlayer< SEARCH, THREAD >::Statistics & GoUctPlayer< SEARCH, THREAD >::GetStatistics (  )  const

Definition at line 921 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_statistics.

template<class SEARCH, class THREAD>
const SEARCH & GoUctPlayer< SEARCH, THREAD >::GlobalSearch (  )  const

Definition at line 337 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_search.

template<class SEARCH, class THREAD>
SEARCH & GoUctPlayer< SEARCH, THREAD >::GlobalSearch (  ) 

Definition at line 331 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_search.

template<class SEARCH, class THREAD>
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 361 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_ignoreClock.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
std::size_t GoUctPlayer< SEARCH, THREAD >::MaxGames (  )  const

Limit on number of simulated games per move.

Definition at line 367 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_maxGames.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
std::string GoUctPlayer< SEARCH, THREAD >::Name (  )  const [virtual]

Reimplemented from GoPlayer.

Definition at line 927 of file GoUctPlayer.h.

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::OnBoardChange (  )  [virtual]

Reimplemented from GoPlayer.

Definition at line 933 of file GoUctPlayer.h.

References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::m_autoParam, GoUctPlayer< SEARCH, THREAD >::m_lastBoardSize, GoUctPlayer< SEARCH, THREAD >::m_search, GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters(), SgDebug(), and GoBoard::Size().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::Ponder (  )  [virtual]

Reimplemented from GoPlayer.

Definition at line 947 of file GoUctPlayer.h.

References GoPlayer::Board(), GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoBoardUtil::EndOfGame(), GOUCT_SEARCHMODE_UCT, GoUctPlayer< SEARCH, THREAD >::m_enablePonder, GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree, GoUctPlayer< SEARCH, THREAD >::m_searchMode, SG_BLACK, SG_WHITE, SgDebug(), and SgWarning().

template<class SEARCH, class THREAD>
std::size_t 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 379 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_resignMinGames.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
double GoUctPlayer< SEARCH, THREAD >::ResignThreshold (  )  const

Threshold for position value to resign.

Default is 0.01.

Definition at line 385 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_resignThreshold.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
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.

Definition at line 391 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
GoUctRootFilter & GoUctPlayer< SEARCH, THREAD >::RootFilter (  ) 

Return the current root filter.

Definition at line 397 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_rootFilter.

template<class SEARCH, class THREAD>
const GoUctSearch & GoUctPlayer< SEARCH, THREAD >::Search (  )  const [virtual]

Implements GoUctObjectWithSearch.

Definition at line 980 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_search.

template<class SEARCH, class THREAD>
GoUctSearch & GoUctPlayer< SEARCH, THREAD >::Search (  )  [virtual]

Implements GoUctObjectWithSearch.

Definition at line 974 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_search.

template<class SEARCH, class THREAD>
GoUctGlobalSearchMode GoUctPlayer< SEARCH, THREAD >::SearchMode (  )  const

See GoUctGlobalSearchMode.

Definition at line 403 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_searchMode.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetAutoParam ( bool  enable  ) 

See AutoParam().

Definition at line 409 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_autoParam.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters ( int  boardSize  )  [private]

Definition at line 986 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_resignThreshold, GoUctPlayer< SEARCH, THREAD >::m_timeControl, GoTimeControl::SetFastOpenMoves(), GoTimeControl::SetMinTime(), and GoTimeControl::SetRemainingConstant().

Referenced by GoUctPlayer< SEARCH, THREAD >::GoUctPlayer(), and GoUctPlayer< SEARCH, THREAD >::OnBoardChange().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetEarlyPass ( bool  enable  ) 

See EarlyPass().

Definition at line 415 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_earlyPass.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetEnablePonder ( bool  enable  ) 

See EnablePonder().

Definition at line 421 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_enablePonder.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetForcedOpeningMoves ( bool  enable  ) 

See ForcedOpeningMoves().

Definition at line 427 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetIgnoreClock ( bool  enable  ) 

See IgnoreClock().

Definition at line 433 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_ignoreClock.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetMaxGames ( std::size_t  maxGames  ) 

See MaxGames().

Definition at line 439 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_maxGames.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetMpiSynchronizer ( const SgMpiSynchronizerHandle synchronizerHandle  ) 

Definition at line 477 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer, and GoUctPlayer< SEARCH, THREAD >::m_search.

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetResignMinGames ( std::size_t  n  ) 

See ResignMinGames().

Definition at line 451 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_resignMinGames.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetResignThreshold ( double  threshold  ) 

See ResignThreshold().

Definition at line 457 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_resignThreshold.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetReuseSubtree ( bool  enable  ) 

See ReuseSubtree().

Definition at line 1004 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
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 463 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_rootFilter.

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetSearchMode ( GoUctGlobalSearchMode  mode  ) 

See GoUctGlobalSearchMode.

Definition at line 471 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_searchMode.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetUseRootFilter ( bool  enable  ) 

See UseRootFilter().

Definition at line 445 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_useRootFilter.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
void GoUctPlayer< SEARCH, THREAD >::SetWriteDebugOutput ( bool  flag  ) 

See WriteDebugOutput().

Definition at line 511 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput.

template<class SEARCH, class THREAD>
const SgDefaultTimeControl & GoUctPlayer< SEARCH, THREAD >::TimeControl (  )  const [virtual]

Implements SgObjectWithDefaultTimeControl.

Definition at line 1016 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_timeControl.

template<class SEARCH, class THREAD>
SgDefaultTimeControl & GoUctPlayer< SEARCH, THREAD >::TimeControl (  )  [virtual]

Implements SgObjectWithDefaultTimeControl.

Definition at line 1010 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_timeControl.

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::UseRootFilter (  )  const

Use the root filter.

Definition at line 373 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_useRootFilter.

Referenced by GoUctCommands::CmdParamPlayer().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::VerifyNeutralMove ( size_t  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 1025 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().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::WriteDebugOutput (  )  const

Print output of GoUctSearch.

Definition at line 505 of file GoUctPlayer.h.

References GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput.


Member Data Documentation

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_autoParam [private]

See AutoParam().

Definition at line 262 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::AutoParam(), GoUctPlayer< SEARCH, THREAD >::OnBoardChange(), and GoUctPlayer< SEARCH, THREAD >::SetAutoParam().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_earlyPass [private]

See EarlyPass().

Definition at line 280 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::EarlyPass(), and GoUctPlayer< SEARCH, THREAD >::SetEarlyPass().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_enablePonder [private]

See EnablePonder().

Definition at line 271 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::EnablePonder(), GoUctPlayer< SEARCH, THREAD >::Ponder(), and GoUctPlayer< SEARCH, THREAD >::SetEnablePonder().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_forcedOpeningMoves [private]

See ForcedOpeningMoves().

Definition at line 265 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::ForcedOpeningMoves(), GoUctPlayer< SEARCH, THREAD >::GenMove(), and GoUctPlayer< SEARCH, THREAD >::SetForcedOpeningMoves().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_ignoreClock [private]

See IgnoreClock().

Definition at line 268 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::IgnoreClock(), and GoUctPlayer< SEARCH, THREAD >::SetIgnoreClock().

template<class SEARCH, class THREAD>
int GoUctPlayer< SEARCH, THREAD >::m_lastBoardSize [private]

Used in OnBoardChange().

Definition at line 286 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::OnBoardChange().

template<class SEARCH, class THREAD>
std::size_t GoUctPlayer< SEARCH, THREAD >::m_maxGames [private]

Definition at line 288 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::MaxGames(), and GoUctPlayer< SEARCH, THREAD >::SetMaxGames().

template<class SEARCH, class THREAD>
SgMpiSynchronizerHandle GoUctPlayer< SEARCH, THREAD >::m_mpiSynchronizer [private]

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

template<class SEARCH, class THREAD>
boost::scoped_ptr<GoUctPlayoutPolicy<GoBoard> > GoUctPlayer< SEARCH, THREAD >::m_playoutPolicy [private]

Playout policy used if search mode is GOUCT_SEARCHMODE_PLAYOUTPOLICY.

Definition at line 302 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy().

template<class SEARCH, class THREAD>
GoUctPlayoutPolicyParam GoUctPlayer< SEARCH, THREAD >::m_playoutPolicyParam

Definition at line 77 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::GenMovePlayoutPolicy().

template<class SEARCH, class THREAD>
std::size_t GoUctPlayer< SEARCH, THREAD >::m_resignMinGames [private]

Definition at line 290 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::ResignMinGames(), and GoUctPlayer< SEARCH, THREAD >::SetResignMinGames().

template<class SEARCH, class THREAD>
double GoUctPlayer< SEARCH, THREAD >::m_resignThreshold [private]

See ResignThreshold().

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

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_reuseSubtree [private]

See ReuseSubtree().

Definition at line 277 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::Ponder(), GoUctPlayer< SEARCH, THREAD >::ReuseSubtree(), and GoUctPlayer< SEARCH, THREAD >::SetReuseSubtree().

template<class SEARCH, class THREAD>
boost::scoped_ptr<GoUctRootFilter> GoUctPlayer< SEARCH, THREAD >::m_rootFilter [private]

Definition at line 298 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::RootFilter(), and GoUctPlayer< SEARCH, THREAD >::SetRootFilter().

template<class SEARCH, class THREAD>
SEARCH GoUctPlayer< SEARCH, THREAD >::m_search [private]

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

template<class SEARCH, class THREAD>
GoUctGlobalSearchMode GoUctPlayer< SEARCH, THREAD >::m_searchMode [private]

See GoUctGlobalSearchMode.

Definition at line 259 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::Ponder(), GoUctPlayer< SEARCH, THREAD >::SearchMode(), and GoUctPlayer< SEARCH, THREAD >::SetSearchMode().

template<class SEARCH, class THREAD>
Statistics GoUctPlayer< SEARCH, THREAD >::m_statistics [private]

Definition at line 296 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::ClearStatistics(), GoUctPlayer< SEARCH, THREAD >::FindInitTree(), GoUctPlayer< SEARCH, THREAD >::GenMove(), and GoUctPlayer< SEARCH, THREAD >::GetStatistics().

template<class SEARCH, class THREAD>
GoTimeControl GoUctPlayer< SEARCH, THREAD >::m_timeControl [private]

Definition at line 294 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::SetDefaultParameters(), and GoUctPlayer< SEARCH, THREAD >::TimeControl().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_useRootFilter [private]

See UseRootFilter().

Definition at line 274 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::SetUseRootFilter(), and GoUctPlayer< SEARCH, THREAD >::UseRootFilter().

template<class SEARCH, class THREAD>
bool GoUctPlayer< SEARCH, THREAD >::m_writeDebugOutput [private]

Definition at line 306 of file GoUctPlayer.h.

Referenced by GoUctPlayer< SEARCH, THREAD >::DoSearch(), GoUctPlayer< SEARCH, THREAD >::GenMove(), GoUctPlayer< SEARCH, THREAD >::SetWriteDebugOutput(), and GoUctPlayer< SEARCH, THREAD >::WriteDebugOutput().


The documentation for this class was generated from the following file:


17 Jun 2010 Doxygen 1.4.7