|
Belofte version 2.2.0
A promising chess program using the UCI or Winboard interface
|
#include <search.h>
Inheritance diagram for bSearchAlgorithm:
Collaboration diagram for bSearchAlgorithm: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, bool const bRecalcFirst) const |
| Get score of board, eventually from cache. | |
| bScore | RetrieveBoardEvaluationForWhite (bBoard &b, gameResult_t const gr, bool const bRecalcFirst) const |
| Get score of board, eventually from cache, from whites view. | |
| constexpr bool | isNoBench () const |
| constexpr bool | isBench () const |
| void | setBench () |
| void | clearBench () |
| operator std::string () const & | |
Public Member Functions inherited from TimedExecution | |
| 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 |
Protected Member Functions inherited from TimedExecution | |
| void | ClockStart () |
| void | ClockEnd () |
| long long | getDurationSec () const |
| long long | getDurationMilliSec () const |
Additional Inherited Members | |
Static Public Member Functions inherited from TimedExecution | |
| static void | sleep_ms (unsigned long ms) |
| Class static function Pause execution for a number of ms. | |
|
inlineexplicit |
Definition at line 93 of file search.h.
Referenced by bSearchAlgorithm(), bSearchAlgorithm(), operator=(), operator=(), SearchAlphaBeta::SearchAlphaBeta(), SearchAlphaBeta::SearchAlphaBeta(), SearchBruteForce::SearchBruteForce(), SearchBruteForce::SearchBruteForce(), SearchEvalPosOnly::SearchEvalPosOnly(), SearchMiniMax::SearchMiniMax(), SearchMiniMax::SearchMiniMax(), SearchPerft::SearchPerft(), and SearchRandom::SearchRandom().
Here is the caller graph for this function:
|
delete |
Here is the call graph for this function:
|
delete |
Here is the call graph for this function:
|
delete |
Here is the call graph for this function:
|
delete |
Here is the call graph for this function:
|
inlineconstexpr |
Definition at line 109 of file search.h.
Referenced by bGame::DoPerft().
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 111 of file search.h.
Referenced by cmd_perft::execute(), and bel_debug::run_bench().
Here is the caller graph for this function:| void bSearchAlgorithm::StartSearch | ( | bScore const | sc | ) |
Definition at line 211 of file search.cpp.
Referenced by SearchBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:| void bSearchAlgorithm::StopSearch | ( | ) |
Definition at line 231 of file search.cpp.
Referenced by SearchBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 116 of file search.h.
Referenced by bGame::AbortSearch().
Here is the caller graph for this function: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().
Here is the call graph for this function:
Here is the caller graph for this function:| void bSearchAlgorithm::sendInfoSearching | ( | bBoard const & | b, |
| depth_t const | nDepth, | ||
| std::string const & | comment ) const |
Definition at line 250 of file search.cpp.
Referenced by SearchBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:| bScore bSearchAlgorithm::RetrieveBoardEvaluation | ( | bBoard & | b, |
| gameResult_t const | gr, | ||
| bool const | bRecalcFirst ) const |
Get score of board, eventually from cache.
| b | board |
| gr | previous gameresult |
| bRecalcFirst | recalculate pieces first |
Definition at line 302 of file search.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), and SearchAlphaBeta::Quiescence().
Here is the call graph for this function:
Here is the caller graph for this function:| bScore bSearchAlgorithm::RetrieveBoardEvaluationForWhite | ( | bBoard & | b, |
| gameResult_t const | gr, | ||
| bool const | bRecalcFirst ) const |
Get score of board, eventually from cache, from whites view.
| b | board |
| gr | previous gameresult |
| bRecalcFirst | recalculate pieces first |
Definition at line 323 of file search.cpp.
Referenced by SearchMiniMax::CalcBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 132 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchAlphaBeta::Quiescence(), and SearchBestMove().
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 134 of file search.h.
Referenced by SearchMiniMax::CalcBestMove().
Here is the caller graph for this function:
|
inline |
Definition at line 136 of file search.h.
Referenced by bGame::DoPerft().
Here is the caller graph for this function:
|
inline |
Definition at line 138 of file search.h.
Referenced by bGame::DoPerft().
Here is the caller graph for this function:Implemented in SearchAlphaBeta, SearchBruteForce, SearchEvalPosOnly, SearchMiniMax, SearchPerft, and SearchRandom.
Referenced by SearchBestMove().
Here is the caller graph for this function:
|
protected |
Definition at line 223 of file search.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchMiniMax::CalcBestMove(), and SearchAlphaBeta::Quiescence().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 152 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchRandom::CalcBestMove(), and SearchAlphaBeta::Quiescence().
Here is the caller graph for this function:
|
inlineconstexprprotected |
|
inlineprotected |
Definition at line 156 of file search.h.
Referenced by SearchBestMove().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 159 of file search.h.
Referenced by StartSearch().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 161 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchPerft::CalcBestMove(), SearchAlphaBeta::Quiescence(), SearchBestMove(), and StartSearch().
Here is the caller graph for this function:
|
protected |
Definition at line 282 of file search.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchRandom::CalcBestMove(), and SearchAlphaBeta::Quiescence().
Here is the caller graph for this function:| int64_t bSearchAlgorithm::m_leafnodes = 0LL |
Definition at line 144 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchPerft::CalcBestMove(), SearchRandom::CalcBestMove(), getNodes(), SearchAlphaBeta::Quiescence(), SearchBestMove(), sendInfoCurrMove(), sendInfoSearching(), and sendInfoSearching().
| int64_t bSearchAlgorithm::m_nonleafnodes = 0LL |
Definition at line 145 of file search.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchMiniMax::CalcBestMove(), getNonLeafNodes(), SearchAlphaBeta::Quiescence(), SearchBestMove(), sendInfoCurrMove(), sendInfoSearching(), and sendInfoSearching().
| bool bSearchAlgorithm::m_iterativesearch = false |
Definition at line 146 of file search.h.
Referenced by bel_debug::run_bench(), SearchAlphaBeta::SearchAlphaBeta(), SearchAlphaBeta::SearchAlphaBeta(), SearchBestMove(), SearchIterativeBF::SearchIterativeBF(), SearchMiniMax::SearchMiniMax(), and SearchMiniMax::SearchMiniMax().