Skip to content

nichilstewart/Connect-Four-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Python Connect Four AI

Nichil Stewart

Overview:

Connect 4 game built in Python using Pygame graphics library. Game AI developed using Minimax algorithm with further optimized depth-traversal time using alpha-beta pruning.

Files:

To run: cd to game directory and type python3 connect4_AI.py in terminal.

Select difficult (depth-level of Minimax algorithm) 1-5 in console before launching graphical game interface.

Visuals:

Your image title

Your image title

Your image title

AI:

AI is developed using the Minimax algorithm with a custom heuristic scoring model. The game-tree traversal process if further optimized using Alpha-beta bruning to only select the best paths in evaluating the best move. Moves are scored using greatest sequence of adjacent pieces, even-odd positioning, and prioritizing the lower rows and center column positions.

About

Connect 4 game AI built using Python and Pygame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages