Connect 4

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

Fidan Asgarova

Team 5: Sude Omarova


Zumrud Mammadli
What is Connect 4?
• Connect Four is a two-player
game with perfect
information for both sides,
meaning that nothing is
hidden from anyone where
the object of the game is to
get four or more pieces of
your color in a line vertically,
horizontally, or diagonally.
AI algorithms to solve the game
• Solution algorithms  for
AI  are numerous  and can
be complex. And way to
solve this game we have
multiple choices to
choose and work on.
AI METHODS
Minimax
Algorithm

•2 opponents – MIN and MAX


(Computer and The Player
• When it is the player’s turn,
he/she wants to choose the
best possible move that will
lead to maximizing his/her
score. But when it comes to
next turn, the computer will
try to maximize its own score
and minimize the player’s
score.
Our
Minimax
Function
Our Program:
• Consists of js, html, css files
• Made use of p5.js library
• Computer starts:
• Human:
• As soon as winner is found board
disappears and winner is declared
Future Developments

Store number of wins for each player

Assign rewards to wins

Add timer

Offer several difficulty levels

You might also like