Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

DfsCommands Class Reference

Commands for building/inspecting virtual connections. More...

#include <DfsCommands.hpp>

List of all members.

Public Member Functions

 DfsCommands (Game &game, HexEnvironment &env, DfsSolver &solver, boost::scoped_ptr< DfsHashTable > &tt, boost::scoped_ptr< DfsDB > &db, DfsStates &positions)
void Register (GtpEngine &engine)

Private Member Functions

void Register (GtpEngine &engine, const std::string &command, GtpCallback< DfsCommands >::Method method)
void CmdParamSolver (HtpCommand &cmd)
void CmdParamSolverDB (HtpCommand &cmd)
void CmdSolveState (HtpCommand &cmd)
 Solves the given state.
void CmdSolverClearTT (HtpCommand &cmd)
 Clears the current TT.
void CmdSolverFindWinning (HtpCommand &cmd)
 Finds all winning moves in this state by calling 'solve-state' on each child move.
void CmdDBOpen (HtpCommand &cmd)
 Opens a database.
void CmdDBClose (HtpCommand &cmd)
 Closes an open database.
void CmdDBStat (HtpCommand &cmd)
 Prints database statistics.
void CmdGetState (HtpCommand &cmd)
 Dumps info from on current state.
void CmdGetPV (HtpCommand &cmd)
 Prints PV from the current state from the last search.
void CmdHistogram (HtpCommand &cmd)
 Prints histogram of last search.

Private Attributes

Gamem_game
HexEnvironmentm_env
DfsSolverm_solver
boost::scoped_ptr< DfsHashTable > & m_tt
boost::scoped_ptr< DfsDB > & m_db
DfsStatesm_positions

Detailed Description

Commands for building/inspecting virtual connections.

Definition at line 20 of file DfsCommands.hpp.


Constructor & Destructor Documentation

DfsCommands::DfsCommands ( Game game,
HexEnvironment env,
DfsSolver solver,
boost::scoped_ptr< DfsHashTable > &  tt,
boost::scoped_ptr< DfsDB > &  db,
DfsStates positions 
)

Definition at line 16 of file DfsCommands.cpp.


Member Function Documentation

void DfsCommands::CmdDBClose ( HtpCommand cmd  )  [private]

Closes an open database.

Definition at line 226 of file DfsCommands.cpp.

References m_db.

Referenced by Register().

void DfsCommands::CmdDBOpen ( HtpCommand cmd  )  [private]

Opens a database.

Usage: "db-open [filename]"

Definition at line 212 of file DfsCommands.cpp.

References m_db, and BenzeneException::what().

Referenced by Register().

void DfsCommands::CmdDBStat ( HtpCommand cmd  )  [private]

Prints database statistics.

Definition at line 289 of file DfsCommands.cpp.

References m_db.

Referenced by Register().

void DfsCommands::CmdGetPV ( HtpCommand cmd  )  [private]

Prints PV from the current state from the last search.

Definition at line 305 of file DfsCommands.cpp.

References Game::Board(), HtpUtil::ColorArg(), SolverDBUtil::GetVariation(), m_game, m_positions, and HexPointUtil::ToString().

Referenced by Register().

void DfsCommands::CmdGetState ( HtpCommand cmd  )  [private]
void DfsCommands::CmdHistogram ( HtpCommand cmd  )  [private]

Prints histogram of last search.

Definition at line 298 of file DfsCommands.cpp.

References DfsSolver::Histogram(), m_solver, and DfsHistogram::Write().

Referenced by Register().

void DfsCommands::CmdParamSolver ( HtpCommand cmd  )  [private]
void DfsCommands::CmdParamSolverDB ( HtpCommand cmd  )  [private]
void DfsCommands::CmdSolverClearTT ( HtpCommand cmd  )  [private]

Clears the current TT.

Definition at line 154 of file DfsCommands.cpp.

References m_tt, and UNUSED().

Referenced by Register().

void DfsCommands::CmdSolverFindWinning ( HtpCommand cmd  )  [private]
void DfsCommands::CmdSolveState ( HtpCommand cmd  )  [private]
void DfsCommands::Register ( GtpEngine &  engine,
const std::string &  command,
GtpCallback< DfsCommands >::Method  method 
) [private]

Definition at line 46 of file DfsCommands.cpp.

void DfsCommands::Register ( GtpEngine &  engine  ) 

Member Data Documentation

boost::scoped_ptr<DfsDB>& DfsCommands::m_db [private]

Definition at line 39 of file DfsCommands.hpp.

Referenced by CmdDBClose(), CmdDBOpen(), and CmdDBStat().

Definition at line 33 of file DfsCommands.hpp.

Referenced by CmdSolverFindWinning(), and CmdSolveState().

Definition at line 31 of file DfsCommands.hpp.

Referenced by CmdGetPV(), CmdGetState(), CmdSolverFindWinning(), and CmdSolveState().

Definition at line 35 of file DfsCommands.hpp.

Referenced by CmdHistogram(), CmdParamSolver(), CmdSolverFindWinning(), and CmdSolveState().

boost::scoped_ptr<DfsHashTable>& DfsCommands::m_tt [private]

Definition at line 37 of file DfsCommands.hpp.

Referenced by CmdParamSolver(), and CmdSolverClearTT().


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


6 Jan 2011 Doxygen 1.6.3