Difference between revisions of "Piece-Square Tables"

From Chessprogramming wiki
Jump to: navigation, search
(13 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
<span id="MultipleTables"></span>
 
<span id="MultipleTables"></span>
 
=Multiple Tables=  
 
=Multiple Tables=  
Most modern programs, influenced by [[Fruit]], use two sets of tables. One for the [[Opening|opening]] of the game and another for the [[Endgame|endgame]]. The final evaluation is them [[Tapered Eval|interpolated]] between these two based on [[Game Phases|game stage]] (often [[Material|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, [[Pawn|pawns]] can gain in value in the endgame using this method.
+
Most modern programs, influenced by [[Fruit]], use two sets of tables. One for the [[Opening|opening]] of the game and another for the [[Endgame|endgame]]. The final evaluation is then [[Tapered Eval|interpolated]] between these two based on [[Game Phases|game stage]] (often [[Material|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, [[Pawn|pawns]] can gain in value in the endgame using this method.
 
<span id="Preprocessing"></span>
 
<span id="Preprocessing"></span>
 
=Pre-processing=  
 
=Pre-processing=  
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 69: Line 72:
 
* [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]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=52861 multi-dimensional piece/square tables] by [[Pawel Koziol]], [[CCC]], July 04, 2014
 
* [http://www.talkchess.com/forum/viewtopic.php?t=52861 multi-dimensional piece/square tables] by [[Pawel Koziol]], [[CCC]], July 04, 2014
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=52861&start=8 Re: multi-dimensional piece/square tables] by Tony P., [[CCC]], January 28, 2020
+
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=52861&start=7 Re: multi-dimensional piece/square tables] by Tony P., [[CCC]], January 28, 2020 » [[Automated Tuning]]
 
==2015 ...==
 
==2015 ...==
 
* [http://www.talkchess.com/forum/viewtopic.php?t=57384 about pst] by [[Daniel Anulliero]], [[CCC]], August 26, 2015
 
* [http://www.talkchess.com/forum/viewtopic.php?t=57384 about pst] by [[Daniel Anulliero]], [[CCC]], August 26, 2015
Line 79: Line 82:
 
* [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]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=68311&start=19 Re: New uci engine: Rofchade] by [[Ronald Friederich]], [[CCC]], August 28, 2018 » [[RofChade]], [[Tapered Eval]]
 +
==2020 ...==
 +
* [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]]
 +
* [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
 +
* [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]]
 +
  
 
=External Links=  
 
=External Links=  
 
* [http://home.hccnet.nl/h.g.muller/pcsqr.html Evaluation: Piece-Square Tables] from [[Micro-Max]] by [[Harm Geert Muller]]
 
* [http://home.hccnet.nl/h.g.muller/pcsqr.html Evaluation: Piece-Square Tables] from [[Micro-Max]] by [[Harm Geert Muller]]
* [http://www.chessbin.com/post/Piece-Square-Table.aspx piece square table] from [[ChessBin.com]] by [[Adam Berent]]
 
 
* Cage. Music, art, chess - Film by Brian Brandt with [https://en.wikipedia.org/wiki/Margaret_Leng_Tan Margaret Leng Tan] and [https://www.linkedin.com/in/larry-list-937b888 Larry List], [https://en.wikipedia.org/wiki/Noguchi_Museum Noguchi Museum] <ref>[https://shop.noguchi.org/imofchre.html The Imagery of Chess Revisited]</ref> <ref>[https://www.youtube.com/watch?v=vegmCb9j4kE Discovering The Imagery of Chess featuring Larry List], 2017, [https://en.wikipedia.org/wiki/YouTube YouTube] Video </ref> <ref>[http://www.edochess.ca/batgirl/Imagery_of_Chess3.html The Imagery of Chess -Surrealism and Chess]</ref>, 2006, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
 
* Cage. Music, art, chess - Film by Brian Brandt with [https://en.wikipedia.org/wiki/Margaret_Leng_Tan Margaret Leng Tan] and [https://www.linkedin.com/in/larry-list-937b888 Larry List], [https://en.wikipedia.org/wiki/Noguchi_Museum Noguchi Museum] <ref>[https://shop.noguchi.org/imofchre.html The Imagery of Chess Revisited]</ref> <ref>[https://www.youtube.com/watch?v=vegmCb9j4kE Discovering The Imagery of Chess featuring Larry List], 2017, [https://en.wikipedia.org/wiki/YouTube YouTube] Video </ref> <ref>[http://www.edochess.ca/batgirl/Imagery_of_Chess3.html The Imagery of Chess -Surrealism and Chess]</ref>, 2006, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
 
: {{#evu:https://www.youtube.com/watch?v=Hva8WMcRyOE|alignment=left|valignment=top}}
 
: {{#evu:https://www.youtube.com/watch?v=Hva8WMcRyOE|alignment=left|valignment=top}}

Revision as of 22:34, 25 April 2021

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 ...

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

2015 ...

2020 ...


External Links

References

Up one level