Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
|
game representation, singleton More...
#include <game.h>
Public Member Functions | |
bGame () | |
~bGame () override | |
bGame (bGame const &)=delete | |
bGame (bGame &&)=delete | |
bGame & | operator= (bGame const &)=delete |
bGame & | operator= (bGame &&)=delete |
operator std::string () const | |
void | newGame () |
void | setFEN (std::string const &fenstr) |
void | setFENInitialPos () |
bool | playGameMove (bCoordMove const &coordmove) |
bool | playGameMoveSeries (std::string const &coordmoves) |
all moves in a single string | |
void | revertGameMove () |
required for Winboard protocol, not supported in UCI (except debug) | |
std::string | getResult (gameResult_t rs) const |
void | setResult (gameResult_t rs) |
gameResult_t | getResult () const |
void | setExpecting (std::string const &s) |
Following command should return value as expected. | |
bool | isExpecting (std::string const &s) const |
std::string const & | getExpecting () const |
bEpdResult | evalEpdPosition (bFen const &fen, bEpdOpCodes &opcodes) |
do actual epd position test | |
bEpdResult | evalPerftResult (bFen const &fen, bEpdOpCodes &opcodes) |
check perft result for different depths D[1-99] # perft test - nodes | |
bBoard & | getCurrentPosition () |
void | setLevel (bLevel const &l) |
bLevel & | getLevel () |
positions_t & | getPositions () |
void | setPlayerName (std::string const &n) |
void | DoSearch () |
Start search thread and exit in case of batch mode, will wait until end of search. | |
void | AbortSearch () |
void | WaitForSearchEnd () |
Called in separate thread, sure to terminate normally. | |
int64_t | DoPerft (bSearchAlgorithm &sa, int const d) |
do perft search at depth | |
bScore | EvalForPlayer (bBoard const &b) |
gameResult_t | EvalFinalScore (bBoard const &b) |
![]() | |
bConfigurableGame () | |
virtual | ~bConfigurableGame () |
bConfigurableGame (bConfigurableGame const &)=delete | |
bConfigurableGame & | operator= (bConfigurableGame const &)=delete |
bConfigurableGame (bConfigurableGame &&)=delete | |
bConfigurableGame & | operator= (bConfigurableGame &&)=delete |
void | setAlgorithm (std::string const &alg) |
bSearchAlgorithm * | getAlgorithm () const |
void | setEval (std::string const &e) |
bPositionEvaluation * | getEval () const |
|
delete |
|
delete |
bGame::operator std::string | ( | ) | const |
void bGame::newGame | ( | ) |
Definition at line 28 of file game.cpp.
Referenced by bGame(), evalEpdPosition(), evalPerftResult(), cmd_ucinewgame::execute(), cmd_bench::execute(), cmd_new::execute(), main(), and bel_debug::run_bench().
void bGame::setFEN | ( | std::string const & | fenstr | ) |
Definition at line 54 of file game.cpp.
Referenced by evalEpdPosition(), evalPerftResult(), cmd_position::execute(), cmd_setboard::execute(), and bel_debug::run_bench().
void bGame::setFENInitialPos | ( | ) |
Definition at line 46 of file game.cpp.
Referenced by cmd_position::execute(), cmd_bench::execute(), cmd_new::execute(), main(), and bel_debug::run_bench().
bool bGame::playGameMove | ( | bCoordMove const & | coordmove | ) |
Definition at line 208 of file game.cpp.
Referenced by WaitForSearchEnd().
bool bGame::playGameMoveSeries | ( | std::string const & | coordmoves | ) |
void bGame::revertGameMove | ( | ) |
required for Winboard protocol, not supported in UCI (except debug)
Definition at line 237 of file game.cpp.
Referenced by cmd_undo::execute(), cmd_remove::execute(), and cmd_again::execute().
std::string bGame::getResult | ( | gameResult_t | rs | ) | const |
Definition at line 183 of file game.cpp.
Referenced by engineInterface::sendResult().
void bGame::setResult | ( | gameResult_t | rs | ) |
Definition at line 191 of file game.cpp.
Referenced by playGameMove(), and revertGameMove().
|
inline |
Definition at line 42 of file game.h.
Referenced by newGame(), setResult(), and WaitForSearchEnd().
void bGame::setExpecting | ( | std::string const & | s | ) |
Following command should return value as expected.
Definition at line 164 of file game.cpp.
Referenced by cmd_perft::execute(), and cmd_expect::execute().
bool bGame::isExpecting | ( | std::string const & | s | ) | const |
bEpdResult bGame::evalEpdPosition | ( | bFen const & | fen, |
bEpdOpCodes & | opcodes | ||
) |
do actual epd position test
Definition at line 246 of file game.cpp.
Referenced by bEpd::parse().
bEpdResult bGame::evalPerftResult | ( | bFen const & | fen, |
bEpdOpCodes & | opcodes | ||
) |
check perft result for different depths D[1-99] # perft test - nodes
Definition at line 304 of file game.cpp.
Referenced by bEpd::parse().
bBoard & bGame::getCurrentPosition | ( | ) |
Definition at line 73 of file game.cpp.
Referenced by DoPerft(), DoSearch(), evalEpdPosition(), bel_debug::execute(), cmd_bd::execute(), cmd_usermove::execute(), cmd_eval::execute(), playGameMove(), revertGameMove(), setPlayerName(), and WaitForSearchEnd().
|
inline |
Definition at line 52 of file game.h.
Referenced by cmd_go::execute().
|
inline |
Definition at line 53 of file game.h.
Referenced by cmd_usermove::execute(), cmd_level::execute(), cmd_sd::execute(), cmd_fd::execute(), cmd_st::execute(), cmd_time::execute(), cmd_easy::execute(), cmd_hard::execute(), bel_debug::info(), main(), and newGame().
|
inline |
void bGame::setPlayerName | ( | std::string const & | n | ) |
Definition at line 62 of file game.cpp.
Referenced by cmd_UCI_Opponent::execute(), and cmd_name::execute().
void bGame::DoSearch | ( | ) |
Start search thread and exit in case of batch mode, will wait until end of search.
in case of batch mode, do not start separate thread for searching
Definition at line 81 of file game.cpp.
Referenced by cmd_go::execute().
void bGame::AbortSearch | ( | ) |
Definition at line 100 of file game.cpp.
Referenced by cmd_stop::execute(), and cmd_questionmark::execute().
void bGame::WaitForSearchEnd | ( | ) |
Called in separate thread, sure to terminate normally.
Definition at line 108 of file game.cpp.
Referenced by DoSearch().
int64_t bGame::DoPerft | ( | bSearchAlgorithm & | sa, |
int const | d | ||
) |
do perft search at depth
Definition at line 126 of file game.cpp.
Referenced by evalPerftResult(), cmd_perft::execute(), and bel_debug::run_bench().
Definition at line 151 of file game.cpp.
Referenced by bBoard::bBoard(), cmd_eval::execute(), playGameMove(), and bSearchAlgorithm::RetrieveBoardEvaluation().
gameResult_t bGame::EvalFinalScore | ( | bBoard const & | b | ) |
Definition at line 156 of file game.cpp.
Referenced by engineInterface::sendResult().