Htp engine for Wolve. More...
#include <WolveEngine.hpp>
Public Member Functions | |
WolveEngine (int boardsize, WolvePlayer &player) | |
~WolveEngine () | |
Command Callbacks | |
void | WolveParam (HtpCommand &cmd) |
Command Callbacks | |
void | CmdLicense (HtpCommand &cmd) |
Displays usage license. | |
void | CmdGetAbsorbGroup (HtpCommand &cmd) |
Returns the set of stones this stone is part of. | |
void | CmdHandbookAdd (HtpCommand &cmd) |
Pulls moves out of the game for given color and appends them to the given handbook file. | |
void | CmdComputeInferior (HtpCommand &cmd) |
Outputs inferior cell info for current state. | |
void | CmdComputeFillin (HtpCommand &cmd) |
Computes fillin for the given board. | |
void | CmdComputeVulnerable (HtpCommand &cmd) |
Computes vulnerable cells on the current board for the given color. | |
void | CmdComputeReversible (HtpCommand &cmd) |
Computes reversible cells on the current board for the given color. | |
void | CmdComputeDominated (HtpCommand &cmd) |
Computes dominated cells on the current board for the given color. | |
void | CmdComputeDominatedOnCell (HtpCommand &cmd) |
void | CmdFindCombDecomp (HtpCommand &cmd) |
Tries to find a combinatorial decomposition of the board state. | |
void | CmdFindSplitDecomp (HtpCommand &cmd) |
Tries to find a group that crowds both opponent edges. | |
void | CmdEncodePattern (HtpCommand &cmd) |
Outputs pattern in encoded form. | |
void | CmdParamDfpn (HtpCommand &cmd) |
void | CmdEvalTwoDist (HtpCommand &cmd) |
void | CmdEvalResist (HtpCommand &cmd) |
void | CmdEvalResistDelta (HtpCommand &cmd) |
void | CmdEvalInfluence (HtpCommand &cmd) |
void | CmdMiscDebug (HtpCommand &cmd) |
Command Callbacks | |
virtual void | CmdAllLegalMoves (HtpCommand &cmd) |
Returns a list of all legal moves on current board position. | |
virtual void | CmdBoardID (HtpCommand &) |
Outputs BoardID of current position. | |
virtual void | CmdClearBoard (HtpCommand &cmd) |
Starts a new game with the same board size. | |
virtual void | CmdExec (HtpCommand &cmd) |
Executes HTP commands contained in given file. | |
virtual void | CmdFinalScore (HtpCommand &cmd) |
Returns a string with what we think the outcome of the game is. | |
virtual void | CmdGenMove (HtpCommand &cmd) |
Generates a move and handles time remaining. | |
virtual void | CmdRegGenMove (HtpCommand &cmd) |
Generates a move, but does not play it. | |
virtual void | CmdLoadSgf (HtpCommand &cmd) |
Loads game or position from given sgf. | |
virtual void | CmdName (HtpCommand &) |
Returns program's name. | |
virtual void | CmdNewGame (HtpCommand &cmd) |
Starts new game with the given board size. | |
virtual void | CmdParamGame (HtpCommand &cmd) |
Displays/changes parameters relating to the current game. | |
virtual void | CmdPlay (HtpCommand &) |
Plays a move. | |
virtual void | CmdShowboard (HtpCommand &) |
Displays the board. | |
virtual void | CmdTimeLeft (HtpCommand &) |
Displays time left for both players or given player. | |
virtual void | CmdUndo (HtpCommand &cmd) |
Undo the last move. | |
virtual void | CmdVersion (HtpCommand &) |
Returns program's version. | |
Protected Member Functions | |
virtual void | NewGame (int width, int height) |
Creates a new game on a board with given dimensions. | |
void | ParamPlayer (BenzenePlayer *player, HtpCommand &cmd) |
void | BeforeHandleCommand () |
Clears SgAbortFlag(). | |
void | BeforeWritingResponse () |
Does nothing. | |
virtual void | Play (HexColor color, HexPoint move) |
Plays a move. | |
void | SetPosition (const SgNode *node) |
Protected Attributes | |
HexEnvironment | m_pe |
Player's environment. | |
HexEnvironment | m_se |
Solver's environment. | |
DfsSolver | m_dfsSolver |
DfpnSolver | m_dfpnSolver |
boost::scoped_ptr< DfsHashTable > | m_dfsHashTable |
boost::scoped_ptr< DfpnHashTable > | m_dfpnHashTable |
boost::scoped_ptr< DfsDB > | m_dfsDB |
boost::scoped_ptr< DfpnDB > | m_dfpnDB |
SolverDBParameters | m_dfsParam |
SolverDBParameters | m_dfpnParam |
SolverDB< DfsHashTable, DfsDB, DfsData > | m_dfsPositions |
SolverDB< DfpnHashTable, DfpnDB, DfpnData > | m_dfpnPositions |
HexEnvironmentCommands | m_playerEnvCommands |
HexEnvironmentCommands | m_solverEnvCommands |
VCCommands | m_vcCommands |
DfsCommands | m_dfsSolverCommands |
DfpnCommands | m_dfpnSolverCommands |
bool | m_useParallelSolver |
StoneBoard | m_board |
Game | m_game |
Private Member Functions | |
double | TimeForMove (HexColor color) |
HexPoint | GenMove (HexColor color, bool useGameClock) |
Generates a move. | |
void | RegisterCmd (const std::string &name, GtpCallback< WolveEngine >::Method method) |
Private Attributes | |
WolvePlayer & | m_player |
boost::scoped_ptr< Book > | m_book |
BookCheck | m_bookCheck |
BookCommands | m_bookCommands |
CacheBook | m_cacheBook |
Htp engine for Wolve.
Definition at line 20 of file WolveEngine.hpp.
WolveEngine::WolveEngine | ( | int | boardsize, | |
WolvePlayer & | player | |||
) |
Definition at line 47 of file WolveEngine.cpp.
References m_bookCommands, BookCommands::Register(), RegisterCmd(), and WolveParam().
WolveEngine::~WolveEngine | ( | ) |
Definition at line 59 of file WolveEngine.cpp.
void HexHtpEngine::BeforeHandleCommand | ( | ) | [protected, inherited] |
Clears SgAbortFlag().
Definition at line 107 of file HexHtpEngine.cpp.
void HexHtpEngine::BeforeWritingResponse | ( | ) | [protected, inherited] |
Does nothing.
Definition at line 112 of file HexHtpEngine.cpp.
void HexHtpEngine::CmdAllLegalMoves | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Returns a list of all legal moves on current board position.
Definition at line 281 of file HexHtpEngine.cpp.
References Game::Board(), StoneBoard::GetLegal(), and HexHtpEngine::m_game.
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdBoardID | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Outputs BoardID of current position.
Definition at line 236 of file HexHtpEngine.cpp.
References Game::Board(), StoneBoard::GetBoardIDString(), and HexHtpEngine::m_game.
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdClearBoard | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Starts a new game with the same board size.
Definition at line 169 of file HexHtpEngine.cpp.
References StoneBoard::Height(), HexHtpEngine::m_board, HexHtpEngine::NewGame(), and StoneBoard::Width().
Referenced by HexHtpEngine::HexHtpEngine().
void BenzeneHtpEngine::CmdComputeDominated | ( | HtpCommand & | cmd | ) | [inherited] |
Computes dominated cells on the current board for the given color.
Definition at line 289 of file BenzeneHtpEngine.cpp.
References Game::Board(), GroupBuilder::Build(), HtpUtil::ColorArg(), ICEngine::FindDominated(), StoneBoard::GetEmpty(), HexBoard::GetGroups(), HexBoard::GetPatternState(), HexBoard::GetPosition(), HexEnvironment::ice, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexEnvironment::SyncBoard(), and PatternState::Update().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdComputeDominatedOnCell | ( | HtpCommand & | cmd | ) | [inherited] |
Definition at line 303 of file BenzeneHtpEngine.cpp.
References Game::Board(), HtpUtil::ColorArg(), EMPTY, ICEngine::FindDominatedOnCell(), StoneBoard::GetColor(), HexBoard::GetPatternState(), HexEnvironment::ice, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HtpUtil::MoveArg(), HexEnvironment::SyncBoard(), and PatternState::Update().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdComputeFillin | ( | HtpCommand & | cmd | ) | [inherited] |
Computes fillin for the given board.
Color argument affects order for computing vulnerable/presimplicial pairs.
Definition at line 244 of file BenzeneHtpEngine.cpp.
References Game::Board(), GroupBuilder::Build(), HtpUtil::ColorArg(), ICEngine::ComputeFillin(), HexBoard::GetGroups(), HexBoard::GetPatternState(), HexBoard::GetPosition(), HexEnvironment::ice, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexEnvironment::SyncBoard(), and PatternState::Update().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdComputeInferior | ( | HtpCommand & | cmd | ) | [inherited] |
Outputs inferior cell info for current state.
Usage: "compute-inferior [color]"
Definition at line 228 of file BenzeneHtpEngine.cpp.
References Game::Board(), GroupBuilder::Build(), HtpUtil::ColorArg(), ICEngine::ComputeInferiorCells(), HexBoard::GetGroups(), HexBoard::GetPatternState(), HexBoard::GetPosition(), HexEnvironment::ice, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexEnvironment::SyncBoard(), and PatternState::Update().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdComputeReversible | ( | HtpCommand & | cmd | ) | [inherited] |
Computes reversible cells on the current board for the given color.
Definition at line 274 of file BenzeneHtpEngine.cpp.
References Game::Board(), GroupBuilder::Build(), HtpUtil::ColorArg(), ICEngine::FindReversible(), StoneBoard::GetEmpty(), HexBoard::GetGroups(), HexBoard::GetPatternState(), HexBoard::GetPosition(), HexEnvironment::ice, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexEnvironment::SyncBoard(), and PatternState::Update().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdComputeVulnerable | ( | HtpCommand & | cmd | ) | [inherited] |
Computes vulnerable cells on the current board for the given color.
Definition at line 259 of file BenzeneHtpEngine.cpp.
References Game::Board(), GroupBuilder::Build(), HtpUtil::ColorArg(), ICEngine::FindVulnerable(), StoneBoard::GetEmpty(), HexBoard::GetGroups(), HexBoard::GetPatternState(), HexBoard::GetPosition(), HexEnvironment::ice, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexEnvironment::SyncBoard(), and PatternState::Update().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdEncodePattern | ( | HtpCommand & | cmd | ) | [inherited] |
Outputs pattern in encoded form.
Takes a list of cells, the first cell being the center of the pattern (that is not actually in the pattern). FIXME: clean this up!
Definition at line 363 of file BenzeneHtpEngine.cpp.
References Game::Board(), HexPointUtil::DeltaX(), HexPointUtil::DeltaY(), HexAssert, LogInfo(), HexHtpEngine::m_game, Pattern::MAX_EXTENSION, HtpUtil::MoveArg(), NUM_DIRECTIONS, Pattern::NUM_SLICES, and HexPointUtil::pointToCoords().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdEvalInfluence | ( | HtpCommand & | cmd | ) | [inherited] |
Definition at line 530 of file BenzeneHtpEngine.cpp.
References BLACK, Game::Board(), HtpUtil::ColorArg(), HexBoard::ComputeAll(), VCSetUtil::ConnectedTo(), HexBoard::Cons(), HexBoard::Const(), benzene_bitset< _Nb >::count(), EAST, VC::FULL, StoneBoard::GetEmpty(), HexBoard::GetGroups(), HexBoard::GetPosition(), HexAssert, ConstBoard::Interior(), StoneBoard::IsOccupied(), HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, NORTH, SOUTH, HexEnvironment::SyncBoard(), benzene_bitset< _Nb >::test(), WEST, and WHITE.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdEvalResist | ( | HtpCommand & | cmd | ) | [inherited] |
Definition at line 484 of file BenzeneHtpEngine.cpp.
References BLACK, HexEnvironment::brd, HtpUtil::ColorArg(), HexBoard::Const(), EVAL_INFINITY, Resistance::Evaluate(), HexBoard::GetPosition(), HexEval, ConstBoard::Interior(), StoneBoard::IsOccupied(), BenzeneHtpEngine::m_pe, Resistance::Resist(), Resistance::Score(), and WHITE.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdEvalResistDelta | ( | HtpCommand & | cmd | ) | [inherited] |
Definition at line 507 of file BenzeneHtpEngine.cpp.
References Game::Board(), HtpUtil::ColorArg(), HexBoard::ComputeAll(), Resistance::Evaluate(), StoneBoard::GetEmpty(), HexBoard::GetPosition(), HexEval, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexBoard::PlayMove(), Resistance::Score(), HexEnvironment::SyncBoard(), and HexBoard::UndoMove().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdEvalTwoDist | ( | HtpCommand & | cmd | ) | [inherited] |
Definition at line 464 of file BenzeneHtpEngine.cpp.
References TwoDistance::ADJACENT, Game::Board(), HtpUtil::ColorArg(), HexBoard::ComputeAll(), HexBoard::Const(), EVAL_INFINITY, TwoDistance::Evaluate(), HexBoard::GetPosition(), HexEval, ConstBoard::Interior(), StoneBoard::IsOccupied(), HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, TwoDistance::Score(), and HexEnvironment::SyncBoard().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void HexHtpEngine::CmdExec | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Executes HTP commands contained in given file.
Definition at line 131 of file HexHtpEngine.cpp.
References LogInfo().
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdFinalScore | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Returns a string with what we think the outcome of the game is.
Value will be "B+" for a black win, and "W+" for a white win.
Definition at line 267 of file HexHtpEngine.cpp.
References BLACK, Game::Board(), GroupBuilder::Build(), Groups::GetWinner(), HexHtpEngine::m_game, and WHITE.
Referenced by HexHtpEngine::HexHtpEngine().
void BenzeneHtpEngine::CmdFindCombDecomp | ( | HtpCommand & | cmd | ) | [inherited] |
Tries to find a combinatorial decomposition of the board state.
Outputs cells in the vc if there is a decomposition. Usage: 'find-comb-decomp [color]'
Definition at line 324 of file BenzeneHtpEngine.cpp.
References BLACK, Game::Board(), HtpUtil::ColorArg(), HexBoard::ComputeAll(), BoardUtils::FindCombinatorialDecomposition(), HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, HexBoard::SetUseDecompositions(), HexEnvironment::SyncBoard(), HexPointUtil::ToString(), and HexBoard::UseDecompositions().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdFindSplitDecomp | ( | HtpCommand & | cmd | ) | [inherited] |
Tries to find a group that crowds both opponent edges.
Outputs group that crowds both edges if one exists. Usage: 'find-split-decomp [color]'
FIXME: Dump inferior cell info as well? It's hard to see what's actually going on if it is not displayed.
Definition at line 347 of file BenzeneHtpEngine.cpp.
References BLACK, Game::Board(), HtpUtil::ColorArg(), HexBoard::ComputeAll(), BoardUtils::FindSplittingDecomposition(), HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, and HexEnvironment::SyncBoard().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void HexHtpEngine::CmdGenMove | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Generates a move and handles time remaining.
Definition at line 183 of file HexHtpEngine.cpp.
References HtpUtil::ColorArg(), HexHtpEngine::GenMove(), GameUtil::IsGameOver(), LogWarning(), HexHtpEngine::m_game, HexHtpEngine::Play(), RESIGN, Game::SetTimeRemaining(), and Game::TimeRemaining().
Referenced by HexHtpEngine::HexHtpEngine().
void BenzeneHtpEngine::CmdGetAbsorbGroup | ( | HtpCommand & | cmd | ) | [inherited] |
Returns the set of stones this stone is part of.
Definition at line 123 of file BenzeneHtpEngine.cpp.
References Game::Board(), GroupBuilder::Build(), Group::Captain(), EMPTY, StoneBoard::GetColor(), Groups::GetGroup(), HexHtpEngine::m_game, and HtpUtil::MoveArg().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdHandbookAdd | ( | HtpCommand & | cmd | ) | [inherited] |
Pulls moves out of the game for given color and appends them to the given handbook file.
Skips the first move (ie, the move from the empty board). Performs no duplicate checking. Usage: handbook-add [handbook.txt] [sgf file] [color] [max move #]
Definition at line 148 of file BenzeneHtpEngine.cpp.
References Game::Board(), HtpUtil::ColorArg(), FIRST_TO_PLAY, StoneBoard::Height(), HexAssert, HexHtpEngine::m_game, HexSgUtil::NodeHasSetupInfo(), HexSgUtil::SgColorToHexColor(), HexSgUtil::SgPointToHexPoint(), HashUtil::toString(), and StoneBoard::Width().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void BenzeneHtpEngine::CmdLicense | ( | HtpCommand & | cmd | ) | [inherited] |
Displays usage license.
Definition at line 107 of file BenzeneHtpEngine.cpp.
References Get().
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void HexHtpEngine::CmdLoadSgf | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Loads game or position from given sgf.
Sets position to given move number or the last move of the game if none is given.
Definition at line 311 of file HexHtpEngine.cpp.
References Game::Board(), StoneBoard::Height(), LogWarning(), HexHtpEngine::m_game, HexHtpEngine::NewGame(), HexSgUtil::NodeHasSetupInfo(), HexHtpEngine::Play(), HexHtpEngine::SetPosition(), HexSgUtil::SgColorToHexColor(), and HexSgUtil::SgPointToHexPoint().
Referenced by HexHtpEngine::HexHtpEngine().
void BenzeneHtpEngine::CmdMiscDebug | ( | HtpCommand & | cmd | ) | [inherited] |
Definition at line 581 of file BenzeneHtpEngine.cpp.
References HexEnvironment::brd, and BenzeneHtpEngine::m_pe.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
void HexHtpEngine::CmdName | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Returns program's name.
Definition at line 119 of file HexHtpEngine.cpp.
References Get().
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdNewGame | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Starts new game with the given board size.
Definition at line 156 of file HexHtpEngine.cpp.
References MAX_HEIGHT, MAX_WIDTH, and HexHtpEngine::NewGame().
Referenced by HexHtpEngine::HexHtpEngine().
void BenzeneHtpEngine::CmdParamDfpn | ( | HtpCommand & | cmd | ) | [inherited] |
void HexHtpEngine::CmdParamGame | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Displays/changes parameters relating to the current game.
Parameters:
allow_swap
See Game::AllowSwap game_time
See Game::GameTime Definition at line 371 of file HexHtpEngine.cpp.
References Game::AllowSwap(), Game::GameTime(), Game::History(), HexHtpEngine::m_game, Game::SetAllowSwap(), and Game::SetGameTime().
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdPlay | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Plays a move.
Definition at line 176 of file HexHtpEngine.cpp.
References HtpUtil::ColorArg(), HtpUtil::MoveArg(), and HexHtpEngine::Play().
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdRegGenMove | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Generates a move, but does not play it.
Sets random seed.
Definition at line 208 of file HexHtpEngine.cpp.
References HtpUtil::ColorArg(), HexHtpEngine::GenMove(), GameUtil::IsGameOver(), HexHtpEngine::m_game, and RESIGN.
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdShowboard | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Displays the board.
Definition at line 229 of file HexHtpEngine.cpp.
References Game::Board(), and HexHtpEngine::m_game.
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdTimeLeft | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Displays time left for both players or given player.
Definition at line 243 of file HexHtpEngine.cpp.
References BLACK, HtpUtil::ColorArg(), Time::Formatted(), HexHtpEngine::m_game, Game::SetTimeRemaining(), Game::TimeRemaining(), and WHITE.
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdUndo | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Undo the last move.
Definition at line 222 of file HexHtpEngine.cpp.
References HexHtpEngine::m_game, and Game::UndoMove().
Referenced by HexHtpEngine::HexHtpEngine().
void HexHtpEngine::CmdVersion | ( | HtpCommand & | cmd | ) | [virtual, inherited] |
Returns program's version.
Definition at line 125 of file HexHtpEngine.cpp.
References Get().
Referenced by HexHtpEngine::HexHtpEngine().
Generates a move.
Implements HexHtpEngine.
Definition at line 79 of file WolveEngine.cpp.
References BookCheck::BestMove(), Game::Board(), HexEnvironment::brd, CacheBook::Exists(), BenzenePlayer::GenMove(), PlayAndSolve::GenMove(), INVALID_POINT, m_bookCheck, m_cacheBook, BenzeneHtpEngine::m_dfpnPositions, BenzeneHtpEngine::m_dfpnSolver, HexHtpEngine::m_game, BenzeneHtpEngine::m_pe, m_player, BenzeneHtpEngine::m_se, BenzeneHtpEngine::m_useParallelSolver, SwapCheck::PlaySwap(), SWAP_PIECES, HexEnvironment::SyncBoard(), and TimeForMove().
void BenzeneHtpEngine::NewGame | ( | int | width, | |
int | height | |||
) | [protected, virtual, inherited] |
Creates a new game on a board with given dimensions.
Reimplemented from HexHtpEngine.
Definition at line 94 of file BenzeneHtpEngine.cpp.
References BenzeneHtpEngine::m_pe, BenzeneHtpEngine::m_se, and HexEnvironment::NewGame().
void BenzeneHtpEngine::ParamPlayer | ( | BenzenePlayer * | player, | |
HtpCommand & | cmd | |||
) | [protected, inherited] |
Plays a move.
Definition at line 72 of file HexHtpEngine.cpp.
References Game::INVALID_MOVE, HexHtpEngine::m_game, Game::OCCUPIED_CELL, Game::PlayMove(), and RESIGN.
Referenced by HexHtpEngine::CmdGenMove(), HexHtpEngine::CmdLoadSgf(), HexHtpEngine::CmdPlay(), and HexHtpEngine::SetPosition().
void WolveEngine::RegisterCmd | ( | const std::string & | name, | |
GtpCallback< WolveEngine >::Method | method | |||
) | [private] |
Definition at line 65 of file WolveEngine.cpp.
Referenced by WolveEngine().
void HexHtpEngine::SetPosition | ( | const SgNode * | node | ) | [protected, inherited] |
Definition at line 293 of file HexHtpEngine.cpp.
References BLACK, Game::Board(), HexSgUtil::GetSetupPosition(), StoneBoard::Height(), HexHtpEngine::m_game, HexHtpEngine::Play(), and WHITE.
Referenced by HexHtpEngine::CmdLoadSgf().
double WolveEngine::TimeForMove | ( | HexColor | color | ) | [private] |
Definition at line 73 of file WolveEngine.cpp.
References HexHtpEngine::m_game, and Game::TimeRemaining().
Referenced by GenMove().
void WolveEngine::WolveParam | ( | HtpCommand & | cmd | ) |
Definition at line 103 of file WolveEngine.cpp.
References WolveSearch::BackupIceInfo(), HexAbSearch::GuiFx(), m_player, BenzeneHtpEngine::m_useParallelSolver, WolvePlayer::PanicTime(), WolvePlayer::PlyWidth(), MiscUtil::PrintVector(), WolvePlayer::Search(), WolvePlayer::SearchDepths(), BenzenePlayer::SearchSingleton(), WolveSearch::SetBackupIceInfo(), HexAbSearch::SetGuiFx(), WolvePlayer::SetPanicTime(), WolvePlayer::SetPlyWidth(), WolvePlayer::SetSearchDepths(), and BenzenePlayer::SetSearchSingleton().
Referenced by WolveEngine().
StoneBoard HexHtpEngine::m_board [protected, inherited] |
Definition at line 86 of file HexHtpEngine.hpp.
Referenced by HexHtpEngine::CmdClearBoard(), HexHtpEngine::HexHtpEngine(), and HexHtpEngine::NewGame().
boost::scoped_ptr<Book> WolveEngine::m_book [private] |
Definition at line 45 of file WolveEngine.hpp.
BookCheck WolveEngine::m_bookCheck [private] |
Definition at line 47 of file WolveEngine.hpp.
Referenced by GenMove().
BookCommands WolveEngine::m_bookCommands [private] |
Definition at line 49 of file WolveEngine.hpp.
Referenced by WolveEngine().
CacheBook WolveEngine::m_cacheBook [private] |
Definition at line 51 of file WolveEngine.hpp.
Referenced by GenMove().
boost::scoped_ptr<DfpnDB> BenzeneHtpEngine::m_dfpnDB [protected, inherited] |
Definition at line 101 of file BenzeneHtpEngine.hpp.
boost::scoped_ptr<DfpnHashTable> BenzeneHtpEngine::m_dfpnHashTable [protected, inherited] |
Definition at line 97 of file BenzeneHtpEngine.hpp.
SolverDBParameters BenzeneHtpEngine::m_dfpnParam [protected, inherited] |
Definition at line 105 of file BenzeneHtpEngine.hpp.
SolverDB<DfpnHashTable, DfpnDB, DfpnData> BenzeneHtpEngine::m_dfpnPositions [protected, inherited] |
Definition at line 109 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneTestEngine::CmdSetPlayer(), MoHexEngine::DoSearch(), and GenMove().
DfpnSolver BenzeneHtpEngine::m_dfpnSolver [protected, inherited] |
Definition at line 93 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneTestEngine::CmdSetPlayer(), MoHexEngine::DoSearch(), and GenMove().
DfpnCommands BenzeneHtpEngine::m_dfpnSolverCommands [protected, inherited] |
Definition at line 119 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
boost::scoped_ptr<DfsDB> BenzeneHtpEngine::m_dfsDB [protected, inherited] |
Definition at line 99 of file BenzeneHtpEngine.hpp.
boost::scoped_ptr<DfsHashTable> BenzeneHtpEngine::m_dfsHashTable [protected, inherited] |
Definition at line 95 of file BenzeneHtpEngine.hpp.
SolverDBParameters BenzeneHtpEngine::m_dfsParam [protected, inherited] |
Definition at line 103 of file BenzeneHtpEngine.hpp.
SolverDB<DfsHashTable, DfsDB, DfsData> BenzeneHtpEngine::m_dfsPositions [protected, inherited] |
Definition at line 107 of file BenzeneHtpEngine.hpp.
DfsSolver BenzeneHtpEngine::m_dfsSolver [protected, inherited] |
Definition at line 91 of file BenzeneHtpEngine.hpp.
DfsCommands BenzeneHtpEngine::m_dfsSolverCommands [protected, inherited] |
Definition at line 117 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
Game HexHtpEngine::m_game [protected, inherited] |
Definition at line 88 of file HexHtpEngine.hpp.
Referenced by HexHtpEngine::CmdAllLegalMoves(), HexHtpEngine::CmdBoardID(), BenzeneHtpEngine::CmdComputeDominated(), BenzeneHtpEngine::CmdComputeDominatedOnCell(), BenzeneHtpEngine::CmdComputeFillin(), BenzeneHtpEngine::CmdComputeInferior(), BenzeneHtpEngine::CmdComputeReversible(), BenzeneHtpEngine::CmdComputeVulnerable(), BenzeneHtpEngine::CmdEncodePattern(), BenzeneHtpEngine::CmdEvalInfluence(), BenzeneHtpEngine::CmdEvalResistDelta(), BenzeneHtpEngine::CmdEvalTwoDist(), HexHtpEngine::CmdFinalScore(), BenzeneHtpEngine::CmdFindCombDecomp(), BenzeneHtpEngine::CmdFindSplitDecomp(), HexHtpEngine::CmdGenMove(), BenzeneHtpEngine::CmdGetAbsorbGroup(), BenzeneHtpEngine::CmdHandbookAdd(), HexHtpEngine::CmdLoadSgf(), HexHtpEngine::CmdParamGame(), HexHtpEngine::CmdRegGenMove(), HexHtpEngine::CmdShowboard(), HexHtpEngine::CmdTimeLeft(), HexHtpEngine::CmdUndo(), MoHexEngine::DoSearch(), GenMove(), MoHexEngine::GenMove(), BenzeneTestEngine::GenMove(), HexHtpEngine::NewGame(), HexHtpEngine::Play(), HexHtpEngine::SetPosition(), TimeForMove(), MoHexEngine::TimeForMove(), and BenzeneTestEngine::TimeForMove().
HexEnvironment BenzeneHtpEngine::m_pe [protected, inherited] |
Player's environment.
Definition at line 86 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneHtpEngine::CmdComputeDominated(), BenzeneHtpEngine::CmdComputeDominatedOnCell(), BenzeneHtpEngine::CmdComputeFillin(), BenzeneHtpEngine::CmdComputeInferior(), BenzeneHtpEngine::CmdComputeReversible(), BenzeneHtpEngine::CmdComputeVulnerable(), BenzeneHtpEngine::CmdEvalInfluence(), BenzeneHtpEngine::CmdEvalResist(), BenzeneHtpEngine::CmdEvalResistDelta(), BenzeneHtpEngine::CmdEvalTwoDist(), BenzeneHtpEngine::CmdFindCombDecomp(), BenzeneHtpEngine::CmdFindSplitDecomp(), BenzeneHtpEngine::CmdMiscDebug(), MoHexEngine::DoSearch(), GenMove(), BenzeneTestEngine::GenMove(), and BenzeneHtpEngine::NewGame().
WolvePlayer& WolveEngine::m_player [private] |
Definition at line 43 of file WolveEngine.hpp.
Referenced by GenMove(), and WolveParam().
HexEnvironmentCommands BenzeneHtpEngine::m_playerEnvCommands [protected, inherited] |
Definition at line 111 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
HexEnvironment BenzeneHtpEngine::m_se [protected, inherited] |
Solver's environment.
Definition at line 89 of file BenzeneHtpEngine.hpp.
Referenced by MoHexEngine::DoSearch(), GenMove(), and BenzeneHtpEngine::NewGame().
HexEnvironmentCommands BenzeneHtpEngine::m_solverEnvCommands [protected, inherited] |
Definition at line 113 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().
bool BenzeneHtpEngine::m_useParallelSolver [protected, inherited] |
Definition at line 121 of file BenzeneHtpEngine.hpp.
Referenced by MoHexEngine::DoSearch(), GenMove(), MoHexEngine::MoHexParam(), and WolveParam().
VCCommands BenzeneHtpEngine::m_vcCommands [protected, inherited] |
Definition at line 115 of file BenzeneHtpEngine.hpp.
Referenced by BenzeneHtpEngine::BenzeneHtpEngine().