Solving Patience and Solitaire Games with Good Old Fashioned AI (Invited Talk)

Author Ian P. Gent



PDF
Thumbnail PDF

File

LIPIcs.CP.2024.1.pdf
  • Filesize: 365 kB
  • 1 pages

Document Identifiers

Author Details

Ian P. Gent
  • School of Computer Science, University of St Andrews, UK

Acknowledgements

I pay special thanks to my former students Charlie Blake and Jack Waller who did much of the outstanding work this talk is based on. I thank all others who have helped me in my work on patience, including Matt Birrell, Dawn Black, Laura Brewis, Arthur W. Cabral, Gal Cohensius, Nguyen Dang, Shlomi Fish, Jordina Francès de Mas, Alan Frisch, Chris Jefferson, Michael Keller, Donald Knuth, Dana Mackenzie, Mark Masten, Ian Miguel, Peter Nightingale, Theodore Pringle, Bill Roscoe, András Salamon, Felix Ulrich-Oltean, Judith Underwood, and (posthumously) Jan Wolter. I thank Paul Shaw for inviting me to give this talk.

Cite As Get BibTex

Ian P. Gent. Solving Patience and Solitaire Games with Good Old Fashioned AI (Invited Talk). In 30th International Conference on Principles and Practice of Constraint Programming (CP 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 307, p. 1:1, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024) https://doi.org/10.4230/LIPIcs.CP.2024.1

Abstract

While games like Chess, Checkers and Go have been the subject of extensive research in AI for decades, there has been comparatively little study of single player card games. These games are generally called "Patience" in British English and "Solitaire" in US English, and have been popular for hundreds of years and remain so today. In fact, our ignorance of the winnability percentage of just one such game - "Klondike" - has been described as "one of the embarrassments of applied mathematics" by the distinguished statistician Persi Diaconis. 
I will talk about "Solvitaire", a program to solve patience games given a simple JSON description of the rules of the game and the initial layout. We have used Solvitaire to determine the winnability percentage of dozens different single-player card games with a 95% confidence interval of ± 0.1% or better. For example, we now know the winnability of Klondike as 81.945% ± 0.084% (in the "thoughtful" variant where the player knows the rank and suit of all cards), a 30-fold reduction in confidence interval over the best previous result. The vast majority of results we obtained with Solvitaire are either entirely new or represent significant improvements on previous knowledge. 
Solvitaire is very much a "Good Old Fashioned AI" approach to solving patience games, without using Machine Learning or Neural networks. It uses exhaustive depth-first search to explore all possible ways that a game could possibly be won, ensuring that games reported unwinnable really are so. This can involve searching extraordinary seach spaces with depths in the millions even including cases where unwinnability is proven. Numerous techniques imported from AI search play an important role in making this search practicable. Particularly important ones are: the use of a transposition tables; the exploitation of symmetry in search; the use of dominances to force certain moves to be made when it is safe to do so; and the use of streamliners. Solvitaire does have some games it performs poorly on, where exhaustive search is unable to prove that no win is possible but an alternative simple proof is in fact available. I will also talk about using constraint models do this, leading to slight improvements in some variants of Klondike but dramatic improvements in others.
This talk will include personal anecdotes, explaining for example why it is dedicated to my mother Margaret Gent (1923-2021) for her patience in teaching me to love the game of patience.

Subject Classification

ACM Subject Classification
  • Computing methodologies → Discrete space search
Keywords
  • AI Search
  • Solitaire and Patience Games

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail