Abstract
This paper introduces an effective algorithm designed for creating AI systems for the Hex board strategy game. The core algorithm, developed, employs the two-distance method for both board evaluation and for sorting of the moves. For empty board positions, the sum of two-distances from both ends is calculated to indicate the position’s weight and is used for sorting. Additionally, the Pattern Search algorithm enhances efficiency by prioritizing moves in crucial regions. The algorithm demonstrated consistent performance across various board sizes, including 7 × 7, 9 × 9, and 11 × 11. When implemented as an Android game, this algorithm maintained excellent performance in the given board sizes.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
All figures in this manuscript are from the “Simple Hex Board game with AI”. Link: https://play.google.com/store/apps/details?id=com.SamgoGames.SimpleHex. The game can be installed and played on android based mobile devices with OS 7.0 and above.
References
Hayward, R.B., Toft, B.: HEX the full story. CRC Recreational Mathematics Series (2019)
Pierce, J.R.: Symbols, Signals and Noise. Harper and Brothers, pp. 10–13 (1961)
Chao, G., Hayward, R., Müller, M.: Move prediction using deep convolutional neural networks in Hex. IEEE Trans. Games 10(4), 336–343 (2017)
Rijswijck, J.V.: Set colouring games. PhD Thesis, Department of Computing Science, University of Alberta, Canada (2006)
Beck, A., Bleicher, M.N., Crowe, D.W.: Excursions into Mathematics, pp. 317–387. Chapter Games, New York (1969)
Yang, J., Liao, S., Pawlak, M.: New winning and losing positions for 7×7 Hex. In: Schaeffer, J., Müller, M., Björnsson, Y. (eds.) Computers and Games (CG 2002). LNCS, vol. 2883, pp. 230–248. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-40031-8_16
Rijswijck, J.V.: Computer Hex: are bees better than fruitflies? Thesis of Master of Science, p. 37, Department of Computing Science, University of Alberta, Canada (2000)
Young, K., Hayward, R.B.: A reverse Hex solver. In: Plaat, A., Kosters, W., van den Herik, J. (eds.) Computers and Games (CG 2016), LNCS, vol. 10068, pp. 137–148. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-50935-8_13
Fabiano, N., Hayward, R.: New Hex patterns for fill and prune. In: Cazenave, T., van den Herik, J., Saffidine, A., Wu, I.C. (eds.) Advances in Computer Games (ACG 2019). LNCS, vol. 12516, pp. 79–90. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-65883-0_7
Broderick, A., Hayward, R.B., Philip, H.: Monte Carlo tree search in Hex. IEEE Trans. Comput. Intel. AI Games 2(4), 251–258 (2010)
Huang, S.C., Arneson, B., Hayward, R.B., Müller, M., Pawlewicz, J.: MOHEX 2.0: a pattern-based MCTS Hex player. In: International Conference on Computers and Games, Computers and Games (CG 2013), pp. 60–71 (2013)
Young, K., Vasan, G., Hayward, R.: NeuroHex: a deep q-learning Hex agent. In: Workshop on Computer Games, International Workshop on General Intelligence in Game Playing Agents (CGW 2016, GIGA 2016), Computer Games (2016)
Anshelevich, V.V.: A hierarchical approach to computer Hex. Artif. Intell. 134(1–2), 101–120 (2002). https://doi.org/10.1016/S0004-3702(01)00154-0
Chao, G., Siqi, Y., Hayward, R., Müller, M.: A transferable neural network for Hex. ICGA J. 40(3), 224–233 (2018)
Woodcok, M., Uscategui, F., Corrales, D.: Basic analysis of Hex game. Econógrafos, Escuela de Economía 13417, Universidad Nacional de Colombia, FCE, CID (2015)
Liu, H., Du, X.: Strategy and implementation of Hex. In: Proceedings of the 2020 4th International Conference on Electronic Information Technology and Computer Engineering (EITCE 2020), pp. 800–805 (2020)
Yang, J., Simon, L., Mirek, P.: A new solution for a 7×7 Hex game (2002)
Rasmussen, R.: Algorithmic approaches for playing and solving Shannon games. PhD Dissertation, Faculty of Information Technology, Queensland University of Technology, pp. 24–26, 49–52, 108–111 (2007)
David, S., et al.: A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play. Science 362, 1140–1144 (2018). https://doi.org/10.1126/science.aar6404
Acknowledgments
This work has been carried out as part of Summer Internship under the guidance of Mr. Naga Srinivas Vemuri, Google IT Services India Pvt Ltd, Hyderabad in his personal capacity. The author is deeply indebted to Dr. Naga Srinivas Vemuri, who is the primary developer of the code, for mentoring at every stage during the development of algorithm for building AI for the Hex board strategy game and for support during testing and performance evaluation.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Inampudi, S.S. (2024). Enhancing Hex Strategy: AI Based Two-Distance Pruning Approach with Pattern-Enhanced Alpha-Beta Search. In: Garg, D., Rodrigues, J.J.P.C., Gupta, S.K., Cheng, X., Sarao, P., Patel, G.S. (eds) Advanced Computing. IACC 2023. Communications in Computer and Information Science, vol 2053. Springer, Cham. https://doi.org/10.1007/978-3-031-56700-1_36
Download citation
DOI: https://doi.org/10.1007/978-3-031-56700-1_36
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-56699-8
Online ISBN: 978-3-031-56700-1
eBook Packages: Computer ScienceComputer Science (R0)