Tapered_Eval - peregrineshahin/ChessProgrammingWiki GitHub Wiki


title: Tapered Eval

Home * Evaluation * Tapered Eval

[ Paul Klee - Ad Parnassum, 1932 [1] [2] Tapered Eval,

a technique used in evaluation to make a smooth transition between the phases of the game using a fine grained numerical game phase value considering type of captured pieces so far. The technique requires aggregating two distinct scores for the position, with weights corresponding to the opening and endgame. The current game phase is then used to interpolate between these values. The idea behind Tapered Eval is to remove evaluation discontinuity.

Implementation example

Tapered Eval is done as follows in Fruit (similar implementations can be found in engines like Crafty and Stockfish etc.). The scaling looks like this:


eval = ((opening * (256 - phase)) + (endgame * phase)) / 256

Where opening is the evaluation of the position with middle game in mind (e.g. keep kings protected behind their pawn covers) and endgame is the evaluation with endgame in mind (e.g. activate the kings). Both these evaluations are done in parallel when evaluating a position.

The phase is evaluated like this (code specifics left out):


PawnPhase = 0
KnightPhase = 1
BishopPhase = 1
RookPhase = 2
QueenPhase = 4
TotalPhase = PawnPhase*16 + KnightPhase*4 + BishopPhase*4 + RookPhase*4 + QueenPhase*2

phase = TotalPhase

phase -= wp * PawnPhase // Where wp is the number of white pawns currently on the board
phase -= wn * Knight    // White knights
...
phase -= br * RookPhase
phase -= bq * QueenPhase

phase = (phase * 256 + (TotalPhase / 2)) / TotalPhase

See also

Selected Publications

Forum Posts

2005 ...

2010 ...

2015 ...

Re: Tapered Eval between 4 phases by Jonathan Rosenthal, CCC, October 16, 2017 » Winter Re: Tapered Eval between 4 phases by Youri Matiounine, CCC, October 16, 2017 » AVX2

2020 ...

External Links

Pierre Courbois, Jasper van 't Hof, Toto Blanke, Sigi Busch, and Heiner Wiberny

References

  1. Paul Klee - Ad Parnassum, 1932, oil colors, stamped lines, dots stamped in white color and later repainted, on casein paint on canvas on stretcher frame, Museum of Fine Arts Berne, Paul Klee from Wikipedia
  2. Gradus ad Parnassum - Wikipedia
  3. Don Beal (1991). Report on the 11th World Microcomputer Chess Championship. ICCA Journal, Vol. 14, No. 2
  4. Hans Berliner (1979). On the Construction of Evaluation Functions for Large Domains. III. Smoothness, IJCAI 1979, Tokyo, Vol. 1
  5. Re: Secrets of Rybka and Fruit from my point of view by Stuart Cracraft, CCC, December 15, 2005
  6. Re: Deep Learning Chess Engine ? by Alexandru Mosoi, CCC, July 21, 2016

Up one level