Cute Chess  0.1
Public Member Functions | Static Public Attributes | List of all members
MoveEvaluation Class Reference

Evaluation data for a chess move. More...

#include <moveevaluation.h>

Public Member Functions

void clear ()
 
int depth () const
 
int hashUsage () const
 
bool isBookEval () const
 
bool isEmpty () const
 
bool isTrusted () const
 
void merge (const MoveEvaluation &other)
 
 MoveEvaluation ()
 
quint64 nodeCount () const
 
quint64 nps () const
 
bool operator!= (const MoveEvaluation &other) const
 
bool operator== (const MoveEvaluation &other) const
 
int ponderhitRate () const
 
QString ponderMove () const
 
QString pv () const
 
int pvNumber () const
 
int score () const
 
QString scoreText () const
 
int selectiveDepth () const
 
void setBookEval (bool isBookEval)
 
void setDepth (int depth)
 
void setHashUsage (int hashUsage)
 
void setIsTrusted (bool isTrusted)
 
void setNodeCount (quint64 nodeCount)
 
void setNps (quint64 nps)
 
void setPonderhitRate (int rate)
 
void setPonderMove (const QString &san)
 
void setPv (const QString &pv)
 
void setPvNumber (int number)
 
void setScore (int score)
 
void setSelectiveDepth (int depth)
 
void setTbHits (quint64 tbHits)
 
void setTime (int time)
 
quint64 tbHits () const
 
int time () const
 

Static Public Attributes

static constexpr int MATE_SCORE = 1000000
 
static constexpr int NULL_SCORE = 0xFFFFFFF
 

Detailed Description

Evaluation data for a chess move.

Before chess engines send their move they usually print information about the moves they're thinking of, how many nodes they've searched, the search depth, etc. This class stores that information so that it could be saved in a PGN file or displayed on the screen.

From human players we can only get the move time.

Constructor & Destructor Documentation

MoveEvaluation::MoveEvaluation ( )

Constructs an empty MoveEvaluation object.

Member Function Documentation

void MoveEvaluation::clear ( )

Resets everything to zero.

int MoveEvaluation::depth ( ) const

How many plies were searched?

Note
For human players this is always 0.
int MoveEvaluation::hashUsage ( ) const

How many permille of the engine's hash table is used?

Note
For human players this is always 0.
bool MoveEvaluation::isBookEval ( ) const

Returns true if the evaluation points to a book move.

bool MoveEvaluation::isEmpty ( ) const

Returns true if the evaluation is empty.

bool MoveEvaluation::isTrusted ( ) const

Returns true if the eval is trusted for adjudication.

void MoveEvaluation::merge ( const MoveEvaluation other)

Merges non-empty parameters of other into this eval.

quint64 MoveEvaluation::nodeCount ( ) const

How many nodes were searched?

Note
For human players this is always 0.
quint64 MoveEvaluation::nps ( ) const

How many nodes per second is the engine searching?

Note
For human players this is always 0.
bool MoveEvaluation::operator!= ( const MoveEvaluation other) const

Returns true if other is different from this eval.

bool MoveEvaluation::operator== ( const MoveEvaluation other) const

Returns true if other is the same as this eval.

int MoveEvaluation::ponderhitRate ( ) const

How many permille of ponder move choices were ponderhits?

Note
For human players this is always 0.
QString MoveEvaluation::ponderMove ( ) const

The current ponder move in SAN notation.

QString MoveEvaluation::pv ( ) const

The principal variation. This is a sequence of moves that an engine expects to be played next.

Note
For human players this is always empty.
int MoveEvaluation::pvNumber ( ) const

Returns the principal variation number (default 0).

Note
For human players this is always 0.
int MoveEvaluation::score ( ) const

Score in centipawns from the player's point of view.

Note
For human players this always 0.
QString MoveEvaluation::scoreText ( ) const

String representation of the score from the player's point of view. Mate distances are prefixed with -M or +M.

Note
For human players an empty string is returned.
int MoveEvaluation::selectiveDepth ( ) const

How many plies were searched in selective search lines?

Note
For human players this is always 0.
void MoveEvaluation::setBookEval ( bool  isBookEval)

Sets book evaluation.

void MoveEvaluation::setDepth ( int  depth)

Sets the search depth to depth.

void MoveEvaluation::setHashUsage ( int  hashUsage)

Sets the hash table usage to hashUsage permille.

void MoveEvaluation::setIsTrusted ( bool  isTrusted)

Sets trusted property.

void MoveEvaluation::setNodeCount ( quint64  nodeCount)

Sets the node count to nodeCount.

void MoveEvaluation::setNps ( quint64  nps)

Sets the nodes per second count to nps.

void MoveEvaluation::setPonderhitRate ( int  rate)

Sets ponderhit rate to rate permille.

void MoveEvaluation::setPonderMove ( const QString san)

Sets the current ponder move to san.

void MoveEvaluation::setPv ( const QString pv)

Sets the principal variation to pv.

void MoveEvaluation::setPvNumber ( int  number)

Sets the principal variation number to number.

void MoveEvaluation::setScore ( int  score)

Sets the score to score.

void MoveEvaluation::setSelectiveDepth ( int  depth)

Sets the selective search depth to depth.

void MoveEvaluation::setTbHits ( quint64  tbHits)

Sets the tablebase hits count to tbHits.

void MoveEvaluation::setTime ( int  time)

Sets the move time to time.

quint64 MoveEvaluation::tbHits ( ) const

How many positions were found in endgame tablebases?

Note
For human players this is always 0.
int MoveEvaluation::time ( ) const

Move time in milliseconds.

Member Data Documentation

constexpr int MoveEvaluation::MATE_SCORE = 1000000
static

Mate score reference

constexpr int MoveEvaluation::NULL_SCORE = 0xFFFFFFF
static

A value for a null or empty score.


The documentation for this class was generated from the following files: