In computer chess, a chess engine is a computer program that analyzes chess or chess variant positions, and generates a move or list of moves that it regards as strongest. A chess engine is usually a back end with a command-line interface with no graphics or windowing. Engines are usually used with a front end, a windowed graphical user interface such as Chessbase or WinBoard that the user can interact with via a keyboard, mouse or touchscreen. This allows the user to play against multiple engines without learning a new user interface for each, and allows different engines to play against each other. Many chess engines are now available for mobile phones and tablets, making them even more accessible.
The meaning of the term "chess engine" has evolved over time. In 1986, Linda and Tony Sherzer entered their program Bebe into the 4th World Computer Chess Championship, running it on "Chess Engine," their brand name for the chess computer hardware made, and marketed by their company Sys-10, Inc. By 1990 the developers of Deep Blue, Feng-hsiung Hsu and Murray Campbell, were writing of giving their program a 'searching engine,' apparently referring to the software rather than the hardware. In December 1991, Computer-schach & Spiele referred to Chessbase's recently released Fritz as a 'Schach-motor,' the German translation for 'chess engine. By early 1993, Marty Hirsch was drawing a distinction between commercial chess programs such as Chessmaster 3000 or Battle Chess on the one hand, and 'chess engines' such as ChessGenius or his own MChess Pro on the other. In his characterization, commercial chess programs were low in price, had fancy graphics, but did not place high on the SSDF (Swedish Chess Computer Association) rating lists while engines were more expensive, and did have high ratings.
In 1994, Shay Bushinsky was working on an early version of his Junior program. He wanted to focus on the chess playing part rather than the graphics, and so asked Tim Mann how he could get Junior to communicate with Winboard. Tim's answer formed the basis for what became known as the Chess Engine Communication Protocol or Winboard engines, originally a subset of the GNU Chess command line interface.
Also in 1994, Stephen J. Edwards released the Portable Game Notation (PGN) specification. It mentions PGN reading programs not needing to have a "full chess engine." It also mentions three "graphical user interfaces" (GUI): XBoard, pgnRead and Slappy the database.
By the mid-2000s, engines had become so strong that they were able to beat even the best human players. In 2005, Michael Adams, a world top 10 player at the time, was comprehensively beaten 5½ - ½ by Hydra, drawing only one of the six games. Human v engine matches are now rare, and engines are increasingly regarded as tools for analysis rather than opponents.
In 1995, Chessbase released a version of their database program including Fritz 4 as a separate engine. This was the first appearance of the Chessbase protocol. Soon after, they added the engines Junior and Shredder to their product line up, including engines in CB protocol as separate programs which could be installed in the Chessbase program or one of the other Fritz style GUI's. Fritz 1-14 were only issued as Chessbase engines, while Hiarcs, Nimzo, Chess Tiger and Crafty have been ported to Chessbase format even though they were UCI or Winboard engines. Recently, Chessbase has begun to include Universal Chess Interface (UCI) engines in their playing programs such as Komodo, Houdini, Fritz 15–16 and Rybka rather than convert them to Chessbase engines.
In 2000, Stefan Meyer-Kahlen and Franz Huber released the Universal Chess Interface, a more detailed protocol that introduced a wider set of features. Chessbase soon after dropped support for Winboard engines, and added support for UCI to their engine GUI's and Chessbase programs. Most of the top engines are UCI these days: Stockfish, Komodo, Leela Chess Zero, Houdini, Fritz 15-16, Rybka, Shredder, Fruit, Critter, Ivanhoe and Ruffian.
From 1998, the German company Millenium 2000 briefly moved from dedicated chess computers into the software market, developing the Millennium Chess System (MCS) protocol for a series of CD's containing ChessGenius or Shredder, but after 2001 ceased releasing new software. A more longstanding engine protocol has been used by the Dutch company, Lokasoft, which eventually took over the marketing of Ed Schröder's Rebel.
Chess engines increase in playing strength continually. This is partly due to the increase in processing power that enables calculations to be made to ever greater depths in a given time. In addition, programming techniques have improved, enabling the engines to be more selective in the lines that they analyze and to acquire a better positional understanding. A chess engine often uses a vast previously computed opening "book" to increase its playing strength for the first several moves, up to possibly 20 moves or more in deeply analyzed lines.
Some chess engines maintain a database of chess positions, along with previously computed evaluations and best moves, in effect, a kind of "dictionary" of recurring chess positions. Since these positions are pre-computed, the engine merely plays one of the indicated moves in the database, thereby saving computing time, resulting in stronger, faster play.
Some chess engines use endgame tablebases to increase their playing strength during the endgame. An endgame tablebase includes all possible endgame positions with a small amount of material. Each position is conclusively determined as a win, loss, or draw for the player whose turn it is to move, and the number of moves to the end with best play by both sides. The tablebase identifies for every position the move which will win the fastest against an optimal defense, or the move that will lose the slowest against an optimal offense. Such tablebases are available for all chess endgames with seven pieces or fewer (trivial endgame positions are excluded, such as six white pieces versus a lone black king).
When the maneuvering in an ending to achieve an irreversible improvement takes more moves than the horizon of calculation of a chess engine, an engine is not guaranteed to find the best move without the use of an endgame tablebase, and in many cases can fall foul of the fifty-move rule as a result. Many engines use permanent brain (continuing to calculate during the opponent's turn) as a method to increase their strength.
Distributed computing is also used to improve the software code of chess engines. In 2013, the developers of the Stockfish chess playing program started using distributed computing to make improvements in the software code. As of June 2017[update], a total of more than 745 years of CPU time has been used to play more than 485 million chess games, with the results being used to make small and incremental improvements to the chess-playing software.
Limiting an engine's strengthEdit
By the late 1990s, the top engines had become so strong that few players stood a chance of winning a game against them. To give players more of a chance, engines began to include settings to adjust or limit their strength. In 2000, when Stefan Meyer-Kahlen and Franz Huber released the Universal Chess Interface protocol they included the parameters uci_limitstrength and uci_elo allowing engine authors to offer a variety of levels rated in accordance with Elo rating, as calibrated by one of the rating lists. Most GUIs for UCI engines allow users to set this Elo rating within the menus. Even engines that have not adopted this parameter will sometimes have an adjustable strength parameter (e.g. Stockfish 11). Engines which have a uci_elo parameter include Houdini, Fritz 15–16, Rybka, Shredder, Hiarcs, Junior, Zappa and Sjeng. GUI's such as Shredder, Chess Assistant, Convekta Aquarium, Hiarcs Chess Explorer or Martin Blume's Arena have dropdown menus for setting the engine's uci_elo parameter. The Fritz family GUI's, Chess Assistant and Aquarium also have independent means of limiting an engine's strength apparently based on an engine's ability to generate ranked lists of moves (called multipv for 'principle variation').
The results of computer tournaments give one view of the relative strengths of chess engines. However, tournaments do not play a statistically significant number of games for accurate strength determination. In fact, the number of games that need to be played between fairly evenly matched engines, in order to achieve significance, runs into the thousands and is, therefore, impractical within the framework of a tournament. Most tournaments also allow any types of hardware, so only engine/hardware combinations are being compared.
Historically, commercial programs have been the strongest engines. If an amateur engine wins a tournament or otherwise performs well (for example, Zappa in 2005), then it is quickly commercialized. Titles gained in these tournaments garner much prestige for the winning programs, and are thus used for marketing purposes.
Current tournaments include:
- Top Chess Engine Championship (TCEC)
- World Computer Chess Championship (WCCC)
- Chess.com Computer Chess Championship (CCCC)
Historic tournaments include:
- Dutch Open Computer Chess Championship
- Internet Computer Chess Tournament (CCT)
- International Paderborn Computer Chess Championship
- North American Computer Chess Championship
There are a number of factors that vary among the chess engine rating lists:
- Time control. Longer time controls, such as 40 moves in 120 minutes, are better suited for determining tournament play strength, but also make testing more time-consuming.
- Hardware used. Faster hardware with more memory leads to stronger play.
- 64-bit (vs. 32-bit) hardware and operating systems favor bitboard-based programs
- Multiprocessor vs. single processor hardware.
- Ponder settings (speculative analysis while the opponent is thinking) aka Permanent Brain.
- Transposition table sizes.
- Opening book settings.
These differences affect the results, and make direct comparisons between rating lists difficult.
|Rating list||Time control
|Top three engines||Rating|
|2005||November 7, 2020||2,732||1,189,229|
|2006||November 8, 2020||1875||1,401,865||
|2006||July 15, 2018||208||546,430||
|1984||11 July 2020||391||153,481||
- Note that all the listings in the above table only count the best entry for a given engine family. This is done to provide maximum diversity.
These ratings, although calculated by using the Elo system (or similar rating methods), have no direct relation to FIDE Elo ratings or to other chess federation ratings of human players. Except for some man versus machine games which the SSDF had organized many years ago (when engines were far from today's strength), there is no calibration between any of these rating lists and player pools. Hence, the results which matter are the ranks and the differences between the ratings, and not the absolute values. Also, each list calibrates their Elo via a different method. Therefore, no Elo comparisons can be made between the lists.
Missing from many rating lists are IPPOLIT and its derivatives. Although very strong and open source, there are allegations from commercial software interests that they were derived from a disassembled binary of Rybka. Due to the controversy, all these engines have been blacklisted from many tournaments and rating lists. Rybka in turn was accused of being based on Fruit, and in June 2011, the ICGA formally claimed Rybka was derived from Fruit and Crafty and banned Rybka from the International Computer Games Association World Computer Chess Championship, and revoked its previous victories (2007, 2008, 2009, and 2010). The ICGA received some criticism for this decision. Rybka is still included on several society ranking lists.[which?]
Top chess engine ratings have been improving at about 20 ELO per year since the advent of the CCRL rating list in 2005, and the yearly increment does not appear to be decreasing. With the Dec. 2017 debut of the AlphaZero chess engine, based on its spectacular record of success against Stockfish 8 giving it a speculative rating about 150 points higher or 3575, the question has been raised what the ELO rating would be of an engine that plays perfect chess. Statistician and chessmaster Ken Regan estimates that, for over the human international (FIDE) player pool, that number might be 3600 ELO, though that number is not directly comparable to engine ratings. However, the few man-machine matches played since 1997 have led theorists[which?] to recognize that some deflation in engine ratings has apparently occurred relative to human ELO scales, amounting to about 100 ELO points. That means, for example, that a human would have to be rated 100 ELO points stronger than an engine to achieve comparable play.
Engines can be tested by measuring their performance on specific positions. Typical is the use of test suites where for each given position there is one best move to find. These positions can be geared towards positional, tactical or endgame play. The Nolot test suite, for instance, focuses on deep sacrifices. The BT2450 and BT2630 test suites measure the tactical capability of a chess engine and have been used by REBEL. There is also a general test suite called Brilliancy which was compiled mostly from How to Reassess Your Chess Workbook. The Strategic Test Suite (STS) tests an engine's strategical strength. Another modern test suite is Nightmare II which contains 30 chess puzzles.[irrelevant citation]
Kasparov versus the World (chess game played with computer assistance)Edit
In 1999, Garry Kasparov played a chess game "Kasparov versus the World" over the Internet, hosted by the MSN Gaming Zone. Both sides used computer (chess engine) assistance. The "World Team" included the participation of over 50,000 people from more than 75 countries, deciding their moves by plurality vote. The game lasted four months, ending after Kasparov's 62nd move when he announced a forced checkmate in 28 moves found with the computer program Deep Junior. The World Team voters resigned on October 22. After the game, Kasparov said: "It is the greatest game in the history of chess. The sheer number of ideas, the complexity, and the contribution it has made to chess make it the most important game ever played."
Engines for chess variantsEdit
Some chess engines have been developed to play chess variants, adding the necessary code to simulate non-standard chess pieces, or to analyze play on non-standard boards. ChessV and Fairy-Max, for example, are both capable of playing variants on a chessboard up to 12×8 in size, such as Capablanca Chess (10×8 board).
For larger boards, however, there are few chess engines that can play effectively, and indeed chess games played on an unbounded chessboard (infinite chess) are virtually untouched by chess-playing software.
Graphical user interfacesEdit
Xboard/Winboard was one of the earliest graphical user interfaces (GUI). Tim Mann created it to provide a GUI for the GNU Chess engine, but after that, other engines such as Crafty appeared which used the Winboard protocol. Eventually, the program Chessmaster included the option to import other Winboard engines in addition to the King engine which was included.
In 1995, Chessbase began offering the Fritz engine as a separate program within the Chessbase database program and within the Fritz GUI. Soon after, they added the Junior and Shredder engines to their product line up, packaging them within the same GUI as was used for Fritz. In the late 1990s, the Fritz GUI was able to run Winboard engines via an adapter, but after 2000, Chessbase simply added support for UCI engines, and no longer invested much effort in Winboard.
Convekta's Chess Assistant and Lokasoft's ChessPartner also added the ability to import Winboard and UCI engines into their products. Shane Hudson developed Shane's Chess Information Database, a free GUI for Linux, Mac and Windows. Martin Blume developed Arena, another free GUI for Linux and Windows. Lucas Monge entered the field with the free Lucas Chess GUI. All three can handle both UCI and Winboard engines.
The Computer Chess Wiki lists many chess GUIs.
- Also available: 40 moves in 4 minutes
- Also available: 40 moves in 4 minutes, 40 moves in 120 minutes
- blog.chess.com Creating a chess engine from scratch (Part 1: Basics), Link date 28 June 2012
- Feng-hsiung Hsu, Thomas Anantharaman, Murray Campbell and Andreas Nowatzyk. "A Grandmaster Chess Machine." Scientific American. October 1990.
- Computer-schach & Spiele would later start using the English word 'engine,' eg. 1997#6 when describing Fritz or Hiarcs.
- "The True Value of Chess Software." Computer Chess Reports. 1992-3. vol. 3 no. 2 page 22
- "Adams 0.5 – Hydra 5.5". Chessbase.com. Retrieved 2011-12-17.
- Computer-schach & Spiele.
- http://tb7.chessok.com Lomonosov website allowing registered user to access 7-piece tablebase, and a forum with positions found.
- "Who wins from this? (chess puzzle)" An example chess position found from the Lomonosov chess tablebase.
- "Stockfish Testing Framework". tests.stockfishchess.org. Retrieved 7 March 2014.
- "Get Involved". stockfishchess.org. Retrieved 8 March 2014.
- Costalba, Marco (1 May 2013). "Fishtest Distributed Testing Framework". talkchess.com. Retrieved 18 April 2014.
- "Stockfish Testing Framework - Users". test.stockfishchess.org. Retrieved 17 June 2017.
- "Archived copy". Archived from the original on 2007-03-14. Retrieved 2018-11-29.CS1 maint: archived copy as title (link)
- "mizarchessengine.com". Retrieved 25 September 2016.
- "CCRL 40/40 - Index". November 5, 2016. Retrieved November 11, 2020.
- "CEGT 40/20". Chess Engines Grand Tournament. February 7, 2016. Retrieved November 11, 2020.
- "IPON". Ingo Bauer. November 16, 2016. Archived from the original on January 25, 2019. Retrieved February 3, 2016.
- "The SSDF Rating List". ssdf.bosjo.net. Retrieved November 11, 2020.
- "Chess engine controversy at chessvibes.com, retrieved 28/May/2010". Archived from the original on 2010-05-28. Retrieved 2010-05-28.
- "Evaluation". Archived from the original on 2011-08-11. Retrieved 2010-12-18.
- "Rybka disqualified and banned from World Computer Chess Championships | ChessVibes". Archived from the original on 2012-03-03. Retrieved 2011-06-30.
- Riis, Dr. Søren (January 2, 2012). "A Gross Miscarriage of Justice in Computer Chess (part one)". Chessbase News. Retrieved 19 February 2012.
- "Nolot test suite". Archived from the original on 2007-08-17. Retrieved 2007-08-04.
- "BT2450 test suite". Archived from the original on 2007-09-07. Retrieved 2007-10-10.
- Rosenboom, Manfred. "Rebel Century FAQ: 3. Using Rebel". Retrieved 25 September 2016.
- Brilliancy suite TalkChess forum
-  Strategic Test Suite
-  Nightmare II
- Harding, T. (2002). 64 Great Chess Games, Dublin: Chess Mail. ISBN 0-9538536-4-0.
- "Archived copy". Archived from the original on 2007-03-14. Retrieved 2018-11-29.CS1 maint: archived copy as title (link)
- Chess Engine's Polyglot Opening Book for WinBoard GUI - A general (learning) purpose Chess Engine's Polyglot Opening Book for WinBoard GUI.
- Chess Programming Wiki