KEMBAR78
AI algorithm in game playing | PPTX
Topic :
Game playing in AI
• PRESENTED BY
• VICKY TYAGI
• MCA 3RD SEM
• 2001560001
Overview of presentation
• Algorithm in game playing
• Popular algorithm in game playing
• Minimax algorithm
• Alpha beta pruning algorithm
• Most suitable algorithm
Algorithm in game playing
• Any game works on a particular algorithm
• Most strategy based game uses minimax algorithm or alpha-
beta pruning algorithm
• Games like chess or tic-tac-toe uses these algorithm
• The algorithm works as every action possibly took by player and
then compare the action with the computer move and then take
action
• These games uses particular set of action and follow particular
set of rules
Minimax algorithm
• Here, there are two things i.e minimum and maximum value
• Maximum is a move done by user that aims at maximizing the
chance of winning
• Minimize is a move done by AI that aims at minimizing the
chance of losing
• Let’s have a example for better understanding
Example for Minimax algorithm
• As shown in fig 1 given the algorithm have tree to traverse from
root A to the terminal nodes
• The algorithm assumes max as player(human) and min as
AI(machine)
• The algorithm is much similar to DFS as the action is taken after
traversing last node comparison.
Fig 1: A game tree for Minimax algorithm
Advantages and disadvantages
• The minimax algorithm is not suitable for large game tree.
• The minimax algorithm is easy to implement
• The time complexity of minimax algorithm is O(b^d).
• Every move in game by AI(computer) is taken after several
comparisons.
Alpha Beta pruning algorithm
• As soon as the optimum solution is found the algorithm
immediately neglects any other solution possible.
• Generally alpha is considered for max node and beta is
considered for min node.
• The aim of algorithm is to have solution in minimum number of
moves
Fig 2: A game tree for Alpha Beta Pruning algorithm

AI algorithm in game playing

  • 1.
    Topic : Game playingin AI • PRESENTED BY • VICKY TYAGI • MCA 3RD SEM • 2001560001
  • 2.
    Overview of presentation •Algorithm in game playing • Popular algorithm in game playing • Minimax algorithm • Alpha beta pruning algorithm • Most suitable algorithm
  • 3.
    Algorithm in gameplaying • Any game works on a particular algorithm • Most strategy based game uses minimax algorithm or alpha- beta pruning algorithm • Games like chess or tic-tac-toe uses these algorithm • The algorithm works as every action possibly took by player and then compare the action with the computer move and then take action • These games uses particular set of action and follow particular set of rules
  • 4.
    Minimax algorithm • Here,there are two things i.e minimum and maximum value • Maximum is a move done by user that aims at maximizing the chance of winning • Minimize is a move done by AI that aims at minimizing the chance of losing • Let’s have a example for better understanding
  • 5.
    Example for Minimaxalgorithm • As shown in fig 1 given the algorithm have tree to traverse from root A to the terminal nodes • The algorithm assumes max as player(human) and min as AI(machine) • The algorithm is much similar to DFS as the action is taken after traversing last node comparison.
  • 6.
    Fig 1: Agame tree for Minimax algorithm
  • 7.
    Advantages and disadvantages •The minimax algorithm is not suitable for large game tree. • The minimax algorithm is easy to implement • The time complexity of minimax algorithm is O(b^d). • Every move in game by AI(computer) is taken after several comparisons.
  • 8.
    Alpha Beta pruningalgorithm • As soon as the optimum solution is found the algorithm immediately neglects any other solution possible. • Generally alpha is considered for max node and beta is considered for min node. • The aim of algorithm is to have solution in minimum number of moves
  • 9.
    Fig 2: Agame tree for Alpha Beta Pruning algorithm