Piece-Square Tables

Home * Evaluation * Piece-Square Tables



Piece-Square Tables, a simple way to assign values to specific pieces on specific squares. A table is created for each piece of each color, and values assigned to each square. This scheme is fast, since the evaluation term from the piece square tables can be incrementally updated as moves are made and unmade in the search tree. Because of that speed, piece-square tables are of great help when conducting lazy evaluation.

The same technique can be used for a more subtle evaluation terms, instead of one fixed value for, say, an isolated pawn. It is also possible to use piece-square tables for move ordering, though history heuristic tends to perform better. Some programs, like Rebel, use the combination of the two.

=Multiple Tables= Most modern programs, influenced by Fruit, use two sets of tables. One for the opening of the game and another for the endgame. The final evaluation is them interpolated between these two based on game stage (often material on the board). This allows for changes in material as well, since the material part of the evaluation can also be stored in these tables. Using two tables also lets pieces change in evaluation as the game proceeds. For example, pawns can gain in value in the endgame using this method. =Pre-processing= Older programs, running on slow hardware and reaching low depths, used an oracle approach to speed up their evaluation by initializing the piece-square tables at the beginning of each search, taking into account complex characteristics of position, influence of pawn structure, distance to the enemy king etc. Pre-processing, also dubbed Pre Scan Heuristics as applied in Kittinger programs, most notably the Super Constellation , were used by Kaare Danielsen , Richard Lang , Don Dailey, who even developed a little language so that Larry Kaufman could express evaluation concepts in a more natural way , Chrilly Donninger with Nimzo 3, and Frans Morsch and Mathias Feist with Fritz 3, to name a few, the latter even with user modifiable rules or tables. However, the idea already originated from the program Tech by James Gillogly in the late 1960's.

With today's search depth this approach seems to be impractical, since the difference between the root and leaf position may be very big. There also might be a problem with re-using hash scores from the previous entries. About the only recent chess program that sticks with pre-processing for good or bad is RomiChess.

=Example= Material and piece-square tables alone are enough for a program to play a semi-decent game of chess. Indeed, Tomasz Michniewski advocated a method of testing requiring all the tested programs to have identical, simplistic evaluation function, so that only search and efficiency issues would influence the result. One such tournament has been carried out in Poland.
 * Simplified Evaluation Function

=See also=
 * Center Distance
 * Center Manhattan-Distance
 * Evaluation in Rookie 2.0
 * Evaluation of Pieces
 * Game Phases
 * Material
 * Mop-up Evaluation
 * Oracle
 * Space

=Publications=
 * Jack Good (1968). A Five-Year Plan for Automatic Chess - Appendix F. The Value of the Pieces and Squares. Machine Intelligence Vol. 2
 * Don Beal, Martin C. Smith (1999). Learning Piece-Square Values using Temporal Differences. ICCA Journal, Vol. 22, No. 4
 * Jun Nagashima, Masahumi Taketoshi, Yoichiro Kajihara, Tsuyoshi Hashimoto, Hiroyuki Iida (2002). An Efficient Use of Piece-Square Tables in Computer Shogi.
 * Sacha Droste, Johannes Fürnkranz (2008). Learning of Piece Values for Chess Variants. Technical Report TUD–KE–2008-07, Knowledge Engineering Group, TU Darmstadt, pdf

=Forum Posts=

1996 ...

 * Re:Rebel Transposition Table discussion by Robert Hyatt, rgcc, April 18, 1996, about clearing TT if using a preprocessor.
 * The Diep Home page (more correction needed) by Ed Schröder, rgcc, January 21, 1997
 * Question about prescan and evaluating in Crafty by Willem Broekema, rgcc, January 07, 1998
 * What is "pre-processing" by Howard Exner, CCC, May 07, 1998
 * Preprocessing vs leaf evaluating - any preprocessors left? by Tom King, rgcc, July 05, 1998

2000 ...

 * Preprocessor blues? by Ernst Walet, CCC, February 07, 2000
 * Re: What is Prescan Heuristics ?? by Vincent Diepeveen, CCC, October 13, 2000
 * Program settings (Re: Programmers Should Take A Cue From Chessmaster) by Albert Bertilsson, CCC, July 04, 2003 » Sharper
 * Pieze/square tables by Fermin Serrano, CCC, May 21, 2008
 * Determining values for piece-square tables. by Mike Leany, CCC, September 21, 2009

2010 ...

 * dynamically modified evaluation function by Don Dailey, CCC, December 20, 2010
 * Move ordering by PST by Onno Garms, CCC, April 16, 2011 » History Heuristic, Move Ordering, Onno
 * Questions for BB about Rybka PST = Fruit PST by Rebel, OpenChess Forum, August 4, 2011 » Rybka Controversy
 * PST Calculation by michiguel, Rybka Forum, August 5, 2011
 * Fruit and Crafty Bishop PSTs by michiguel, Rybka Forum, August 12, 2011
 * A small detail about additive constants to PSTs by Trotsky, Rybka Forum, August 13, 2011
 * Fruit 1.0 PST by BB+ (Mark Watkins), OpenChess Forum, August 13, 2011
 * About PSQ tables by Richard Vida, Rybka Forum, August 15, 2011
 * Take the Fruit Bishop tables... by michiguel, Rybka Forum, August 16, 2011
 * PST of Fruit 2.1 and Rybka 1.0 Beta by BB+, OpenChess Forum, August 22, 2011
 * Incremental or non-incremental PST evaluation calcs by Mark Pearce, CCC, January 26, 2012 » Incremental Updates
 * Re: Some thoughts on QS by Don Dailey, CCC, July 25, 2012 » Quiescence Search
 * On history and piece square tables by Evert Glebbeek, CCC, May 24, 2013 » History Heuristic
 * PSQ tables depending on king sides, pawn patterns etc. by Sergei S. Markoff, CCC, December 01, 2013
 * Piece/square table challenge by Pawel Koziol, CCC, January 09, 2014
 * SEE logic by Youri Matiounine, CCC, March 08, 2014 » Static Exchange Evaluation
 * multi-dimensional piece/square tables by Pawel Koziol, CCC, July 04, 2014

2015 ...

 * about pst by Daniel Anulliero, CCC, August 26, 2015
 * high values of pst by Daniel Anulliero, CCC, September 09, 2015
 * pieces psqt by Alexandru Mosoi, CCC, November 11, 2015
 * Sanity check on piece-value tables by Stuart Riffle, CCC, October 06, 2016
 * Simple method for simple mates for programs without TBs by J. Wesley Cleveland, CCC, November 25, 2016 » KBNK Endgame, Mop-up Evaluation
 * Approximating Stockfish's Evaluation by PSQTs by Thomas Dybdahl Ahle, CCC, August 23, 2017 » Regression, Stockfish
 * Learning piece-square table by Mathieu Pagé, CCC, February 13, 2018 » Automated Tuning
 * 'ab-initio' piece values by Harm Geert Muller, CCC, March 30, 2018 » Point Value

=External Links=
 * Evaluation: Piece-Square Tables from Micro-Max by Harm Geert Muller
 * piece square table from ChessBin.com by Adam Berent
 * Cage. Music, art, chess - Film by Brian Brandt with Margaret Leng Tan and Larry List, Noguchi Museum , 2006, YouTube Video

=References=

Up one level