based on minimax algorithm with aplha-beta prunning
Implementation of Connect 4 game with AI.
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
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.
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.