Skip to main content

Solving Cram Using Combinatorial Game Theory

  • Conference paper
  • First Online:
Advances in Computer Games (ACG 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12516))

Included in the following conference series:

Abstract

In this paper we investigate the board game Cram, which is an impartial combinatorial game, using an \(\alpha \beta \) solver. Since Cram is a notoriously hard game in the sense that it is difficult to obtain reliable and useful domain knowledge to use in the search process, we decided to rely on knowledge obtained from Combinatorial Game Theory (CGT).

The first and most effective addition to our solver is to incorporate endgame databases pre-filled with CGT values (nimbers) for all positions fitting on boards with at most 30 squares. This together with two efficient move-ordering heuristics aiming at early splitting positions into fragments fitting in the available databases gives a large improvement of solving power. Next we define five more heuristics based on CGT that can be used to further reduce the sizes of the search trees considerably.

In the final version of our program we were able to solve all odd \(\times \) odd Cram boards for which results were available from the literature (even \(\times \) even and odd \(\times \) even boards are trivially solved). Investigating new boards led to solving two boards not solved before, namely the \(3 \times 21\) board, a first-player win, and the \(5 \times 11\) board, a second-player win.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    By a heuristic we mean a method that does not impact the final results, but only (hopefully) obtains the results faster.

  2. 2.

    We use chess-like notation for moves, where squares are indicated by their column (‘a’, ‘b’, etc, from left to right) and their row (‘1’, ‘2’, etc, from bottom to top). A move consists of the two squares covered separated by a colon.

  3. 3.

    The fact that these move-ordering heuristics are so successful does not contradict our statement that it is hard to find criteria indicating which moves are probably good or bad. It just leads to investigating first moves with small search trees (including hopefully “accidentally” winning moves).

References

  1. Albert, M.H., Nowakowski, R.J., Wolfe, D.: Lessons in Play: An Introduction to Combinatorial Game Theory. A K Peters, Wellesley (2007)

    Book  Google Scholar 

  2. Barton, M., Uiterwijk, J.W.H.M.: Combining combinatorial game theory with an \(\alpha \)-\(\beta \) solver for Domineering. In: Grootjen, F., Otworowska, M., Kwisthout, J. (eds.) BNAIC 2014 - Proceedings of the 26th Benelux Conference on Artificial Intelligence, pp. 9–16. Radboud University, Nijmegen (2014)

    Google Scholar 

  3. Berlekamp, E.R., Conway, J.H., Guy, R.K.: Winning Ways for your Mathematical Plays. Academic Press, London (1982). 2nd edition, in four volumes: vol. 1 (2001), vols. 2, 3 (2003), vol. 4 (2004). A K Peters, Wellesley

    Google Scholar 

  4. Bouton, C.I.: Nim, a game with a complete mathematical theory. Ann. Math. 3, 35–39 (1902)

    Article  MathSciNet  Google Scholar 

  5. Breuker, D.M., Uiterwijk, J.W.H.M., van den Herik, H.J.: Replacement schemes for transposition tables. ICCA J. 17(4), 183–193 (1994)

    Google Scholar 

  6. Conway, J.H.: On Numbers and Games. Academic Press, London (1976)

    MATH  Google Scholar 

  7. Gardner, M.: Mathematical games. Sci. Am. 230, 106–108 (1974)

    Article  Google Scholar 

  8. Greenblatt, R.D., Eastlake, D.E., Crocker, S.D.: The Greenblatt chess program. In: Proceedings of the AFIPS Fall Joint Computer Conference, vol. 31, pp. 801–810 (1967)

    Google Scholar 

  9. Grundy, P.M.: Mathematics and games. Eureka 2, 6–8 (1939)

    Google Scholar 

  10. Guy, R.K., Smith, C.A.B.: The G-values of various games. Proc. Camb. Philos. Soc. 52(3), 514–526 (1956)

    Article  MathSciNet  Google Scholar 

  11. Knuth, D.E., Moore, R.W.: An analysis of alpha-beta pruning. Artif. Intell. 6, 293–326 (1975)

    Article  MathSciNet  Google Scholar 

  12. Lemoine, J., Viennot, S.: Nimbers are inevitable. Theoret. Comput. Sci. 462, 70–79 (2012)

    Article  MathSciNet  Google Scholar 

  13. Lemoine, J., Viennot, S.: Records. http://sprouts.tuxfamily.org/wiki/doku.php?id=records#cram. Accessed 13 May 2019

  14. Plaat, A., Schaeffer, J., Pijls, W., de Bruin, A.: Nearly optimal minimax tree search? Technical report 94-19. University of Alberta, Department of Computing Science (1994)

    Google Scholar 

  15. Schneider, M.: Das Spiel Juvavum. Master thesis, Universität Salzburg (2009)

    Google Scholar 

  16. Sprague, R.P.: Über mathematische Kampfspiele. Tohoku Math. J. 41, 438–444 (1935)

    MATH  Google Scholar 

  17. Uiterwijk, J.W.H.M.: Construction and investigation of Cram endgame databases. ICGA J. 40(4), 425–437 (2018)

    Article  Google Scholar 

  18. Uiterwijk, J.W.H.M., Barton, M.: New results for Domineering from combinatorial game theory endgame databases. Theoret. Comput. Sci. 592, 72–86 (2015)

    Article  MathSciNet  Google Scholar 

  19. Uiterwijk, J.W.H.M., Griebel, J.: Combining combinatorial game theory with an \(\alpha \)-\(\beta \) solver for Clobber: theory and experiments. In: Bosse, T., Bredeweg, B. (eds.) BNAIC 2016 – Artificial Intelligence. Communications in Computer and Information Science, vol. 765, pp. 78–92 (2017)

    Google Scholar 

  20. Uiterwijk, J.W.H.M., Kroes, L.: Combining combinatorial game theory with an alpha-beta solver for Cram. In: Atzmueller, M., Duivesteijn, W. (eds.) BNAIC 2018: 30th Benelux Conference on Artificial Intelligence, pp. 267–280. Jheronimus Academy of Data Science, ’s-Hertogenbosch (2018)

    Google Scholar 

  21. Wolfe, D.: Snakes in Domineering games. Theoret. Comput. Sci. (Math Games) 119, 323–329 (1993)

    Article  MathSciNet  Google Scholar 

  22. Zobrist, A.L.: A new hashing method with application for game playing. Technical report #88, Computer Science Department, The University of Wisconsin, Madison (1970). Reprinted in ICCA J. 13(2), 69–73 (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jos W. H. M. Uiterwijk .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Uiterwijk, J.W.H.M. (2020). Solving Cram Using Combinatorial Game Theory. In: Cazenave, T., van den Herik, J., Saffidine, A., Wu, IC. (eds) Advances in Computer Games. ACG 2019. Lecture Notes in Computer Science(), vol 12516. Springer, Cham. https://doi.org/10.1007/978-3-030-65883-0_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-65883-0_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-65882-3

  • Online ISBN: 978-3-030-65883-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics