Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
bSearchScore Class Reference

#include <searchscore.h>

Public Member Functions

 bSearchScore (bSearchScore &sc)
 
 bSearchScore (bSearchScore const &sc)
 
 bSearchScore (bSearchScore &&sc)
 
 bSearchScore (bScore const &score)
 
 bSearchScore (bScore const &score, scoretype_t const &st)
 
 ~bSearchScore ()
 
bSearchScoreoperator= (bScore const &score)
 
bSearchScore operator- () const
 
bool operator> (bScore const &rhsc)
 
bool operator> (bSearchScore const &rhsc)
 
bool operator>= (bSearchScore const &rhsc)
 
bool operator< (bScore const &rhsc)
 
bool operator< (bSearchScore const &rhsc)
 
bool operator<= (bSearchScore const &rhsc)
 
constexpr bScore getScore () const
 
constexpr bScore realScore () const
 
constexpr bool isWinning () const
 
bool improvesOn (bSearchScore const &sc)
 
bool improvesOn (bScore const &margin, bSearchScore const &sc) const
 
bool improvesOn (bScore const &sc)
 
bool improvesOn (bScore const &margin, bScore const &sc) const
 
std::string const operator+ (std::string const &rhs)
 
bScore convergeScore ()
 
 operator std::string () const
 

Static Public Member Functions

static bScore convergeScore (bScore const score)
 converge score towards zero in order to force immediate best move first
 
static constexpr bScore realScore (bScore const score)
 
static constexpr bool isUndefinedScore (bScore const score)
 
static constexpr bool isDrawScore (bScore const score)
 

Friends

std::string const operator+ (std::string const &lhs, bSearchScore const &sc)
 
bool operator> (bScore const &lhsc, bSearchScore const &rhsc)
 
bool operator>= (bScore const &lhsc, bSearchScore const &rhsc)
 
bool operator< (bScore const &lhsc, bSearchScore const &rhsc)
 
bool operator<= (bScore const &lhsc, bSearchScore const &rhsc)
 

Detailed Description

Definition at line 23 of file searchscore.h.

Constructor & Destructor Documentation

◆ bSearchScore() [1/5]

bSearchScore::bSearchScore ( bSearchScore & sc)
inline

Definition at line 25 of file searchscore.h.

Referenced by bSearchScore(), bSearchScore(), bSearchScore(), improvesOn(), improvesOn(), operator+, operator-(), operator<, operator<(), operator<=, operator<=(), operator=(), operator>, operator>(), operator>=, and operator>=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bSearchScore() [2/5]

bSearchScore::bSearchScore ( bSearchScore const & sc)
inline

Definition at line 28 of file searchscore.h.

+ Here is the call graph for this function:

◆ bSearchScore() [3/5]

bSearchScore::bSearchScore ( bSearchScore && sc)
inline

Definition at line 31 of file searchscore.h.

+ Here is the call graph for this function:

◆ bSearchScore() [4/5]

bSearchScore::bSearchScore ( bScore const & score)
inlineexplicit

Definition at line 34 of file searchscore.h.

◆ bSearchScore() [5/5]

bSearchScore::bSearchScore ( bScore const & score,
scoretype_t const & st )
inlineexplicit

Definition at line 37 of file searchscore.h.

◆ ~bSearchScore()

bSearchScore::~bSearchScore ( )
inline

Definition at line 41 of file searchscore.h.

Member Function Documentation

◆ operator=()

bSearchScore & bSearchScore::operator= ( bScore const & score)
inline

Definition at line 44 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator-()

bSearchScore bSearchScore::operator- ( ) const

Definition at line 34 of file searchscore.cpp.

+ Here is the call graph for this function:

◆ operator>() [1/2]

bool bSearchScore::operator> ( bScore const & rhsc)
inline

Definition at line 51 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator>() [2/2]

bool bSearchScore::operator> ( bSearchScore const & rhsc)
inline

Definition at line 53 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator>=()

bool bSearchScore::operator>= ( bSearchScore const & rhsc)
inline

Definition at line 55 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator<() [1/2]

bool bSearchScore::operator< ( bScore const & rhsc)
inline

Definition at line 57 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator<() [2/2]

bool bSearchScore::operator< ( bSearchScore const & rhsc)
inline

Definition at line 59 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator<=()

bool bSearchScore::operator<= ( bSearchScore const & rhsc)
inline

Definition at line 61 of file searchscore.h.

