KEMBAR78
Artificial Intelligence | PPTX
Welcome To Our Presentation
7X7 Tic Tac Toe Solver
Problem Description :
 Tic Tac Toe (also called Noughts and crosses, Xs and Os, XOX Game) is a very popular
children’s pencil and paper game, which is often enjoyed by many adults, as well.
 Because of its simplicity, the game may seem trivial at first, however, Tic Tac Toe
involves its share of analytics and rapidity.
 The game is a lot of fun for people of all ages and provides one with a great brain
workout too!
 play Tic Tac Toe online with other players or challenge Paper Man, a robot, in order to
win points and obtain a higher ranking!
History of Tic Tac Toe
 An early variation of the game was played in the Roman Empire, around
the 1st century B.C.
 It was called terni lapilli, which means "three pebbles at a time.“
 The game's grid markings have been found chalked all over Roman
ruins.
More Advanced Tic Tac Toe
 A relatively simple game usually played on a grid of 3 x 3 squares
 Tic-tac-toe is mainly enjoyed by children.
 Tic-tac-toe can be made significantly more complex by increasing the size
of the board to 4 x 4, 5 x 5, or even up to a 20 x 20 grid.
 The game is to be played between two people (in this
program between HUMAN and COMPUTER).
 One of the player chooses ‘O’ and the other ‘X’ to mark
their respective cells.
 The game starts with one of the players and the game ends
when one of the players has one whole row/ column/
diagonal filled with his/her respective character (‘O’ or ‘X’).
 If no one wins, then the game is said to be draw.
Rules of the Tic-Tac-Toe game
possible outputs of the game
 Minimax is a decision-making algorithm, typically in two player
games.
 Minimax is a kind of backtracking algorithm.
 The goal of the algorithm is to find the optimal next move.
 In the algorithm, one player is called the maximizer, and the
other player is a minimizer..
 The maximizer works to get the highest score, while the
minimizer tries get the lowest score.
 It is based on the zero-sum game concept. whatever one player
wins the other loses. So, the total score is always zero.
 Examples of such games are chess, poker, checkers, tic-tac-toe.
Introduction to Minimax
Example of minimax Algorithm.
Pseudocode
Explanation
Application: Minimax is the heart of almost every computer board game.
It applies to the games where
Players take turns
Underlying assumption
 Have perfect information But it can work form games with or without
perfect information or chance e.g:
Poker
Monopoles
Dice.
Tic-tac-toe
Chess
checkers
properties of minimax algorithm
 complete ? == Yes (If there is finite )
 Optimal? == Yes (Against an optimal opponent)
 Time complexity?== O(b^m)
 Space Complexity? == O(bm) (depth first exploration)
Minimax Advantages
• Returns an optimal action, assuming perfect opponent play.
• Minimax is the simplest possible(reasonable)game search algorithm.
• It provides a complete possible search if tree is finite.
Minimax Disadvantages
• It is completely in feasible in practice.
• When search tree is too large, we need to limit the search depth
• We have to apply an evaluation function to the cut-off states
Improvement A major problem with this approach is
that we have to explore each and every node even if we
have found Min or Max values.
Solution:
Fortunately, there is an option to find the optimal
move, without exploring every node of the game tree.
We can skip some branches by following some rules,
and it won’t affect the final result.
This process is called pruning. Alpha–beta pruning is a
prevalent variant of minimax algorithm.
Artificial Intelligence

Artificial Intelligence

  • 1.
    Welcome To OurPresentation
  • 2.
    7X7 Tic TacToe Solver
  • 3.
    Problem Description : Tic Tac Toe (also called Noughts and crosses, Xs and Os, XOX Game) is a very popular children’s pencil and paper game, which is often enjoyed by many adults, as well.  Because of its simplicity, the game may seem trivial at first, however, Tic Tac Toe involves its share of analytics and rapidity.  The game is a lot of fun for people of all ages and provides one with a great brain workout too!  play Tic Tac Toe online with other players or challenge Paper Man, a robot, in order to win points and obtain a higher ranking!
  • 4.
    History of TicTac Toe  An early variation of the game was played in the Roman Empire, around the 1st century B.C.  It was called terni lapilli, which means "three pebbles at a time.“  The game's grid markings have been found chalked all over Roman ruins. More Advanced Tic Tac Toe  A relatively simple game usually played on a grid of 3 x 3 squares  Tic-tac-toe is mainly enjoyed by children.  Tic-tac-toe can be made significantly more complex by increasing the size of the board to 4 x 4, 5 x 5, or even up to a 20 x 20 grid.
  • 5.
     The gameis to be played between two people (in this program between HUMAN and COMPUTER).  One of the player chooses ‘O’ and the other ‘X’ to mark their respective cells.  The game starts with one of the players and the game ends when one of the players has one whole row/ column/ diagonal filled with his/her respective character (‘O’ or ‘X’).  If no one wins, then the game is said to be draw. Rules of the Tic-Tac-Toe game
  • 6.
  • 7.
     Minimax isa decision-making algorithm, typically in two player games.  Minimax is a kind of backtracking algorithm.  The goal of the algorithm is to find the optimal next move.  In the algorithm, one player is called the maximizer, and the other player is a minimizer..  The maximizer works to get the highest score, while the minimizer tries get the lowest score.  It is based on the zero-sum game concept. whatever one player wins the other loses. So, the total score is always zero.  Examples of such games are chess, poker, checkers, tic-tac-toe. Introduction to Minimax
  • 8.
  • 9.
  • 10.
  • 13.
    Application: Minimax isthe heart of almost every computer board game. It applies to the games where Players take turns Underlying assumption  Have perfect information But it can work form games with or without perfect information or chance e.g: Poker Monopoles Dice. Tic-tac-toe Chess checkers
  • 14.
    properties of minimaxalgorithm  complete ? == Yes (If there is finite )  Optimal? == Yes (Against an optimal opponent)  Time complexity?== O(b^m)  Space Complexity? == O(bm) (depth first exploration)
  • 15.
    Minimax Advantages • Returnsan optimal action, assuming perfect opponent play. • Minimax is the simplest possible(reasonable)game search algorithm. • It provides a complete possible search if tree is finite. Minimax Disadvantages • It is completely in feasible in practice. • When search tree is too large, we need to limit the search depth • We have to apply an evaluation function to the cut-off states
  • 16.
    Improvement A majorproblem with this approach is that we have to explore each and every node even if we have found Min or Max values. Solution: Fortunately, there is an option to find the optimal move, without exploring every node of the game tree. We can skip some branches by following some rules, and it won’t affect the final result. This process is called pruning. Alpha–beta pruning is a prevalent variant of minimax algorithm.