This document discusses using a minimax algorithm for an AI agent to play the Connect Four game against a human player. The goal is to investigate how a decision tree and minimax algorithm can be applied to the game. The methodology describes using minimax to provide optimal moves, with the AI player (Max) trying to maximize value and the opponent (Min) trying to minimize value. The proposed solution is for the AI to place coins in the middle column, make traps for the opponent, and make a "7" pattern to block the opponent from winning.
This document discusses using a minimax algorithm for an AI agent to play the Connect Four game against a human player. The goal is to investigate how a decision tree and minimax algorithm can be applied to the game. The methodology describes using minimax to provide optimal moves, with the AI player (Max) trying to maximize value and the opponent (Min) trying to minimize value. The proposed solution is for the AI to place coins in the middle column, make traps for the opponent, and make a "7" pattern to block the opponent from winning.
This document discusses using a minimax algorithm for an AI agent to play the Connect Four game against a human player. The goal is to investigate how a decision tree and minimax algorithm can be applied to the game. The methodology describes using minimax to provide optimal moves, with the AI player (Max) trying to maximize value and the opponent (Min) trying to minimize value. The proposed solution is for the AI to place coins in the middle column, make traps for the opponent, and make a "7" pattern to block the opponent from winning.
This document discusses using a minimax algorithm for an AI agent to play the Connect Four game against a human player. The goal is to investigate how a decision tree and minimax algorithm can be applied to the game. The methodology describes using minimax to provide optimal moves, with the AI player (Max) trying to maximize value and the opponent (Min) trying to minimize value. The proposed solution is for the AI to place coins in the middle column, make traps for the opponent, and make a "7" pattern to block the opponent from winning.
Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1of 6
Connect Four Game
Using Minmax Algorithm
MIS : 112003124 T3 Batch Name : Pratik Sarode Problem Statement • The game is categorized as a zero-sum game. • Therefore, the minimax algorithm, which is a decision rule used in AI, can be applied. The project goal is to investigate how a decision tree is applied using the minimax algorithm in this game by Artificial Intelligence • Connect Four is a two player strategy game that has a 6X7 grid and each player is given 21 coins of a color (Red and Yellow respectively). The players take alternate turns to play and the goal is to connect four coins of the same color vertically, horizontally or diagonally. During his turn the player can select the column in which he wishes to place the coin, and the coin gets placed in the bottommost empty slot in the selected column. The player who connects four coins of his color first wins the game. Here, the player will be playing against the computer (Artificial Intelligence agent). Project Description • The performance measure is the result of the game, win, loss, or tie. The number of moves it takes to win the game doesn’t really matter, so the only thing the agent should care about is results. The environment in this case is the game board of Connect 4, a 6 x 7 board. This agent’s actuator is making a move in the game. The sensors in this situation would be the game board, the agent should know the state of the game board at all times. Methodology • provides optimal moves for the player, assuming that the opponent is also playing optimally. For example, considering two opponents: Max and Min playing. Max will try to maximize the value, while Min will choose whatever value is the minimum. The algorithm performs a depth-first search (DFS) which means it will explore the complete game tree as deep as possible, all the way down to the leaf nodes • It also uses alpha-beta pruning for efficient working. Proposed Solution • Place in the middle column • Make traps for the opponent • Make a “7.” • the game can be solved by constructing a game tree and implementing the Minimax algorithm where a min or max value is assigned to every possible move and the AI agent (computer) will select a move that minimizes the chance of the user to win and maximizes its own chances Conclusion • In this project, the AI player uses a minimax algorithm to check for optimal moves in advance to outperform human players by knowing all possible moves rationally • the strategy and algorithm applied in this project have been proved to be working