History Heuristic
Home * Search * Move Ordering * History Heuristic
History Heuristic,
a dynamic move ordering method based on the number of cutoffs caused by a given move irrespectively from the position in which the move has been made. The Heuristic was invented by Jonathan Schaeffer in 1983 [2] and works as follows: on a cutoff we increment a counter in a special table, addressed either by [from][to] (the Butterfly Boards) or by [piece][to] [3] . The added value is typically depth * depth or 2 ^ depth, based on the assumption that otherwise moves from the plies near the leaves would have to much impact on the result. Values retrieved from that table are used to order non-capturing moves. This simple heuristics performs usually better than domain-dependent heuristics, though it may be combined with them. For example, in Rebel only a few non-captures are ordered by history heuristics, then a piece-square approach is used [4] . In the literature, history heuristic is often presented as depth-independent generalization of the killer moves. It is also said to reflect long-term plans in a position.
Contents
Random Noise?
However, all of those statements were made at the time when typical search depth was much lower than today. Nowadays some authors say that given enough search depth, history heuristic produces just a random noise [5] , whereas Ed Schröder, advocated not taking into account the cutoffs from the last couple of plies.
Update
This is how the history array may be updated, if a beta-cutoff occurs:
if ( score >= beta ) { // cutoff if ( isNonCapture (move) ) history[side2move][move.from][move.to] += depth*depth; // 1 << depth ... return score; }
Counter Moves History
A combination of the History Heuristic in conjunction with the Countermove Heuristic, proposed by Bill Henry in March 2015 [6] , as already used by Álvaro Begué in his Checkers program 20 years before [7] , was implemented by Stockfish contributor Stefan Geschwentner [8], further tuned and improved by the Stockfish community, and released in Stockfish 7 in January 2016, dubbed Counter Moves History and mentioned to gain some Elo points [9]. Stockfish's History and Countermove arrays are piece type and to-square based, not butterfly based. Each entry indexed by a previous move, is a complete history table with counters indexed by the move refuting that previous move. Pushing the idea further, Stockfish applies Follow Up History (FUH) tables, indexed by two consecutive moves of the same side [10].
Continuation History
``Continuation History`` is a generalization of Counter Moves History and Follow Up History. An ``n-ply Continuation History`` is the history score indexed by the move played n-ply ago and the current move. 1-ply and 2-ply continuation histories are most popular and correspond to Counter Moves History and Follow Up History respectively. Many programs, notably Stockfish, also makes use of 3, 4, and 6-ply continuation histories.
See also
- Butterfly Boards
- Butterfly Heuristic
- Chessmaps Heuristic
- Countermove Heuristic
- History Leaf Pruning
- Killer Heuristic
- Late Move Reductions
Selected Publications
1980 ...
- Jonathan Schaeffer (1983). The History Heuristic. ICCA Journal, Vol. 6, No. 3
- Jonathan Schaeffer (1989). The History Heuristic and Alpha-Beta Search Enhancements in Practice. IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 11, No. 11
- Jos Uiterwijk (1992). Memory Efficiency in some Heuristics. ICCA Journal, Vol. 15, No. 2
- Eric Thé (1992). An analysis of move ordering on the efficiency of alpha-beta search. Master's thesis, McGill University
2000 ...
- Mark Winands, Erik van der Werf, Jaap van den Herik, Jos Uiterwijk (2004). The Relative History Heuristic. CG 2004, pdf
- Jeff Rollason (2006). Driving search with Plausibility analysis: Looking at the right moves. AI Factory, Winter 2006
- Jeff Rollason (2007). Negative Plausibility. AI Factory, Spring 2007 [11]
Forum Posts
1995 ...
- (depth * depth) to replace (1 << depth) by Marcel van Kervinck, rgcc, January 29, 1996
- Killer and history by Jan Willem de Kort, CCC, June 22, 1998
- History Heuristic on its own by Chris Moreton, CCC, January 16, 1999
- What is the History table? by Leonid, CCC, September 15, 1999
2000 ...
- What is the Success Rate of Killer/History Moves? by Roberto Waldteufel, CCC, May 31, 2000
- History Heuristic by Larry Griffiths, CCC, August 28, 2000
- About history heuristics, killers and my futil. pruning code by Severi Salminen, CCC, December 06, 2000 » Killer Heuristic
- killers and history by Nathan Thom, CCC, January 22, 2003 » Killer Heuristic
- quiescent nodes, and history heuristic... by Joel Veness, CCC, January 30, 2003
- History Heuristic by Renze Steenhuisen, CCC, March 16, 2004
- About history and aging it by Mikael Bäckman, CCC, March 17, 2004
- History heuristic by Sergei S. Markoff, CCC, March 18, 2004
- Re: Artificial Intelligence in Computer Chess - *DETAILS* as promised by Artem Pyatakov, CCC, March 28, 2004 » Artificial Intelligence, Golch
2005 ...
- Improving history tables by Michael Sherwin, CCC, July 25, 2007
- killer moves and history heuristic table by Stuart Cracraft, CCC, November 17, 2008 » Killer Heuristic
- Alternatives to History Heuristics by Edsel Apostol, CCC, September 01, 2009
2010 ...
- dynamically modified evaluation function by Don Dailey, CCC, December 20, 2010
- Software Engineering by Onno Garms, CCC, March 13, 2011 » Toga
- On history counters again by Mincho Georgiev, CCC, August 31, 2011
- Killer and History: Increased Node Count by Cheney Nattress, CCC, January 15, 2013
- On history and piece square tables by Evert Glebbeek, CCC, May 24, 2013 » Piece-Square Tables
- Possible history table improvement by Laszlo Gaspar, CCC, May 30, 2013
- Improved history heuristic by Sergei S. Markoff, CCC, December 16, 2013
- Followup moves by Stefan Geschwentner, FishCooking, January 12, 2014 » Counter Moves History
- Recalculate history for remaining moves after each search by Sergei S. Markoff, CCC, January 30, 2014
- Idea of different history by Daniel José Queraltó, CCC, April 14, 2014
2015 ...
- Improving History Tables by Bill Henry, CCC, March 02, 2015
- History counters by Robert Hyatt, CCC, May 12, 2015
- History heuristic and fixed depth search by Peter Österlund, CCC, May 16, 2015 » Late Move Reduction Test Results, Texel
- History Heuristic - a new idea on an old idea? by thevinenator, OpenChess Forum, Novembere 19, 2015
- Re: Stockfish 7 progress by Lucas Braesch, CCC, January 17, 2016
- History heuristic and quiet move generation by Daniel José Queraltó, CCC, July 16, 2017 » Move Generation
- CMH question by Vivien Clauzon, CCC, December 08, 2019 » Counter Moves History
2020 ...
- Quick history move by Harm Geert Muller, CCC, May 09, 2020
- History bonus by Michael Hoffmann, CCC, February 09, 2021
External Links
- History Reductions from Ed Schröder's Programmer Corner (Wayback Machine, July 30, 2007)
- Killer heuristic from Wikipedia
References
- ↑ Alfred Agache - Alegoria da Fortuna, 1885, Palais des Beaux-arts, Lille, Category:Alfred Agache - Wikimedia Commons
- ↑ Jonathan Schaeffer (1983). The History Heuristic. ICCA Journal, Vol. 6, No. 3
- ↑ Jos Uiterwijk (1992). Memory Efficiency in some Heuristics. ICCA Journal, Vol. 15, No. 2
- ↑ Move Ordering in Rebel by Ed Schröder, also available as pdf
- ↑ Re: LMR: history or not? by Robert Hyatt from CCC, December 13, 2007
- ↑ Improving History Tables by Bill Henry, CCC, March 02, 2015
- ↑ Re: Improving History Tables by Álvaro Begué, CCC, March 02, 2015
- ↑ Followup moves by Stefan Geschwentner, FishCooking, January 12, 2014 » Counter Moves History
- ↑ Re: Stockfish 7 progress by Lucas Braesch, CCC, January 17, 2016
- ↑ Re: CMH question by Lucas Braesch, CCC, December 09, 2019
- ↑ Negative Plausibility Move Ordering by Alessandro Damiani, CCC, July 09, 2009