Difference between revisions of "Tapered Eval"

From Chessprogramming wiki
Jump to: navigation, search
m
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Evaluation]] * Tapered Eval'''
 
'''[[Main Page|Home]] * [[Evaluation]] * Tapered Eval'''
  
[[FILE:Polyphony2.JPG|border|right|thumb|[[Arts#Klee|Paul Klee]] - Ad Parnassum, 1932 <ref>[[Arts#Klee|Paul Klee]] - [https://en.wikipedia.org/wiki/File:Polyphony2.JPG Ad Parnassum], 1932, oil colors, stamped lines, dots stamped in white color and later repainted, on casein paint on canvas on stretcher frame, [https://en.wikipedia.org/wiki/Museum_of_Fine_Arts_Berne Museum of Fine Arts Berne], [https://en.wikipedia.org/wiki/Paul_Klee Paul Klee from Wikipedia]</ref> <ref>[https://en.wikipedia.org/wiki/Gradus_ad_Parnassum Gradus ad Parnassum - Wikipedia]</ref> ]]  
+
[[FILE:Polyphony2.JPG|border|right|thumb|[[:Category:Paul Klee|Paul Klee]] - Ad Parnassum, 1932 <ref>[[:Category:Paul Klee|Paul Klee]] - [https://en.wikipedia.org/wiki/File:Polyphony2.JPG Ad Parnassum], 1932, oil colors, stamped lines, dots stamped in white color and later repainted, on casein paint on canvas on stretcher frame, [https://en.wikipedia.org/wiki/Museum_of_Fine_Arts_Berne Museum of Fine Arts Berne], [https://en.wikipedia.org/wiki/Paul_Klee Paul Klee from Wikipedia]</ref> <ref>[https://en.wikipedia.org/wiki/Gradus_ad_Parnassum Gradus ad Parnassum - Wikipedia]</ref> ]]  
  
 
'''Tapered Eval''',<br/>
 
'''Tapered Eval''',<br/>
Line 79: Line 79:
 
* [https://en.wikipedia.org/wiki/Potentiometer#Linear_taper_potentiometer Linear taper potentiometer from Wikipedia]
 
* [https://en.wikipedia.org/wiki/Potentiometer#Linear_taper_potentiometer Linear taper potentiometer from Wikipedia]
 
* [https://en.wikipedia.org/wiki/Sigmoid_function Sigmoid function from Wikipedia]
 
* [https://en.wikipedia.org/wiki/Sigmoid_function Sigmoid function from Wikipedia]
* [[Videos#AssociationPC|Association P.C.]] - Frau Theunissen´s Kegel, [http://www.discogs.com/Association-PC-Erna-Morena/master/248647 Erna Morena] (1973),  [https://en.wikipedia.org/wiki/YouTube YouTube] Video
+
* [[:Category:Association P.C.|Association P.C.]] - Frau Theunissen´s Kegel, [http://www.discogs.com/Association-PC-Erna-Morena/master/248647 Erna Morena] (1973),  [https://en.wikipedia.org/wiki/YouTube YouTube] Video
: [[Videos#PierreCourbois|Pierre Courbois]], [[Videos#JasperVantHof|Jasper van 't Hof]], [[Videos#TotoBlanke|Toto Blanke]], [https://de.wikipedia.org/wiki/Sigi_Busch Sigi Busch], and [https://de.wikipedia.org/wiki/Heiner_Wiberny Heiner Wiberny]
+
: [[:Category:Pierre Courbois|Pierre Courbois]], [[:Category:Jasper van 't Hof|Jasper van 't Hof]], [[:Category:Toto Blanke|Toto Blanke]], [https://de.wikipedia.org/wiki/Sigi_Busch Sigi Busch], and [https://de.wikipedia.org/wiki/Heiner_Wiberny Heiner Wiberny]
 
: {{#evu:https://www.youtube.com/watch?v=YPFEcXTxcMA|alignment=left|valignment=top}}
 
: {{#evu:https://www.youtube.com/watch?v=YPFEcXTxcMA|alignment=left|valignment=top}}
  
Line 88: Line 88:
 
'''[[Evaluation|Up one level]]'''
 
'''[[Evaluation|Up one level]]'''
 
[[Category:Paul Klee]]
 
[[Category:Paul Klee]]
 +
[[Category:Association P.C.]]
 +
[[Category:Pierre Courbois]]
 +
[[Category:Jasper van 't Hof]]
 +
[[Category:Toto Blanke]]

Revision as of 21:54, 12 August 2018

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.

History

Though Tapered Eval has been used for many years (for example The King, as described in 1991 [3] and Phalanx), and was already mentioned by Hans Berliner in 1979 [4], the technique gained massive popularity only during the past few years, with the release of Fruit and the growing awareness among programmers of the sensitivity of the evaluation function to discontinuity. [5]. Zurichess by Alexandru Moșoi uses the TensorFlow library for automated tuning - in a two layers neural network, the second layer is for phasing endgame and middlegame scores [6].

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

External Links

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

References

Up one level