+ Here is the call graph for this function:

◆ getScore()

bScore bSearchScore::getScore ( ) const
inlineconstexpr

Definition at line 64 of file searchscore.h.

Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), and SearchAlphaBeta::Quiescence().

+ Here is the caller graph for this function:

◆ realScore() [1/2]

bScore bSearchScore::realScore ( ) const
inlineconstexpr

Definition at line 66 of file searchscore.h.

Referenced by improvesOn(), improvesOn(), improvesOn(), improvesOn(), isWinning(), operator<, operator<(), operator<(), operator<=, operator<=(), operator>, operator>(), operator>(), operator>=, operator>=(), and bMove::realScore().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isWinning()

bool bSearchScore::isWinning ( ) const
inlineconstexpr

Definition at line 70 of file searchscore.h.

Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), and SearchAlphaBeta::Quiescence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ improvesOn() [1/4]

bool bSearchScore::improvesOn ( bSearchScore const & sc)
inline

Definition at line 72 of file searchscore.h.

Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), and SearchAlphaBeta::Quiescence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ improvesOn() [2/4]

bool bSearchScore::improvesOn ( bScore const & margin,
bSearchScore const & sc ) const
inline

Definition at line 74 of file searchscore.h.

+ Here is the call graph for this function:

◆ improvesOn() [3/4]

bool bSearchScore::improvesOn ( bScore const & sc)
inline

Definition at line 76 of file searchscore.h.

+ Here is the call graph for this function:

◆ improvesOn() [4/4]

bool bSearchScore::improvesOn ( bScore const & margin,
bScore const & sc ) const
inline

Definition at line 78 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator+()

std::string const bSearchScore::operator+ ( std::string const & rhs)
inline

Definition at line 81 of file searchscore.h.

◆ convergeScore() [1/2]

bScore bSearchScore::convergeScore ( )
inline

Definition at line 95 of file searchscore.h.

Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), convergeScore(), and SearchAlphaBeta::Quiescence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convergeScore() [2/2]

bScore bSearchScore::convergeScore ( bScore const score)
static

converge score towards zero in order to force immediate best move first

Definition at line 14 of file searchscore.cpp.

◆ realScore() [2/2]

static constexpr bScore bSearchScore::realScore ( bScore const score)
inlinestaticconstexpr

Definition at line 104 of file searchscore.h.

+ Here is the call graph for this function:

◆ isUndefinedScore()

static constexpr bool bSearchScore::isUndefinedScore ( bScore const score)
inlinestaticconstexpr

Definition at line 108 of file searchscore.h.

Referenced by bGame::playGameMove(), UCIMode::scoreString(), and XboardMode::sendInfoSearching().

+ Here is the caller graph for this function:

◆ isDrawScore()

static constexpr bool bSearchScore::isDrawScore ( bScore const score)
inlinestaticconstexpr

Definition at line 110 of file searchscore.h.

Referenced by SearchAlphaBetaFH::CalcBestMove(), bGame::playGameMove(), realScore(), realScore(), and UCIMode::scoreString().

+ Here is the caller graph for this function:

◆ operator std::string()

bSearchScore::operator std::string ( ) const

Definition at line 47 of file searchscore.cpp.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator+

std::string const operator+ ( std::string const & lhs,
bSearchScore const & sc )
friend

Definition at line 83 of file searchscore.h.

◆ operator>

bool operator> ( bScore const & lhsc,
bSearchScore const & rhsc )
friend

Definition at line 86 of file searchscore.h.

◆ operator>=

bool operator>= ( bScore const & lhsc,
bSearchScore const & rhsc )
friend

Definition at line 88 of file searchscore.h.

◆ operator<

bool operator< ( bScore const & lhsc,
bSearchScore const & rhsc )
friend

Definition at line 90 of file searchscore.h.

◆ operator<=

bool operator<= ( bScore const & lhsc,
bSearchScore const & rhsc )
friend

Definition at line 92 of file searchscore.h.

Member Data Documentation

◆ u_scoreInfo

uint32_t bSearchScore::u_scoreInfo

Definition at line 117 of file searchscore.h.

Referenced by bSearchScore(), bSearchScore(), and bSearchScore().

◆ m_score

◆ m_type

scoretype_t bSearchScore::m_type = tScoreType::SC_UNDEF

Definition at line 120 of file searchscore.h.

Referenced by bSearchScore(), operator std::string(), and operator-().