Research Article

Implementing the AlphaZero algorithm for Connect Four: A deep reinforcement learning approach

Yubo Guo*
Stony Brook Institute at Anhui University, Anhui University, Hefei, 230039, China

* Corresponding author: [email protected]

Abstract

The realm of board games presents a challenging domain for the application of artificial intelligence (AI), given their vast state-action space and inherent complexity. This paper explores the development of a proficient AI for Connect Four using DeepMind's AlphaZero algorithm. The algorithm employs a policy-value network for concurrent prediction of action probabilities and state values, and Monte Carlo Tree Search (MCTS) for decision-making, guided by the policy-value network. Through extensive self-play and data augmentation, our AI learns without the need for explicit prior knowledge. Our experiment demonstrated that the AI player showed significant capability in playing Connect Four, exhibiting strategic decision-making that sometimes-surpassed human performance. These results underline the potential of deep reinforcement learning in advancing AI performance in complex board games.

Keywords: AlphaZero; Connect Four; deep reinforcement learning; monte carlo tree search; policy-value network
Published: February 4, 2024
DOI: 10.54254/2755-2721/33/20230228
Volume: ACE Vol.33
pp. 34-41
Download PDF

References

  1. Silver, D., et al. (2017). Mastering the game of Go without human knowledge. Nature, 550(7676), 354-359.
  2. Silver, D., et al. (2018). A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play. Science, 362(6419), 1140-1144.
  3. Sutton, R. S., & Barto, A. G. (2018). Reinforcement learning: An introduction. MIT press.
  4. Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2012). Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25, 1097-1105.
  5. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 770-778).
  6. Mnih, V., et al. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540), 529-533.
  7. Lai, M. (2015). Giraffe: Using deep reinforcement learning to play chess. arXiv preprint arXiv:1509.01549.
  8. Kocsis, L., Szepesvári, C. (2006) Bandit based Monte-Carlo planning. In: Proceedings of the 17th European conference on Machine Learning. Springer, Berlin, Heidelberg.
  9. Guo, X., Singh, S., Lee, H., Lewis, R.L., Wang, X. (2014) Deep learning for real-time Atari game play using offline Monte-Carlo tree search planning. In: Advances in neural information processing systems. pp. 3338-3346.
  10. Browne, C. B., et al. (2012). A survey of Monte Carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in games, 4(1), 1-43.
  11. Guo, X., et al. (2014). Deep learning for real-time Atari game play using offline Monte-Carlo tree search planning. In Advances in neural information processing systems (pp. 3338-3346).
  12. Silver, D., et al. (2018). A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play. Science, 362(6419), 1140-1144.
  13. Tesauro, G. (1995). Temporal difference learning and TD-Gammon. Communications of the ACM, 38(3), 58-68.
  14. Silver, D., et al. (2016). Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587), 484-489.