Cute Chess 0.1
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::MoveEvaluation ( )

Constructs an empty MoveEvaluation object.

Member Function Documentation

◆ clear()

void MoveEvaluation::clear ( )

Resets everything to zero.

◆ depth()

int MoveEvaluation::depth ( ) const

How many plies were searched?

Note
For human players this is always 0.

◆ hashUsage()

int MoveEvaluation::hashUsage ( ) const

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

Note
For human players this is always 0.

◆ isBookEval()

bool MoveEvaluation::isBookEval ( ) const

Returns true if the evaluation points to a book move.

◆ isEmpty()

bool MoveEvaluation::isEmpty ( ) const

Returns true if the evaluation is empty.

◆ isTrusted()

bool MoveEvaluation::isTrusted ( ) const

Returns true if the eval is trusted for adjudication.

◆ merge()

void MoveEvaluation::merge ( const MoveEvaluation & other)

Merges non-empty parameters of other into this eval.

◆ nodeCount()

quint64 MoveEvaluation::nodeCount ( ) const

How many nodes were searched?

Note
For human players this is always 0.

◆ nps()

quint64 MoveEvaluation::nps ( ) const

How many nodes per second is the engine searching?

Note
For human players this is always 0.

◆ operator!=()

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

Returns true if other is different from this eval.

◆ operator==()

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

Returns true if other is the same as this eval.

◆ ponderhitRate()

int MoveEvaluation::ponderhitRate ( ) const

How many permille of ponder move choices were ponderhits?

Note
For human players this is always 0.

◆ ponderMove()

QString MoveEvaluation::ponderMove ( ) const

The current ponder move in SAN notation.

◆ pv()

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.

◆ pvNumber()

int MoveEvaluation::pvNumber ( ) const

Returns the principal variation number (default 0).

Note
For human players this is always 0.

◆ score()

int MoveEvaluation::score ( ) const

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

Note
For human players this always 0.

◆ scoreText()

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.

◆ selectiveDepth()

int MoveEvaluation::selectiveDepth ( ) const

How many plies were searched in selective search lines?

Note
For human players this is always 0.

◆ setBookEval()

void MoveEvaluation::setBookEval ( bool isBookEval)

Sets book evaluation.

◆ setDepth()

void MoveEvaluation::setDepth ( int depth)

Sets the search depth to depth.

◆ setHashUsage()

void MoveEvaluation::setHashUsage ( int hashUsage)

Sets the hash table usage to hashUsage permille.

◆ setIsTrusted()

void MoveEvaluation::setIsTrusted ( bool isTrusted)

Sets trusted property.

◆ setNodeCount()

void MoveEvaluation::setNodeCount ( quint64 nodeCount)

Sets the node count to nodeCount.

◆ setNps()

void MoveEvaluation::setNps ( quint64 nps)

Sets the nodes per second count to nps.

◆ setPonderhitRate()

void MoveEvaluation::setPonderhitRate ( int rate)

Sets ponderhit rate to rate permille.

◆ setPonderMove()

void MoveEvaluation::setPonderMove ( const QString & san)

Sets the current ponder move to san.

◆ setPv()

void MoveEvaluation::setPv ( const QString & pv)

Sets the principal variation to pv.

◆ setPvNumber()

void MoveEvaluation::setPvNumber ( int number)

Sets the principal variation number to number.

◆ setScore()

void MoveEvaluation::setScore ( int score)

Sets the score to score.

◆ setSelectiveDepth()

void MoveEvaluation::setSelectiveDepth ( int depth)

Sets the selective search depth to depth.

◆ setTbHits()

void MoveEvaluation::setTbHits ( quint64 tbHits)

Sets the tablebase hits count to tbHits.

◆ setTime()

void MoveEvaluation::setTime ( int time)

Sets the move time to time.

◆ tbHits()

quint64 MoveEvaluation::tbHits ( ) const

How many positions were found in endgame tablebases?

Note
For human players this is always 0.

◆ time()

int MoveEvaluation::time ( ) const

Move time in milliseconds.

Member Data Documentation

◆ MATE_SCORE

int MoveEvaluation::MATE_SCORE = 1000000
staticconstexpr

Mate score reference

◆ NULL_SCORE

int MoveEvaluation::NULL_SCORE = 0xFFFFFFF
staticconstexpr

A value for a null or empty score.


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