Difference between revisions of "Piece-Square Tables"

From Chessprogramming wiki
Jump to: navigation, search
 
(11 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
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]] <ref>[https://www.stmintz.com/ccc/index.php?id=18203 Re: What is "pre-processing"] by [[Ulrich Türke]], [[CCC]], May 08, 1998</ref> <ref>[https://www.stmintz.com/ccc/index.php?id=18213 Re: What is "pre-processing"] by [[Amir Ban]], [[CCC]], May 08, 1998</ref>.
 
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]] <ref>[https://www.stmintz.com/ccc/index.php?id=18203 Re: What is "pre-processing"] by [[Ulrich Türke]], [[CCC]], May 08, 1998</ref> <ref>[https://www.stmintz.com/ccc/index.php?id=18213 Re: What is "pre-processing"] by [[Amir Ban]], [[CCC]], May 08, 1998</ref>.
  
=Example=  
+
=Examples=  
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.
+
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. [[Ronald Friederich]] improved this approach using a [[Tapered Eval]] and [[Texel's Tuning Method|Texel's tuning method]] as applied in [[RofChade]] and [[PeSTO]].
 +
 
 
* [[Simplified Evaluation Function]]
 
* [[Simplified Evaluation Function]]
 +
* [[PeSTO's Evaluation Function]]
  
 
=See also=  
 
=See also=  
Line 31: Line 33:
 
* [[Oracle]]
 
* [[Oracle]]
 
* [[Space]]
 
* [[Space]]
 +
* [[Tapered Eval]]
  
 
=Publications=  
 
=Publications=  
Line 53: Line 56:
 
==2010 ...==  
 
==2010 ...==  
 
* [http://www.talkchess.com/forum/viewtopic.php?t=37191 dynamically modified evaluation function] by [[Don Dailey]], [[CCC]], December 20, 2010
 
* [http://www.talkchess.com/forum/viewtopic.php?t=37191 dynamically modified evaluation function] by [[Don Dailey]], [[CCC]], December 20, 2010
 +
'''2011'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=38766 Move ordering by PST] by [[Onno Garms]], [[CCC]], April 16, 2011 » [[History Heuristic]], [[Move Ordering]], [[Onno]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=38766 Move ordering by PST] by [[Onno Garms]], [[CCC]], April 16, 2011 » [[History Heuristic]], [[Move Ordering]], [[Onno]]
 
* [http://www.open-chess.org/viewtopic.php?f=5&t=1535 Questions for BB about Rybka PST = Fruit PST] by [[Ed Schroder|Rebel]], [[Computer Chess Forums|OpenChess Forum]], August 4, 2011 » [[Rybka Controversy]]
 
* [http://www.open-chess.org/viewtopic.php?f=5&t=1535 Questions for BB about Rybka PST = Fruit PST] by [[Ed Schroder|Rebel]], [[Computer Chess Forums|OpenChess Forum]], August 4, 2011 » [[Rybka Controversy]]
Line 62: Line 66:
 
* [http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?tid=22669 Take the Fruit Bishop tables...] by [[Miguel A. Ballicora|michiguel]], [[Computer Chess Forums|Rybka Forum]], August 16, 2011
 
* [http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?tid=22669 Take the Fruit Bishop tables...] by [[Miguel A. Ballicora|michiguel]], [[Computer Chess Forums|Rybka Forum]], August 16, 2011
 
* [http://www.open-chess.org/viewtopic.php?f=5&t=1570 PST of Fruit 2.1 and Rybka 1.0 Beta] by [[Mark Watkins|BB+]], [[Computer Chess Forums|OpenChess Forum]], August 22, 2011
 
* [http://www.open-chess.org/viewtopic.php?f=5&t=1570 PST of Fruit 2.1 and Rybka 1.0 Beta] by [[Mark Watkins|BB+]], [[Computer Chess Forums|OpenChess Forum]], August 22, 2011
 +
'''2012'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=42167 Incremental or non-incremental PST evaluation calcs] by [[Mark Pearce]], [[CCC]], January 26, 2012 » [[Incremental Updates]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=42167 Incremental or non-incremental PST evaluation calcs] by [[Mark Pearce]], [[CCC]], January 26, 2012 » [[Incremental Updates]]
 
* [http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=475603&t=44507 Re: Some thoughts on QS] by [[Don Dailey]], [[CCC]], July 25, 2012 » [[Quiescence Search]]
 
* [http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=475603&t=44507 Re: Some thoughts on QS] by [[Don Dailey]], [[CCC]], July 25, 2012 » [[Quiescence Search]]
 +
'''2013'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=48102 On history and piece square tables] by [[Evert Glebbeek]], [[CCC]], May 24, 2013 » [[History Heuristic]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=48102 On history and piece square tables] by [[Evert Glebbeek]], [[CCC]], May 24, 2013 » [[History Heuristic]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=50294 PSQ tables depending on king sides, pawn patterns etc.] by [[Sergei Markoff|Sergei S. Markoff]], [[CCC]], December 01, 2013
 
* [http://www.talkchess.com/forum/viewtopic.php?t=50294 PSQ tables depending on king sides, pawn patterns etc.] by [[Sergei Markoff|Sergei S. Markoff]], [[CCC]], December 01, 2013
 +
'''2014'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=50840 Piece/square table challenge] by [[Pawel Koziol]], [[CCC]], January 09, 2014
 
* [http://www.talkchess.com/forum/viewtopic.php?t=50840 Piece/square table challenge] by [[Pawel Koziol]], [[CCC]], January 09, 2014
 
* [http://www.talkchess.com/forum/viewtopic.php?t=51518 SEE logic] by [[Youri Matiounine]], [[CCC]], March 08, 2014 » [[Static Exchange Evaluation]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=51518 SEE logic] by [[Youri Matiounine]], [[CCC]], March 08, 2014 » [[Static Exchange Evaluation]]
Line 74: Line 81:
 
* [http://www.talkchess.com/forum/viewtopic.php?t=57575 high values of pst] by [[Daniel Anulliero]], [[CCC]], September 09, 2015
 
* [http://www.talkchess.com/forum/viewtopic.php?t=57575 high values of pst] by [[Daniel Anulliero]], [[CCC]], September 09, 2015
 
* [http://www.talkchess.com/forum/viewtopic.php?t=58231 pieces psqt] by [[Alexandru Mosoi]], [[CCC]], November 11, 2015
 
* [http://www.talkchess.com/forum/viewtopic.php?t=58231 pieces psqt] by [[Alexandru Mosoi]], [[CCC]], November 11, 2015
 +
'''2016'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=61631 Sanity check on piece-value tables] by [[Stuart Riffle]], [[CCC]], October 06, 2016
 
* [http://www.talkchess.com/forum/viewtopic.php?t=61631 Sanity check on piece-value tables] by [[Stuart Riffle]], [[CCC]], October 06, 2016
 
* [http://www.talkchess.com/forum/viewtopic.php?t=62257 Simple method for simple mates for programs without TBs] by [[J. Wesley Cleveland]], [[CCC]], November 25, 2016 » [[KBNK Endgame]], [[Mop-up Evaluation]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=62257 Simple method for simple mates for programs without TBs] by [[J. Wesley Cleveland]], [[CCC]], November 25, 2016 » [[KBNK Endgame]], [[Mop-up Evaluation]]
 +
'''2017'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=64972 Approximating Stockfish's Evaluation by PSQTs] by [[Thomas Dybdahl Ahle]], [[CCC]], August 23, 2017 » [[Automated Tuning#Regression|Regression]],  [[Stockfish]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=64972 Approximating Stockfish's Evaluation by PSQTs] by [[Thomas Dybdahl Ahle]], [[CCC]], August 23, 2017 » [[Automated Tuning#Regression|Regression]],  [[Stockfish]]
 +
'''2018'''
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66588 Learning piece-square table] by [[Mathieu Pagé]], [[CCC]], February 13, 2018 » [[Automated Tuning]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66588 Learning piece-square table] by [[Mathieu Pagé]], [[CCC]], February 13, 2018 » [[Automated Tuning]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66966 'ab-initio' piece values] by [[Harm Geert Muller]], [[CCC]], March 30, 2018 » [[Point Value]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66966 'ab-initio' piece values] by [[Harm Geert Muller]], [[CCC]], March 30, 2018 » [[Point Value]]
Line 83: Line 93:
 
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73865 PST for FRC] by [[Vivien Clauzon]], [[CCC]], May 07, 2020 » [[Chess960]]
 
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73865 PST for FRC] by [[Vivien Clauzon]], [[CCC]], May 07, 2020 » [[Chess960]]
 
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74752 Using piece-square table score for move ordering] by [[Maksim Korzh]], [[CCC]], August 11, 2020 » [[Move Ordering]]
 
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74752 Using piece-square table score for move ordering] by [[Maksim Korzh]], [[CCC]], August 11, 2020 » [[Move Ordering]]
 +
* [https://prodeo.actieforum.com/t120-engine-choosing-between-sets-of-piece-square-tables Engine choosing between sets of piece/square tables] by [[Pawel Koziol|nescitus]], [[Computer Chess Forums|ProDeo Forum]], December 05, 2020
 +
'''2021'''
 
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76256 Piece square tables] by [[Elias Nilsson]], [[CCC]], January 08, 2021
 
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76256 Piece square tables] by [[Elias Nilsson]], [[CCC]], January 08, 2021
 +
* [https://prodeo.actieforum.com/t252-little-fun-with-tscp little fun with TSCP] by [[Pawel Koziol|nescitus]], [[Computer Chess Forums|ProDeo Forum]], February 12, 2021 » [[TSCP]], [[PeSTO's Evaluation Function]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76831 The PSTs of Carnivor] by [[Michael Sherwin|Mike Sherwin]], [[CCC]], March 10, 2021
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77089 PST-only Evaluation for MinimalChess 0.4] by [[Thomas Jahn]], [[CCC]], April 15, 2021 » [[MinimalChess]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77379 Evaluating piece value] by Jon Lawrance, [[CCC]], May 25, 2021 » [[Point Value]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77546 Game Phase and tapered PSQT evaluation] by Jon12345, [[CCC]], June 23, 2021 » [[PeSTO's Evaluation Function]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77667 multi-PST for middle-game depend from kings positions] by [[Eugene Kotlov]], [[CCC]], July 08, 2021
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77715 Just an untested idea] by [[Ed Schroder|Ed Schröder]], [[CCC]], July 12, 2021 » [[Automated Tuning]]
 +
'''2022'''
 +
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=79401 Stuck trying to come up with my own PST values] by Kurt Peters, [[CCC]], February 22, 2022
 +
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=79049&start=127 Re: Devlog of Leorik - A.k.a. how to tune high-quality PSTs from scratch (material values) in 20 seconds] by [[Thomas Jahn]], [[CCC]], March 28, 2022 » [[Automated Tuning]], [[Leorik]]
  
 
=External Links=  
 
=External Links=  

Latest revision as of 21:03, 28 March 2022

Home * Evaluation * Piece-Square Tables

John Cage, Chess Pieces, ca. 1944 [1]

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 [2].

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 then 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 [3]. Pre-processing, also dubbed Pre Scan Heuristics as applied in Kittinger programs [4], most notably the Super Constellation [5], were used by Kaare Danielsen [6], Richard Lang [7], Don Dailey, who even developed a little language so that Larry Kaufman could express evaluation concepts in a more natural way [8], 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 [9].

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 [10] [11].

Examples

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. Ronald Friederich improved this approach using a Tapered Eval and Texel's tuning method as applied in RofChade and PeSTO.

See also

Publications

Forum Posts

1996 ...

2000 ...

2010 ...

2011

2012

2013

2014

Re: multi-dimensional piece/square tables by Tony P., CCC, January 28, 2020 » Automated Tuning

2015 ...

2016

2017

2018

2020 ...

2021

2022

External Links

References

Up one level