Belofte version 2.2.0
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 isUndefinedScore () const
 
constexpr bool isInfiniteScore () const
 
constexpr bool isRealScore () const
 
constexpr bool isFakeScore () 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)
 Class static function 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 isInfiniteScore (bScore const score)
 
static constexpr bool isDrawScore (bScore const score)
 
static constexpr bool isRealScore (bScore const score)
 
static constexpr bool isFakeScore (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 25 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(), 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:

◆ isUndefinedScore() [1/2]

bool bSearchScore::isUndefinedScore ( ) const
inlineconstexpr

Definition at line 70 of file searchscore.h.

Referenced by isFakeScore(), isFakeScore(), isRealScore(), isRealScore(), UCIMode::scoreString(), UCIMode::sendInfoSearching(), and XboardMode::sendInfoSearching().

+ Here is the caller graph for this function:

◆ isInfiniteScore() [1/2]

bool bSearchScore::isInfiniteScore ( ) const
inlineconstexpr

Definition at line 72 of file searchscore.h.

Referenced by isFakeScore(), isFakeScore(), isRealScore(), and isRealScore().

+ Here is the caller graph for this function:

◆ isRealScore() [1/2]

bool bSearchScore::isRealScore ( ) const
inlineconstexpr

Definition at line 74 of file searchscore.h.

+ Here is the call graph for this function:

◆ isFakeScore() [1/2]

bool bSearchScore::isFakeScore ( ) const
inlineconstexpr

Definition at line 76 of file searchscore.h.

+ Here is the call graph for this function:

◆ isWinning()

bool bSearchScore::isWinning ( ) const
inlineconstexpr

Definition at line 78 of file searchscore.h.

Referenced by SearchAlphaBeta::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 80 of file searchscore.h.

Referenced by SearchAlphaBeta::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 82 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 84 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 86 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 89 of file searchscore.h.

◆ convergeScore() [1/2]

bScore bSearchScore::convergeScore ( )
inline

Definition at line 103 of file searchscore.h.

Referenced by SearchAlphaBeta::CalcBestMove(), SearchMiniMax::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

Class static function converge score towards zero in order to force immediate best move first.

Definition at line 15 of file searchscore.cpp.

◆ realScore() [2/2]

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

Definition at line 112 of file searchscore.h.

+ Here is the call graph for this function:

◆ isUndefinedScore() [2/2]

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

Definition at line 116 of file searchscore.h.

◆ isInfiniteScore() [2/2]

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

Definition at line 118 of file searchscore.h.

◆ isDrawScore()

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

Definition at line 120 of file searchscore.h.

Referenced by realScore(), realScore(), UCIMode::scoreString(), and XboardMode::scoreString().

+ Here is the caller graph for this function:

◆ isRealScore() [2/2]

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

Definition at line 122 of file searchscore.h.

+ Here is the call graph for this function:

◆ isFakeScore() [2/2]

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

Definition at line 124 of file searchscore.h.

+ Here is the call graph for this function:

◆ operator std::string()

bSearchScore::operator std::string ( ) const

Definition at line 38 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 91 of file searchscore.h.

◆ operator>

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

Definition at line 94 of file searchscore.h.

◆ operator>=

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

Definition at line 96 of file searchscore.h.

◆ operator<

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

Definition at line 98 of file searchscore.h.

◆ operator<=

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

Definition at line 100 of file searchscore.h.

Member Data Documentation

◆ u_scoreInfo

uint32_t bSearchScore::u_scoreInfo

Definition at line 131 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 134 of file searchscore.h.

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