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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
See also: N.J.A. Sloane. The On-Line Encyclopedia of Integer Sequences, https://oeis.org. Sequence A001496.
References
Beckenbach, E.F.: Applied Combinatorial Mathematics. Krieger Publishing Co., Inc., Melbourne (1981)
Bonnet, É., Jamain, F., Saffidine, A.: On the complexity of trick-taking card games. In: IJCAI, pp. 482–488 (2013)
Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001)
Breiman, L., Friedman, J., Stone, C.J., Olshen, R.: Classification and Regression Trees. Chapman and Hall/CRC, Wadsworth (1984)
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)
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)
Ginsberg, M.L.: GIB: imperfect information in a computationally challenging game. J. Artif. Intell. Res. 14, 303–358 (2001)
Hearn, R.A.: Games, puzzles, and computation. Ph.D. thesis, Massachusetts Institute of Technology (2006)
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)
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)
Knuth, D.E.: The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions. Addison-Wesley Professional, Boston (2005)
Knuth, D.E., Moore, R.W.: An analysis of alpha-beta pruning. Artif. Intell. 6(4), 293–326 (1975)
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
Long, J.R., Buro, M.: Real-Time opponent modeling in trick-taking card games. In: IJCAI, vol. 22, pp. 617–622 (2011)
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)
Parlett, D.: The Penguin Book of Card Games. Penguin, London (2008)
Pearl, J.: The solution for the branching factor of the alpha-beta pruning algorithm and its optimality. Commun. ACM 25(8), 559–564 (1982)
Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)
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)
van Rijn, J.N., Vis, J.K.: Endgame analysis of Dou Shou Qi. ICGA J. 37(2), 120–124 (2014)
Silver, D., et al.: Mastering the game of Go with deep neural networks and tree search. Nature 529(7587), 484–489 (2016)
Silver, D., et al.: Mastering the game of Go without human knowledge. Nature 550(7676), 354–359 (2017)
Wästlund, J.: A solution of two-person single-suit whist. Electron. J. Comb. 12(1) (2005). Paper #R43
Wästlund, J.: Two-person symmetric whist. Electron. J. Comb. 12(1) (2005). Paper #R44
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
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
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)