Skip to content

based on minimax algorithm with aplha-beta prunning

Notifications You must be signed in to change notification settings

imajit/connect-4-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect-4-AI

based on minimax algorithm with aplha-beta prunning
Implementation of Connect 4 game with AI.

alt text

In the original state all the places in the board are empty denoted by 0 in each place.The player-pieces are denoted by 1 and the AI-pieces are denoted by 2 alt text

As the game proceeds the player has to choose a column from 0 to size of board - 1 and put his piece there . If its a valid move then AI also places its piece. The game continues till any of the 2 players get 4 of his pieces in a row horizontally, vertically or diagonally. alt text

Features
Terminal based game - works completely on terminal
Depth 4 Minimax tree is generated to find next best move
Algorithm is optomized by alpha-beta prunning

Future Advancements
Gui can be added to make game more interesting.
Depth of tree can be increased to get better results.
Better and more detailed scoring can improve the results.

About

based on minimax algorithm with aplha-beta prunning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages