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

=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, 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, as already used by Álvaro Begué in his Checkers program 20 years before , was implemented by Stockfish contributor Stefan Geschwentner , 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. 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.

=See also=
 * Butterfly Boards
 * Butterfly Heuristic
 * Chessmaps Heuristic
 * Countermove Heuristic
 * History Leaf Pruning
 * Killer Heuristic
 * Late Move Reductions
 * Late Move Reduction Test Results


 * Neural MoveMap Heuristic
 * Relative History Heuristic
 * Vice Video

=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

=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= Up one Level