|
Cute Chess
0.1
|
A class for adjudicating chess games. More...
#include <gameadjudicator.h>
Public Member Functions | |
| void | addEval (const Chess::Board *board, const MoveEvaluation &eval) |
| GameAdjudicator () | |
| void | resetDrawMoveCount () |
| Chess::Result | result () const |
| void | setDrawThreshold (int moveNumber, int moveCount, int score) |
| void | setResignThreshold (int moveCount, int score) |
| void | setTablebaseAdjudication (bool enable) |
A class for adjudicating chess games.
The GameAdjudicator class can be used to adjudicate chess games when the probability of a specific result is high enough.
| GameAdjudicator::GameAdjudicator | ( | ) |
Creates a new game adjudicator.
By default all adjudication is disabled.
| void GameAdjudicator::addEval | ( | const Chess::Board * | board, |
| const MoveEvaluation & | eval | ||
| ) |
Adds a new move evaluation to the adjudicator.
board should be at the position that follows the move. eval should be the evaluation of the move.
result() can be called after this function to find out if the game should be adjudicated.
| void GameAdjudicator::resetDrawMoveCount | ( | ) |
Sets draw move count to 0.
| Chess::Result GameAdjudicator::result | ( | ) | const |
Returns the adjudication result.
This function returns the expected result of the game. If the game can't be adjudicated yet, a null result is returned.
| void GameAdjudicator::setDrawThreshold | ( | int | moveNumber, |
| int | moveCount, | ||
| int | score | ||
| ) |
Sets the draw adjudication threshold for each game.
A game will be adjudicated as a draw if both players report a score that's within score centipawns from zero for at least moveCount consecutive moves, and at least moveNumber full moves have been played.
| void GameAdjudicator::setResignThreshold | ( | int | moveCount, |
| int | score | ||
| ) |
Sets the resign adjudication threshold for each game.
A game will be adjudicated as a loss for the player that made the last move if it reports a score that's at least score centipawns below zero for at least moveCount consecutive moves.
| void GameAdjudicator::setTablebaseAdjudication | ( | bool | enable | ) |
Sets tablebase adjudication to enable.
If enable is true then games are adjudicated if the latest position is found in the tablebases.
1.8.14