chess:programming:evaluation
This is an old revision of the document!
Table of Contents
Chess - Programming - Evaluation
A requirement is to calculate the value of the board depending on the placement of pieces on the board.
- This function is often known as Evaluation Function.
- It is sometimes also called Heuristic Function.
The evaluation function is unique for every type of game.
The evaluation function is combined with the minimax function or alpha-beta pruning function and so on.
Finding the Best Move
Evaluate all the available moves using minimax() or alpha-beta pruning() or similar.
Then returns the best move the maximizer can make.
function findBestMove(board): bestMove = NULL for each move in board : if current move is better than bestMove bestMove = current move return bestMove
Checking for GameOver state
To check whether the game is over and to make sure there are no moves left.
function isMovesLeft(board): for each cell in board: if current cell is empty: return true return false
chess/programming/evaluation.1635634465.txt.gz · Last modified: 2021/10/30 22:54 by peter