SlideShare a Scribd company logo
1 of 9
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

More Related Content

What's hot

What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
Simplilearn
 

What's hot (20)

Unsupervised learning
Unsupervised learningUnsupervised learning
Unsupervised learning
 
Regularization in deep learning
Regularization in deep learningRegularization in deep learning
Regularization in deep learning
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
 
Blockchain consensus algorithms
Blockchain consensus algorithmsBlockchain consensus algorithms
Blockchain consensus algorithms
 
First order logic
First order logicFirst order logic
First order logic
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler design
 
Practical Non-Monotonic Reasoning
Practical Non-Monotonic ReasoningPractical Non-Monotonic Reasoning
Practical Non-Monotonic Reasoning
 
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Statistics Using Python | Statistics Python Tutorial | Python Certification T...Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Artificial Intelligence Notes Unit 5
Artificial Intelligence Notes Unit 5Artificial Intelligence Notes Unit 5
Artificial Intelligence Notes Unit 5
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
Agent architectures
Agent architecturesAgent architectures
Agent architectures
 
Ipv6 packet fomat
Ipv6  packet fomatIpv6  packet fomat
Ipv6 packet fomat
 
02 Machine Learning - Introduction probability
02 Machine Learning - Introduction probability02 Machine Learning - Introduction probability
02 Machine Learning - Introduction probability
 
Structured Knowledge Representation
Structured Knowledge RepresentationStructured Knowledge Representation
Structured Knowledge Representation
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
Ch 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfCh 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdf
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 

Similar to AI algorithm in game playing

Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 

Similar to AI algorithm in game playing (20)

21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
 
Minimax
MinimaxMinimax
Minimax
 
Chess Engine
Chess EngineChess Engine
Chess Engine
 
AI Lecture 5 (game playing)
AI Lecture 5 (game playing)AI Lecture 5 (game playing)
AI Lecture 5 (game playing)
 
Advances in Game AI
Advances in Game AIAdvances in Game AI
Advances in Game AI
 
Minimax.pdf
Minimax.pdfMinimax.pdf
Minimax.pdf
 
adversial search.pptx
adversial search.pptxadversial search.pptx
adversial search.pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Chess engine presentation
Chess engine presentationChess engine presentation
Chess engine presentation
 
Ai
AiAi
Ai
 
Artificial intelligence games
Artificial intelligence gamesArtificial intelligence games
Artificial intelligence games
 
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15  Min Max Algorithm.pptxAI3391 Artificial intelligence Session 15  Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
 
AI.ppt
AI.pptAI.ppt
AI.ppt
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Ibm's deep blue chess grandmaster chips
Ibm's deep blue chess grandmaster chipsIbm's deep blue chess grandmaster chips
Ibm's deep blue chess grandmaster chips
 
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdfAI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
 
Adversarial search with Game Playing
Adversarial search with Game PlayingAdversarial search with Game Playing
Adversarial search with Game Playing
 
Artificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesArtificial Intelligence gaming techniques
Artificial Intelligence gaming techniques
 
OthelloFinal.pptx
OthelloFinal.pptxOthelloFinal.pptx
OthelloFinal.pptx
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 

Recently uploaded

Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
IJECEIAES
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
Madan Karki
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
benjamincojr
 

Recently uploaded (20)

Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
Module-III Varried Flow.pptx GVF Definition, Water Surface Profile Dynamic Eq...
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 

AI algorithm in game playing

  • 1. Topic : Game playing in 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 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
  • 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 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.
  • 6. Fig 1: A game 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 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
  • 9. Fig 2: A game tree for Alpha Beta Pruning algorithm