Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
bPositionEvaluation Class Referenceabstract

#include <eval.h>

+ Inheritance diagram for bPositionEvaluation:

Public Member Functions

 bPositionEvaluation (std::string const &n)
 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
 
 operator std::string () const &
 
virtual bScore getEvaluation (bBoard const &b) const =0
 
gameResult_t isGameEnded (bBoard const &b) const
 See if board is in finite state, meaning game is ended.
 

Static Public Member Functions

static bScore pieceValue (piece_t const p)
 
static bScore mymove_pieceValue (piece_t const p)
 
static bScore centerplay_pieceValue (case_t const p)
 

Protected Member Functions

bScore resultToScoreFlag (gameResult_t const sc) const
 convert all draw scores to SCORE_THEORETIC_DRAW
 

Detailed Description

Definition at line 49 of file eval.h.

Constructor & Destructor Documentation

◆ bPositionEvaluation() [1/3]

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

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

Definition at line 367 of file eval.cpp.

+ Here is the call graph for this function:

◆ ~bPositionEvaluation()

bPositionEvaluation::~bPositionEvaluation ( )
virtual

Definition at line 390 of file eval.cpp.

◆ bPositionEvaluation() [2/3]

bPositionEvaluation::bPositionEvaluation ( bPositionEvaluation const &  )
delete

◆ bPositionEvaluation() [3/3]

bPositionEvaluation::bPositionEvaluation ( bPositionEvaluation &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

bPositionEvaluation & bPositionEvaluation::operator= ( bPositionEvaluation const &  )
delete

◆ operator=() [2/2]

bPositionEvaluation & bPositionEvaluation::operator= ( bPositionEvaluation &&  )
delete

◆ operator std::string()

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

Definition at line 60 of file eval.h.

◆ getEvaluation()

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

Implemented in PosEvalPiecesOnly, PosEvalStaticBoard, and PosEvalPositionalBoard.

Referenced by bGame::EvalForPlayer().

+ Here is the caller graph for this function:

◆ isGameEnded()

gameResult_t bPositionEvaluation::isGameEnded ( bBoard const &  b) const

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

Parameters
bboard is a reference, if no moves have been generated, a copy is created, moves are generated and a recursive call is done
Returns
mate, stalemate, draw or further evaluation required

Definition at line 38 of file eval.cpp.

Referenced by bGame::EvalFinalScore(), PosEvalPiecesOnly::getEvaluation(), PosEvalStaticBoard::getEvaluation(), and PosEvalPositionalBoard::getEvaluation().

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

◆ pieceValue()

bScore bPositionEvaluation::pieceValue ( piece_t const  p)
static

Definition at line 347 of file eval.cpp.

◆ mymove_pieceValue()

bScore bPositionEvaluation::mymove_pieceValue ( piece_t const  p)
static

Definition at line 352 of file eval.cpp.

◆ centerplay_pieceValue()

bScore bPositionEvaluation::centerplay_pieceValue ( case_t const  p)
static

Definition at line 357 of file eval.cpp.

◆ resultToScoreFlag()

bScore bPositionEvaluation::resultToScoreFlag ( gameResult_t const  sc) const
protected

convert all draw scores to SCORE_THEORETIC_DRAW

Definition at line 64 of file eval.cpp.

Referenced by PosEvalPiecesOnly::getEvaluation(), PosEvalStaticBoard::getEvaluation(), and PosEvalPositionalBoard::getEvaluation().

+ Here is the caller graph for this function: