Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
|
#include <search.h>
Public Member Functions | |
bSearchAlgorithm (std::string const &s) | |
~bSearchAlgorithm () override | |
bSearchAlgorithm (bSearchAlgorithm const &)=delete | |
bSearchAlgorithm (bSearchAlgorithm &&)=delete | |
bSearchAlgorithm & | operator= (bSearchAlgorithm const &)=delete |
bSearchAlgorithm & | operator= (bSearchAlgorithm &&)=delete |
constexpr int64_t | getNodes () const |
constexpr int64_t | getNonLeafNodes () const |
void | StartSearch (bScore const sc) |
void | StopSearch () |
void | InterruptSearch () |
void | SearchBestMove (bBoard &b, bMoveList &ml) |
Generic search, will call (non-)recursive method per algorithm only when there are moves to be played. | |
void | sendInfoSearching (bBoard const &b, depth_t const nDepth, std::string const &comment) const |
bScore | sendInfoSearching (bBoard const &b, depth_t const nDepth, std::string const &comment, bScore const sc) const |
bScore | RetrieveBoardEvaluation (bBoard &b, gameResult_t const gr=GR_UNSET) const |
Get score of board, eventually from cache. | |
constexpr bool | isNoBench () const |
void | setBench () |
void | clearBench () |
operator std::string () const & | |
![]() | |
TimedExecution () | |
implementation of timing functions | |
virtual | ~TimedExecution ()=default |
std::string | getDuration () const |
long long | getDurationMicroSec () const |
Public Attributes | |
int64_t | m_leafnodes = 0LL |
int64_t | m_nonleafnodes = 0LL |
bool | m_iterativesearch = false |
Protected Member Functions | |
virtual bScore | CalcBestMove (bBoard &b, bMoveList &ml)=0 |
void | CheckIfAbortingSearch () const |
void | adjustMaxSearchedDepth (depth_t const nDepth) |
constexpr depth_t | getMaxSearchedDepth () const |
void | initMaxSearchedDepth () |
void | setLevel (bLevel *l) |
bLevel * | getLevel () |
void | sendInfoCurrMove (bBoard const &b, depth_t const nCurDepth, bMove const &m, movenum_t const moveid) const |
![]() | |
void | ClockStart () |
void | ClockEnd () |
long long | getDurationSec () const |
long long | getDurationMilliSec () const |
|
inlineexplicit |
Definition at line 75 of file search.h.
Referenced by bSearchAlgorithm(), bSearchAlgorithm(), operator=(), operator=(), SearchAlphaBeta::SearchAlphaBeta(), SearchAlphaBeta::SearchAlphaBeta(), SearchBruteForce::SearchBruteForce(), SearchBruteForce::SearchBruteForce(), SearchEvalPosOnly::SearchEvalPosOnly(), SearchPerft::SearchPerft(), and SearchRandom::SearchRandom().
|
delete |
|
delete |
|
delete |
|
delete |
|
inlineconstexpr |
Definition at line 91 of file search.h.
Referenced by bGame::DoPerft().
|
inlineconstexpr |
Definition at line 93 of file search.h.
Referenced by cmd_perft::execute(), and bel_debug::run_bench().
void bSearchAlgorithm::StartSearch | ( | bScore const | sc | ) |
Definition at line 157 of file search.cpp.
Referenced by SearchBestMove().
|
inline |
Definition at line 97 of file search.h.
Referenced by SearchBestMove().
|
inline |
Definition at line 101 of file search.h.
Referenced by bGame::AbortSearch().
Generic search, will call (non-)recursive method per algorithm only when there are moves to be played.
b | initial board |
ml | movelist of this position |
Definition at line 18 of file search.cpp.
Referenced by bGame::DoPerft(), bGame::getEpdMoveInPosition(), and bGame::WaitForSearchEnd().
bScore bSearchAlgorithm::RetrieveBoardEvaluation | ( | bBoard & | b, |
gameResult_t const | gr = GR_UNSET ) const |
Get score of board, eventually from cache.
b | board |
gr | previous gameresult |
Definition at line 242 of file search.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), and SearchAlphaBeta::Quiescence().
|
inlineconstexpr |
Definition at line 114 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBeta::Quiescence(), and SearchBestMove().
|
inline |
Definition at line 116 of file search.h.
Referenced by bGame::DoPerft().
|
inline |
Definition at line 118 of file search.h.
Referenced by bGame::DoPerft().
Implemented in SearchAlphaBeta, SearchBruteForce, SearchEvalPosOnly, SearchPerft, and SearchRandom.
Referenced by SearchBestMove().
|
protected |
Definition at line 168 of file search.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), and SearchAlphaBeta::Quiescence().
|
inlineprotected |
Definition at line 132 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchRandom::CalcBestMove(), and SearchAlphaBeta::Quiescence().
|
inlineconstexprprotected |
|
inlineprotected |
Definition at line 136 of file search.h.
Referenced by SearchBestMove().
|
inlineprotected |
Definition at line 139 of file search.h.
Referenced by StartSearch().
|
inlineprotected |
Definition at line 141 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchPerft::CalcBestMove(), SearchAlphaBeta::Quiescence(), SearchBestMove(), and StartSearch().
|
protected |
Definition at line 223 of file search.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchRandom::CalcBestMove(), and SearchAlphaBeta::Quiescence().
int64_t bSearchAlgorithm::m_leafnodes = 0LL |
Definition at line 124 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchPerft::CalcBestMove(), SearchRandom::CalcBestMove(), getNodes(), SearchAlphaBeta::Quiescence(), SearchBestMove(), sendInfoCurrMove(), sendInfoSearching(), and sendInfoSearching().
int64_t bSearchAlgorithm::m_nonleafnodes = 0LL |
Definition at line 125 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), getNonLeafNodes(), SearchAlphaBeta::Quiescence(), SearchBestMove(), sendInfoCurrMove(), sendInfoSearching(), and sendInfoSearching().
bool bSearchAlgorithm::m_iterativesearch = false |
Definition at line 126 of file search.h.
Referenced by bel_debug::run_bench(), SearchAlphaBeta::SearchAlphaBeta(), SearchAlphaBeta::SearchAlphaBeta(), SearchBestMove(), and SearchIterativeBF::SearchIterativeBF().