Connect-4 using Alpha-Beta pruning with minimax algorithm

Artificial Intelligence (AI) Alpha-Beta Pruning Minimax Connect-4 Optimization

Authors

  • Brenda Lim Geok San School of Computing Asia Pacific University of Technology & Innovation (APU) Kuala Lumpur, Malaysia
  • Yap Jia Xin School of Computing Asia Pacific University of Technology & Innovation (APU) Kuala Lumpur, Malaysia
  • Zailan Arabee bin Abdul Salam
    zailan@apu.edu.my
    lan Arabee bin Abdul Salam School of Computing Asia Pacific University of Technology & Innovation (APU) Kuala Lumpur, Malaysia
  • Chanpreet Kaur Dhanoa School of Computing Asia Pacific University of Technology & Innovation (APU) Kuala Lumpur, Malaysia
Vol. 6 No. 1 (2022)
Original Research
January 16, 2026

Downloads

The classic game of Connect-4 is fading from the face of society, especially with the younger generations, due to the addictive instance of digital games available anywhere; hence measures to preserve the continuity of this game lie in the recreation of the game in the virtual environment. In this paper, the formulation of a classic Connect-4 game utilizing the implementation of Alpha-Beta Pruning with Minimax algorithm is carried out with the objective of modifying its parameters to determine its influence on the execution of the game. The parameters involved in the modification process include the depth of search and size of board, as a small change of constant can lead to a drastic difference. Minimax algorithm serves the purpose of enabling the computer (AI) to place its piece strategically, whereas Alpha-Beta Pruning is incorporated to reduce the size of its search tree. All results pertaining to the changes made have been recorded accordingly, and the optimal constant of parameters is identified, leading to an ideal execution of the game.