Evaluation function
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).
Contents |
[edit] 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 chess might take the form
c1 * material + c2 * mobility + c3 * king safety + c4 * center control + ...
Such as
f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + (P-P') - 0.5(D-D'+S-S'+I-I') + 0.1(M-M') + ... in which: - (1)K,Q,R,B,B,P are the number of White kings, queens, rooks, bishops, knights and pawns on the board. (2)D,S,I are doubled, backward and isolated White pawns. (3)M= White mobility (measured, say, as the number of legal moves available to White).
[edit] Mathematics in Basic Chess
In Mathematical explanation by [set theory] :
Board:
R = Rank ={1,2,3,4,5,6,7,8}
F = File ={1,2,3,4,5,6,7,8}
S = R×F
={1,2,3,4,5,6,7,8}×{1,2,3,4,5,6,7,8}
Starting Position:
SW = {1,2} × {1,2,3,4,5,6,7,8} = Starting position of White
= {1,2} × {a,b,c,d,e,f,g,h} [Co-Ordination]
SB = {7,8} × {1,2,3,4,5,6,7,8} = Starting position of Black
= {7,8} × {a,b,c,d,e,f,g,h}
Empty Squares:
E = {3,4,5,6} × {1,2,3,4,5,6,7,8}
= {3,4,5,6} × {a,b,c,d,e,f,g,h} [In Co-ordination]
... etc
[By Kazi Fujayel Ahmed]
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.
[edit] 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.
[edit] See also
[edit] 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 Chess in 1987