Question
In this project, you are going to implementthe Connect-Four game andan AI player for this game. Connect-Four is a tic-tac-toe-like two-player game in which players
In this project, you are going to implementthe Connect-Four game andan AI player for this game.
Connect-Four is a tic-tac-toe-like two-player game in which players alternately place pieces on a vertical board 7 columns across and 6 rows high. Each player uses pieces of a particular color (commonly black and red, or sometimes yellow and red), and the object is to be the first to obtain four pieces in a horizontal, vertical, or diagonal line. Because the board is vertical, pieces inserted in a given column always drop to the lowest unoccupied row of that column. As soon as a column contains 6 pieces, it is full,and no other piece can be placed in the column.
Both players begin with 21 identical pieces, and the first player to achieve a line of four connected pieces wins the game. If all 42 men are played and no player has places four pieces in a row, the game is drawn.[1]
You should implement a fully functioning game (text-based interface can be used) that can be playedby:
a human player vs a human player,
a human player vs the AI player,
AI player vs AI player.
For the AI player, you are required to implement minimax or negamax algorithm. You should also provide three evaluation (heuristic) methods h1, h2,and h3. The complexity of AI player should be configurable (number of plies, i.e.,depth of the tree, and the evaluation heuristic to be used).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started