Evaluation function
Encyclopedia
An evaluation function, also known as a heuristic evaluation function or static evaluation function, is a function used by game-playing programs to estimate the value or goodness of a position in the minimax
and related algorithms. The evaluation function is typically designed to prioritize speed over accuracy; the function looks only at the current position and does not explore possible moves (therefore static).
might take the form
c1 * material + c2 * mobility + c3 * king safety + c4 * center control + ...
Chess beginners, as well as the simplest of chess programs, evaluate the position taking only "material" into account, i.e. they assign a numerical score for each piece (with pieces of opposite color having scores of opposite sign) and sum up the score over all the pieces on the board. On the whole, computer evaluation functions of even advanced programs tend to be more materialistic than human evaluations. This is compensated for by the increased speed of evaluation, which allows more plies
to be examined. As a result, some chess programs may rely too much on tactics at the expense of strategy
.
Minimax
Minimax is a decision rule used in decision theory, game theory, statistics and philosophy for minimizing the possible loss for a worst case scenario. Alternatively, it can be thought of as maximizing the minimum gain...
and related algorithms. The evaluation function is typically designed to prioritize speed over accuracy; the function looks only at the current position and does not explore possible moves (therefore static).
In chess
One popular strategy for constructing evaluation functions is as a weighted sum of various factors that are thought to influence the value of a position. For instance, an evaluation function for chessChess
Chess is a two-player board game played on a chessboard, a square-checkered board with 64 squares arranged in an eight-by-eight grid. It is one of the world's most popular games, played by millions of people worldwide at home, in clubs, online, by correspondence, and in tournaments.Each player...
might take the form
c1 * material + c2 * mobility + c3 * king safety + c4 * center control + ...
Chess beginners, as well as the simplest of chess programs, evaluate the position taking only "material" into account, i.e. they assign a numerical score for each piece (with pieces of opposite color having scores of opposite sign) and sum up the score over all the pieces on the board. On the whole, computer evaluation functions of even advanced programs tend to be more materialistic than human evaluations. This is compensated for by the increased speed of evaluation, which allows more plies
Ply (game theory)
In two-player sequential games, a ply refers to one turn taken by one of the players. The word is used to clarify what is meant when one might otherwise say "turn"....
to be examined. As a result, some chess programs may rely too much on tactics at the expense of strategy
Strategy
Strategy, a word of military origin, refers to a plan of action designed to achieve a particular goal. In military usage strategy is distinct from tactics, which are concerned with the conduct of an engagement, while strategy is concerned with how different engagements are linked...
.
In Go
Evaluation functions in Go take into account both territory controlled, influence of stones, number of prisoners and life and death of groups on the board.External links
- Keys to Evaluating Positions
- GameDev.net - Chess Programming Part VI: Evaluation Functions
- http://alumni.imsa.edu/~stendahl/comp/txt/gnuchess.txt - Heuristic function used by GNU ChessGNU ChessGNU Chess is a computer program which plays a full game of chess against a human or other computer program.GNU Chess is one of the oldest computer chess programs for Unix-based computers and one of the earliest available with full source code....
in 1987