Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Member Functions | Private Attributes

GoUctBookBuilderCommands< PLAYER > Class Template Reference

Commands for autobook. More...

#include <GoUctBookBuilderCommands.h>

List of all members.

Public Member Functions

 GoUctBookBuilderCommands (const GoBoard &bd, GoPlayer *&player, boost::scoped_ptr< GoAutoBook > &book)
 Constructor.
void AddGoGuiAnalyzeCommands (GtpCommand &cmd)
void Register (GtpEngine &engine)
Command Callbacks

void CmdOpen (GtpCommand &cmd)
 Opens a autobook.
void CmdClose (GtpCommand &cmd)
 Closes the current autobook.
void CmdSave (GtpCommand &cmd)
 Saves the current book to its file.
void CmdExpand (GtpCommand &cmd)
 Expands book from current state using the current player.
void CmdCover (GtpCommand &cmd)
 Covers the given set of lines in the current book.
void CmdAdditiveCover (GtpCommand &cmd)
 Covers the given set of lines in the current book.
void CmdRefresh (GtpCommand &cmd)
 Refreshes the current book.
void CmdMerge (GtpCommand &cmd)
 Merges the current book with the given book.
void CmdParam (GtpCommand &cmd)
void CmdScores (GtpCommand &cmd)
 Displays scores for all children.
void CmdStateInfo (GtpCommand &cmd)
 Returns info on current state.
void CmdCounts (GtpCommand &cmd)
 Displays counts for all children.
void CmdPriority (GtpCommand &cmd)
 Displays expansion priority for all children.
void CmdLoadDisabled (GtpCommand &cmd)
 Load a list of disabled lines.
void CmdTruncateByDepth (GtpCommand &cmd)
 Truncates the book to the given depth.
void CmdImport (GtpCommand &cmd)
 Import values directly into the current book.
void CmdExport (GtpCommand &cmd)
 Exports book to old book format.
void CmdMainLine (GtpCommand &cmd)
 Displays the mainline according to the current selection type.

Private Member Functions

PLAYER & Player ()
void Register (GtpEngine &e, const std::string &command, typename GtpCallback< GoUctBookBuilderCommands >::Method method)
void ShowInfluence (GtpCommand &cmd, GoAutoBookState &state)
GoAutoBookMoveSelectType MoveSelectArg (const GtpCommand &cmd, std::size_t number)
std::string MoveSelectToString (GoAutoBookMoveSelectType moveSelect)

Private Attributes

const GoBoardm_bd
GoPlayer *& m_player
boost::scoped_ptr< GoAutoBook > & m_book
GoUctBookBuilder< PLAYER > m_bookBuilder
GoAutoBookParam m_param

Detailed Description

template<class PLAYER>
class GoUctBookBuilderCommands< PLAYER >

Commands for autobook.

Definition at line 25 of file GoUctBookBuilderCommands.h.


Constructor & Destructor Documentation

template<class PLAYER >
GoUctBookBuilderCommands< PLAYER >::GoUctBookBuilderCommands ( const GoBoard bd,
GoPlayer *&  player,
boost::scoped_ptr< GoAutoBook > &  book 
)

Constructor.

Parameters:
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 a PLAYER.
book 

Definition at line 111 of file GoUctBookBuilderCommands.h.


Member Function Documentation

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::AddGoGuiAnalyzeCommands ( GtpCommand cmd  ) 

Definition at line 122 of file GoUctBookBuilderCommands.h.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdAdditiveCover ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdClose ( GtpCommand cmd  ) 

Closes the current autobook.

Definition at line 274 of file GoUctBookBuilderCommands.h.

References GtpCommand::CheckArgNone(), and GoUctBookBuilderCommands< PLAYER >::m_book.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdCounts ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdCover ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdExpand ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdExport ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdImport ( GtpCommand cmd  ) 

Import values directly into the current book.

File format is (hash, value) pairs, one per line.

Definition at line 393 of file GoUctBookBuilderCommands.h.

References GtpCommand::Arg(), and GoUctBookBuilderCommands< PLAYER >::m_book.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdLoadDisabled ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdMainLine ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdMerge ( GtpCommand cmd  ) 

Merges the current book with the given book.

See GoAutoBook::Merge().

Definition at line 382 of file GoUctBookBuilderCommands.h.

References GtpCommand::Arg(), GoUctBookBuilderCommands< PLAYER >::m_book, and GoUctBookBuilderCommands< PLAYER >::m_param.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdOpen ( GtpCommand cmd  ) 

Opens a autobook.

Closes any previously opened book.

Definition at line 267 of file GoUctBookBuilderCommands.h.

References GtpCommand::Arg(), GoUctBookBuilderCommands< PLAYER >::m_book, and GoUctBookBuilderCommands< PLAYER >::m_param.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdParam ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdPriority ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdRefresh ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdSave ( GtpCommand cmd  ) 

Saves the current book to its file.

Definition at line 282 of file GoUctBookBuilderCommands.h.

References GtpCommand::CheckArgNone(), and GoUctBookBuilderCommands< PLAYER >::m_book.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdScores ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdStateInfo ( GtpCommand cmd  ) 
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::CmdTruncateByDepth ( GtpCommand cmd  ) 

Truncates the book to the given depth.

Internal nodes that become leaves have their counts set to 0.

Definition at line 422 of file GoUctBookBuilderCommands.h.

References GtpCommand::Arg(), GtpCommand::ArgMin(), GtpCommand::CheckNuArg(), GoUctBookBuilderCommands< PLAYER >::m_bd, GoUctBookBuilderCommands< PLAYER >::m_book, and GoUctBookBuilderCommands< PLAYER >::m_param.

template<class PLAYER >
GoAutoBookMoveSelectType GoUctBookBuilderCommands< PLAYER >::MoveSelectArg ( const GtpCommand cmd,
std::size_t  number 
) [private]
template<class PLAYER >
std::string GoUctBookBuilderCommands< PLAYER >::MoveSelectToString ( GoAutoBookMoveSelectType  moveSelect  )  [private]
template<class PLAYER >
PLAYER & GoUctBookBuilderCommands< PLAYER >::Player (  )  [private]
template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::Register ( GtpEngine e,
const std::string &  command,
typename GtpCallback< GoUctBookBuilderCommands< PLAYER > >::Method  method 
) [private]

Definition at line 185 of file GoUctBookBuilderCommands.h.

References GtpEngine::Register().

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::Register ( GtpEngine engine  ) 

Definition at line 146 of file GoUctBookBuilderCommands.h.

template<class PLAYER >
void GoUctBookBuilderCommands< PLAYER >::ShowInfluence ( GtpCommand cmd,
GoAutoBookState state 
) [private]

Member Data Documentation

template<class PLAYER >
const GoBoard& GoUctBookBuilderCommands< PLAYER >::m_bd [private]
template<class PLAYER >
boost::scoped_ptr<GoAutoBook>& GoUctBookBuilderCommands< PLAYER >::m_book [private]
template<class PLAYER >
GoUctBookBuilder<PLAYER> GoUctBookBuilderCommands< PLAYER >::m_bookBuilder [private]
template<class PLAYER >
GoAutoBookParam GoUctBookBuilderCommands< PLAYER >::m_param [private]
template<class PLAYER >
GoPlayer*& GoUctBookBuilderCommands< PLAYER >::m_player [private]

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


Sun Mar 13 2011 Doxygen 1.7.1