Skip to content

zakuraevs/connect4-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

connect4-ai Python

A python implementation of the connect 4 game with an AI opponent based on the minimax algorithm with alpha-beta pruning.

connect 4 gameplay vs ai

This implementation is based on Keith Gali's tutorials:

https://www.youtube.com/watch?v=8392NJjj8s0&list=PLWKjhJtqVAblStefaz_YOVpDWqcRScc2s&index=9 and https://www.youtube.com/watch?v=XpYz-q1lxu8

Contents of repository:

  • connect4_no_ai.py is the version of game with pvp and no AI
  • conenct4_ai_no_comments.py is the AI version with no comments in the file
  • connect4_ai_commented.py is the AI version with detailed comments on implementation

How to run this program

Requirements:

Running the game

  1. Navigate to the root directory of the project in the terminal
  2. Run the command 'python3 '. For example 'python3 conenct4_ai_no_comments.py'

Known issues

  • frame rate is low on retina screens
  • draw implementation is lacking

Related resources:

About

A Connect 4 GUI with an AI opponent - using the Minimax algorithm with Alpha-Beta pruning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages