Skip to main content

Computing and Predicting Winning Hands in the Trick-Taking Game of Klaverjas

  • Conference paper
  • First Online:
Artificial Intelligence (BNAIC 2018)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1021))

Included in the following conference series:

  • 801 Accesses

Abstract

This paper deals with the trick-taking game of Klaverjas, in which two teams of two players aim to gather as many high valued cards for their team as possible. We propose an efficient encoding to enumerate possible configurations of the game, such that subsequently \(\alpha \beta \)-search can be employed to effectively determine whether a given hand of cards is winning. To avoid having to apply the exact approach to all possible game configurations, we introduce a partitioning of hands into \(981,\!541\) equivalence classes. In addition, we devise a machine learning approach that, based on a combination of simple features is able to predict with high accuracy whether a hand is winning. This approach essentially mimics humans, who typically decide whether or not to play a dealt hand based on various simple counts of high ranking cards in their hand. By comparing the results of the exact algorithm and the machine learning approach we are able to characterize precisely which instances are difficult to solve for an algorithm, but easy to decide for a human. Results on almost one million game instances show that the exact approach typically solves a game within minutes, whereas a relatively small number of instances require up to several days, traversing a space of several billion game states. Interestingly, it is precisely those instances that are always correctly classified by the machine learning approach. This suggests that a hybrid approach combining both machine learning and exact search may be the solution to a perfect real-time artificial Klaverjas agent.

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.

    See also: N.J.A. Sloane. The On-Line Encyclopedia of Integer Sequences, https://oeis.org. Sequence A001496.

References

  1. Beckenbach, E.F.: Applied Combinatorial Mathematics. Krieger Publishing Co., Inc., Melbourne (1981)

    MATH  Google Scholar 

  2. Bonnet, É., Jamain, F., Saffidine, A.: On the complexity of trick-taking card games. In: IJCAI, pp. 482–488 (2013)

    Google Scholar 

  3. Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001)

    Article  Google Scholar 

  4. Breiman, L., Friedman, J., Stone, C.J., Olshen, R.: Classification and Regression Trees. Chapman and Hall/CRC, Wadsworth (1984)

    MATH  Google Scholar 

  5. Buro, M., Long, J.R., Furtak, T., Sturtevant, N.R.: Improving state evaluation, inference, and search in trick-based card games. In: IJCAI, pp. 1407–1413 (2009)

    Google Scholar 

  6. Frank, I., Basin, D.: Search in games with incomplete information: a case study using bridge card play. Artif. Intell. 100(1–2), 87–123 (1998)

    Article  MathSciNet  Google Scholar 

  7. Ginsberg, M.L.: GIB: imperfect information in a computationally challenging game. J. Artif. Intell. Res. 14, 303–358 (2001)

    Article  Google Scholar 

  8. Hearn, R.A.: Games, puzzles, and computation. Ph.D. thesis, Massachusetts Institute of Technology (2006)

    Google Scholar 

  9. van den Herik, H.J., Uiterwijk, J.W., van Rijswijck, J.: Games solved: now and in the future. Artif. Intell. 134(1–2), 277–311 (2002)

    Article  Google Scholar 

  10. Hoogeboom, H.J., Kosters, W.A., van Rijn, J.N., Vis, J.K.: Acyclic constraint logic and games. ICGA J. 37(1), 3–16 (2014)

    Article  Google Scholar 

  11. Knuth, D.E.: The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions. Addison-Wesley Professional, Boston (2005)

    MATH  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  13. Kupferschmid, S., Helmert, M.: A skat player based on Monte-Carlo simulation. In: van den Herik, H.J., Ciancarini, P., Donkers, H.H.L.M.J. (eds.) CG 2006. LNCS, vol. 4630, pp. 135–147. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-75538-8_12

    Chapter  Google Scholar 

  14. Long, J.R., Buro, M.: Real-Time opponent modeling in trick-taking card games. In: IJCAI, vol. 22, pp. 617–622 (2011)

    Google Scholar 

  15. Long, J.R., Sturtevant, N.R., Buro, M., Furtak, T.: Understanding the success of perfect information Monte Carlo sampling in game tree search. In: AAAI (2010)

    Google Scholar 

  16. Parlett, D.: The Penguin Book of Card Games. Penguin, London (2008)

    Google Scholar 

  17. Pearl, J.: The solution for the branching factor of the alpha-beta pruning algorithm and its optimality. Commun. ACM 25(8), 559–564 (1982)

    Article  MathSciNet  Google Scholar 

  18. Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)

    MathSciNet  MATH  Google Scholar 

  19. van Rijn, J.N., Takes, F.W., Vis, J.K.: The complexity of Rummikub problems. In: Proceedings of the 27th Benelux Conference on Artificial Intelligence (2015)

    Google Scholar 

  20. van Rijn, J.N., Vis, J.K.: Endgame analysis of Dou Shou Qi. ICGA J. 37(2), 120–124 (2014)

    Article  Google Scholar 

  21. Silver, D., et al.: Mastering the game of Go with deep neural networks and tree search. Nature 529(7587), 484–489 (2016)

    Article  Google Scholar 

  22. Silver, D., et al.: Mastering the game of Go without human knowledge. Nature 550(7676), 354–359 (2017)

    Article  Google Scholar 

  23. Wästlund, J.: A solution of two-person single-suit whist. Electron. J. Comb. 12(1) (2005). Paper #R43

    Google Scholar 

  24. Wästlund, J.: Two-person symmetric whist. Electron. J. Comb. 12(1) (2005). Paper #R44

    Google Scholar 

Download references

Acknowledgements

The second author was supported by funding from the European Research Council (ERC) under the EU Horizon 2020 research and innovation programme (grant agreement 638946). We thank F.F. Bodrij and A.M. Stawska for assistance with qualitative real-world validation of a relevant feature subset.

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

van Rijn, J.N., Takes, F.W., Vis, J.K. (2019). Computing and Predicting Winning Hands in the Trick-Taking Game of Klaverjas. In: Atzmueller, M., Duivesteijn, W. (eds) Artificial Intelligence. BNAIC 2018. Communications in Computer and Information Science, vol 1021. Springer, Cham. https://doi.org/10.1007/978-3-030-31978-6_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-31978-6_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-31977-9

  • Online ISBN: 978-3-030-31978-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics