Solving chess

From HandWiki
Short description: Finding an optimal algorithm for playing chess

Solving chess consists of finding an optimal strategy for the game of chess; that is, one by which one of the players (White or Black) can always force a victory, or either can force a draw (see solved game). It is also related to more generally solving chess-like games (i.e. combinatorial games of perfect information) such as Capablanca chess and infinite chess.

In a weaker sense, solving chess may refer to proving which one of the three possible outcomes (White wins; Black wins; draw) is the result of two perfect players, without necessarily revealing the optimal strategy itself (see indirect proof).[1]

No complete solution for chess in either of the two senses is known, nor is it expected that chess will be solved in the near future (if ever). There is disagreement on whether the current exponential growth of computing power will continue long enough to someday allow for solving it by "brute force", i.e. by checking all possibilities.

Progress to date is extremely limited; there are tablebases of perfect endgame play with a small number of pieces (up to seven), and some chess variants have been solved at least weakly. Calculated estimates of game-tree complexity and state-space complexity of chess exist which provide a bird's eye view of the computational effort that might be required to solve the game.

Partial results

Endgame tablebases

Script error: No such module "Chessboard".

Endgame tablebases are computerized databases that contain precalculated exhaustive analyses of positions with small numbers of pieces remaining on the board. Tablebases have solved chess to a limited degree, determining perfect play in a number of endgames, including all non-trivial endgames with no more than seven pieces or pawns (including the two kings).Cite error: Closing </ref> missing for <ref> tag[2] Such a position is beyond the ability of any human to solve, and no chess engine plays it correctly, either, without access to the tablebase, which initially (in 2014) required 140 TB of storage space and the use of a supercomputer but was later reduced down to 18.4 TB through the Syzygy tablebase. As of January 2023, the longest known forced mating sequence for the eight-piece tablebase (also ignoring the 50-move rule) was 584 moves. This was discovered in mid-2022 by developer, computer chess enthusiast, and physicist Marc Bourzutschky.[3] The eight-piece tablebase is currently incomplete, though, so it is not guaranteed that this is the absolute limit for the eight-piece tablebase.

Chess variants

A variant first described by Shannon provides an argument about the game-theoretic value of chess: he proposes allowing the move of “pass”. In this variant, it is provable with a strategy stealing argument that the first player has at least a draw thus: if the first player has a winning move, let him play it, else pass. The second player now faces the same situation owing to the mirror image symmetry of the board: if the first player had no winning move in the first instance, the second player has none now. Therefore, the second player can at best draw, and the first player can at least draw, so a perfect game results in the first player winning or drawing.[4]

Some chess variants which are simpler than chess have been solved. A winning strategy for Black in Maharajah and the Sepoys can be easily memorised. The 5×5 Gardner's Minichess variant has been weakly solved as a draw.[5] Although losing chess is played on an 8x8 board, its forced capture rule greatly limits its complexity, and a computational analysis managed to weakly solve this variant as a win for White.[6]

The prospect of solving individual, specific, chess-like games becomes more difficult as the board-size is increased, such as in large chess variants, and infinite chess.[7]

The complexity of chess

Information theorist Claude Shannon in 1950 outlined a theoretical procedure for playing a perfect game (i.e. solving chess):

"With chess it is possible, in principle, to play a perfect game or construct a machine to do so as follows: One considers in a given position all possible moves, then all moves for the opponent, etc., to the end of the game (in each variation). The end must occur, by the rules of the games after a finite number of moves (remembering the 50 move drawing rule). Each of these variations ends in win, loss or draw. By working backward from the end one can determine whether there is a forced win, the position is a draw or is lost."

Shannon then went on to estimate that solving chess according to that procedure would require comparing some 10120 possible game variations, or having a "dictionary" denoting an optimal move for each of the approximately 1043 possible board positions (currently known to be about 5x1044 [8]).[4] The number of mathematical operations required to solve chess, however, may be significantly different than the number of operations required to produce the entire game-tree of chess. In particular, if White has a forced win, only a subset of the game-tree would require evaluation to confirm that a forced-win exists (i.e. with no refutations from Black). Furthermore, Shannon's calculation for the complexity of chess assumes an average game length of 40 moves, but there is no mathematical basis to say that a forced win by either side would have any relation to this game length. Indeed, some expertly played games (grandmaster-level play) have been as short as 16 moves. For these reasons, mathematicians and game theorists have been reluctant to categorically state that solving chess is an intractable problem.[4][9]

Predictions on when or if chess will be solved

In 1950, Shannon calculated, based on a game tree complexity of 10120 and a computer operating at one megahertz (a big stretch at that time: the UNIVAC 1 introduced in 1951 could perform ~2000 operations per second or 2 kilohertz) that could evaluate a terminal node in 1 microsecond would take 1090 years to make its first move. Even allowing for technological advances, solving chess within a practical time frame would therefore seem beyond any conceivable technology.

Hans-Joachim Bremermann, a professor of mathematics and biophysics at the University of California at Berkeley, further argued in a 1965 paper that the "speed, memory, and processing capacity of any possible future computer equipment are limited by specific physical barriers: the light barrier, the quantum barrier, and the thermodynamical barrier. These limitations imply, for example, that no computer, however constructed, will ever be able to examine the entire tree of possible move sequences of the game of chess." Nonetheless, Bremermann did not foreclose the possibility that a computer would someday be able to solve chess. He wrote, "In order to have a computer play a perfect or nearly perfect game, it will be necessary either to analyze the game completely ... or to analyze the game in an approximate way and combine this with a limited amount of tree searching. ... A theoretical understanding of such heuristic programming, however, is still very much wanting."[10]

Recent scientific advances have not significantly changed these assessments. The game of checkers was (weakly) solved in 2007,[11] but it has roughly the square root of the number of positions in chess. Jonathan Schaeffer, the scientist who led the effort, said a breakthrough such as quantum computing would be needed before solving chess could even be attempted, but he does not rule out the possibility, saying that the one thing he learned from his 16-year effort of solving checkers "is to never underestimate the advances in technology".[12]

See also

  • Shannon number (a calculation of the lower bound of the game-tree complexity of chess)
  • First-move advantage in chess

References

  1. Allis, V. (1994). "PhD thesis: Searching for Solutions in Games and Artificial Intelligence". Department of Computer Science. University of Limburg. http://www.dphu.org/uploads/attachements/books/books_3721_0.pdf. 
  2. "Probe". https://tb7.chessok.com/probe/3/61. 
  3. Silver, Albert (2022-05-11). "8-piece endgame tablebases - first findings and interview!" (in en). Chess News. https://en.chessbase.com/post/8-piece-endgame-tablebases-first-findings-and-interview. 
  4. 4.0 4.1 4.2 Shannon, C. (March 1950). "Programming a Computer for Playing Chess". Philosophical Magazine. 7 41 (314). http://archive.computerhistory.org/projects/chess/related_materials/text/2-0%20and%202-1.Programming_a_computer_for_playing_chess.shannon/2-0%20and%202-1.Programming_a_computer_for_playing_chess.shannon.062303002.pdf. Retrieved 2008-06-27. 
  5. Mhalla, Mehdi; Prost, Frederic (2013-07-26). "Gardner's Minichess Variant is solved". arXiv:1307.7118 [cs.GT].
  6. Watkins, Mark. "Losing Chess: 1. e3 wins for White". https://magma.maths.usyd.edu.au/~watkins/LOSING_CHESS/LCsolved.pdf. 
  7. Aviezri Fraenkel; D. Lichtenstein (1981), "Computing a perfect strategy for n×n chess requires time exponential in n", J. Combin. Theory Ser. A 31 (2): 199–214, doi:10.1016/0097-3165(81)90016-9 
  8. John Tromp (2021). "Chess Position Ranking". https://github.com/tromp/ChessPositionRanking. 
  9. http://www.chessgames.com Magnus Carlsen vs Viswanathlan Anand, King's Indian Attack: Double Fianchetto (A07), 1/2-1/2, 16 moves.
  10. Bremermann, H.J. (1965). "Quantum Noise and Information". Proc. 5th Berkeley Symp. Math. Statistics and Probability. http://www.aeiveos.com/~bradbury/Authors/Computing/Bremermann-HJ/QNaI.html. 
  11. Schaeffer, Jonathan; Burch, Neil; Björnsson, Yngvi et al. (14 September 2007). "Checkers Is Solved". Science 317 (5844): 1518–1522. doi:10.1126/science.1144079. PMID 17641166. Bibcode2007Sci...317.1518S. 
  12. Sreedhar, Suhas. "Checkers, Solved!". Spectrum.ieee.org. http://www.spectrum.ieee.org/print/5379. 

External links