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

#include <eval.h>

+ Inheritance diagram for bPositionEvaluation:

Public Member Functions

 bPositionEvaluation ()
 
 bPositionEvaluation (std::string const &s)
 Store black piece and field values as negative of whites view.
 
virtual ~bPositionEvaluation ()
 
 bPositionEvaluation (bPositionEvaluation const &)=delete
 
 bPositionEvaluation (bPositionEvaluation &&)=delete
 
bPositionEvaluationoperator= (bPositionEvaluation const &)=delete
 
bPositionEvaluationoperator= (bPositionEvaluation &&)=delete
 
virtual bScore getEvaluation (bBoard const &b) const
 get final score or 0
 
 operator std::string () const &
 

Static Public Member Functions

static gameResult_t gameEndedResult (bBoard const &b)
 Class static function See if board is in finite state, meaning game is ended.
 
static bScore resultToScoreFlag (gameResult_t const gr)
 Class static function convert all draw scores to SCORE_THEORETIC_DRAW.
 
static bool isDrawResult (gameResult_t const gr)
 

Detailed Description

Definition at line 47 of file eval.h.

Constructor & Destructor Documentation

◆ bPositionEvaluation() [1/4]

bPositionEvaluation::bPositionEvaluation ( )
inlineexplicit

◆ bPositionEvaluation() [2/4]

bPositionEvaluation::bPositionEvaluation ( std::string const & s)
explicit

Store black piece and field values as negative of whites view.

Definition at line 406 of file eval.cpp.

+ Here is the call graph for this function:

◆ ~bPositionEvaluation()

virtual bPositionEvaluation::~bPositionEvaluation ( )
inlinevirtual

Definition at line 53 of file eval.h.

◆ bPositionEvaluation() [3/4]

bPositionEvaluation::bPositionEvaluation ( bPositionEvaluation const & )
delete
+ Here is the call graph for this function:

◆ bPositionEvaluation() [4/4]

bPositionEvaluation::bPositionEvaluation ( bPositionEvaluation && )
delete
+ Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

bPositionEvaluation & bPositionEvaluation::operator= ( bPositionEvaluation const & )
delete
+ Here is the call graph for this function:

◆ operator=() [2/2]

bPositionEvaluation & bPositionEvaluation::operator= ( bPositionEvaluation && )
delete
+ Here is the call graph for this function:

◆ getEvaluation()

bScore bPositionEvaluation::getEvaluation ( bBoard const & b) const
virtual

get final score or 0

Reimplemented in PosEvalPiecesOnly, PosEvalPositionalBoard, and PosEvalStaticBoard.

Definition at line 433 of file eval.cpp.

Referenced by bGame::EvalForPlayer().

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

◆ operator std::string()

bPositionEvaluation::operator std::string ( ) const &
inline

Definition at line 64 of file eval.h.

◆ gameEndedResult()

gameResult_t bPositionEvaluation::gameEndedResult ( bBoard const & b)
static

Class static function See if board is in finite state, meaning game is ended.

Parameters
bboard is a reference, can be updated
Returns
mate, stalemate, draw or further evaluation required (GR_UNKNOWN)
Todo
when a move has been registered on board, no need to check for move generation

Definition at line 42 of file eval.cpp.

Referenced by SearchAlphaBeta::CalcBestMove(), cmd_eval::execute(), getEvaluation(), PosEvalPiecesOnly::getEvaluation(), PosEvalPositionalBoard::getEvaluation(), PosEvalStaticBoard::getEvaluation(), SearchAlphaBeta::Quiescence(), bSearchAlgorithm::RetrieveBoardEvaluation(), bSearchAlgorithm::SearchBestMove(), and XboardMode::sendResult().

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

◆ resultToScoreFlag()

bScore bPositionEvaluation::resultToScoreFlag ( gameResult_t const gr)
static

Class static function convert all draw scores to SCORE_THEORETIC_DRAW.

Returns
-SCORE_MATE, SCORE_MATE or SCORE_THEORETIC_DRAW

Definition at line 77 of file eval.cpp.

Referenced by SearchAlphaBeta::CalcBestMove(), getEvaluation(), PosEvalPiecesOnly::getEvaluation(), PosEvalPositionalBoard::getEvaluation(), PosEvalStaticBoard::getEvaluation(), SearchAlphaBeta::Quiescence(), and bSearchAlgorithm::RetrieveBoardEvaluation().

+ Here is the caller graph for this function:

◆ isDrawResult()

static bool bPositionEvaluation::isDrawResult ( gameResult_t const gr)
inlinestatic

Definition at line 70 of file eval.h.

Referenced by SearchAlphaBeta::CalcBestMove(), cmd_eval::execute(), bGame::getResult(), SearchAlphaBeta::Quiescence(), and XboardMode::sendResult().

+ Here is the caller graph for this function: