25 if (
getLevel()->searchDepthReached(nDepth)) {
56 for (
movenum_t moveid = 1; moveid <= n_moves; ++moveid) {
This is the main include file, needs to be included before any other include.
bScore CalcBestMove(bBoard &b, bMoveList &ml, depth_t const nDepth, bSearchScore alpha, bSearchScore beta) override
Intermediate overwriting procedure for algorithm.
bScore m_nBetaCutOffMargin
bScore Quiescence(bBoard &b, depth_t const nDepth, bSearchScore alpha, bSearchScore beta, uint8_t nCheckCount)
Calculate best move from this position considering only non-silent moves.
constexpr bool isInCheck() const
void setVariation(bBoard const &chldbrd)
boardInfo_t applyMove(bMove const &m) override
modification of board move is kept on previous board newboard does not have move stored and has flag ...
void calcMinorPieces(bool const bForceRecalc=false)
Recalculate minor pieces, used for evaluation and end of game condition in case of less than 5 pieces...
movenum_t generateMoves(bBasicBoard const &b)
generate moves if not yet generated
void sortMoves()
sort moves and update bestmove id if less than 5 moves, sort all if more than 5 moves,...
bool setScoreOfMove(movenum_t const moveid, bScore const score)
Store score of move and update best move.
void adjustMaxSearchedDepth(depth_t const nDepth)
void sendInfoCurrMove(bBoard const &b, depth_t const nCurDepth, bMove const &m, movenum_t const moveid) const
bScore RetrieveBoardEvaluation(bBoard &b, gameResult_t const gr=GR_UNSET) const
Get score of board, eventually from cache.
void CheckIfAbortingSearch() const
static constexpr bool isDrawScore(bScore const score)
constexpr bScore getScore() const
bool improvesOn(bSearchScore const &sc)
constexpr bool isWinning() const
static std::string scoreAsString(bScore const score)
constexpr bScore SCORE_THEORETIC_DRAW
constexpr bScore SCORE_INFINITE
#define DEBUG_sendInfoSearchingNS(b, depth, msg)
#define DEBUG_sendInfoSearching(b, depth, msg, sc)