SlideShare a Scribd company logo
Name- Satyam Mahapatra
Department:- B.Tech CSE-1 Univ Roll.No :- 12000220031
Year :- 3rd Semester :- 5th Clg Roll.No :- 2003140
Subject:-Artificial Intelligence Subject Code :- PEC-IT501B
TOPIC :- MINIMAX ALGORITHM IN AI
Image Source:- google.com
Flow of Presentation
● Introduction
● Principle
● Description
● Example
● Application
● Advantage/Disadvantage
● Conclusion
Image Source- levelup.gitconnected.com
Introduction to Minimax
● Minimax is a decision- making algorithm typically in a 2 player game.
● 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 maximizer and another is called minimizer.
● The maximizer works to get the highest score, while the minimizer works to get the
lowest score.
● It is based on the zero-sum game concept, whenever one player wins other loses. So
the total score is always zero.
Principle
In two player games algorithm works as:
● The two players are moving towards opposite goals.
● The opponent will try to minimize whatever the algorithm is trying to minimize, hence
“minimax”.
● The goal is to find the best move for the player.
Description
● Construct the complete game tree.
● Evaluate scores for leaves using the evaluation function.
● Backup scores from leaves to root considering the player type:
1) For max player select the child with maximum score.
2) For min player select the child with minimum score.
● At the root node, choose the node with max value and perform the corresponding move.
● Start evaluating max with worst value of -infinity.
● Start evaluating max with worst value of +infinity.
Example
In this example, R is a player 1 maximizer and B is a player 2 minimizer.Here +infinity is a win
for R and -infinity is a win for B.
Basis: assume opponent best move.
Task: to find the best move for max.
Assume: max moves first and then min moves thus alternatively.
Type: win, lose or draw
Image Source- Youtube.com
Tic-Tac-Toe:
Image Source- nestedsoftware.com
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 for games with or without perfect information or chance e.g:
● Poker
● Monopoles
● Dice
● Tic-Tac-Toe
● Chess
● Checkers
Advantages:-
● Returns an optimal action, assuming perfect opponent play.
● Minimax is the simplest possible game search algorithm.
● It provides complete possible search if tree is finite.
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.
Conclusion :-
Minimax algorithm is one of the most popular algorithms for computer
board games. It is widely applied in turn based games. It can be a good
choice when players have complete information about the game.
Image Source- freecodecamp.org
References :-
● https://en.wikibooks.org/wiki/Artificial_Intelligence/Search/Adversarial_search/Minimax_
Search
● https://www.baeldung.com/java-minimax-algorithm
● https://www.hackerearth.com/blog/developers/minimax-algorithm-alpha-beta-pruning/
● https://www.freecodecamp.org/news/playing-strategy-games-with-minimax-4ecb83b39
b4b/
Thank You

More Related Content

Similar to Minimax.pdf

Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )
Alp Çoker
 
1.game
1.game1.game
1.game
veeramakali
 
Game playing
Game playingGame playing
Game playing
Tribhuvan University
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx
umairshams6
 
Artificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesArtificial Intelligence gaming techniques
Artificial Intelligence gaming techniques
SomnathMore3
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
SabrinaShanta2
 
Chess Engine
Chess EngineChess Engine
Chess Engine
sleepy sleep
 
Alpha go 16110226_김영우
Alpha go 16110226_김영우Alpha go 16110226_김영우
Alpha go 16110226_김영우
영우 김
 
Module 3 Game Theory (1).pptx
Module 3 Game Theory (1).pptxModule 3 Game Theory (1).pptx
Module 3 Game Theory (1).pptx
DrNavaneethaKumar
 
Module_3_1.pptx
Module_3_1.pptxModule_3_1.pptx
Module_3_1.pptx
DrKalaavathiBuvanesh
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Shiwani Gupta
 
AI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptxAI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptx
Asst.prof M.Gokilavani
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Dheerendra k
 
Minimax
MinimaxMinimax
Minimax
Nagarajan
 
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
Asst.prof M.Gokilavani
 
cai
caicai
Implementation and analysis of search algorithms in single player connect fou...
Implementation and analysis of search algorithms in single player connect fou...Implementation and analysis of search algorithms in single player connect fou...
Implementation and analysis of search algorithms in single player connect fou...
Anmol Rajpurohit
 
Gameplaying in artificial intelligence
Gameplaying in artificial intelligenceGameplaying in artificial intelligence
Gameplaying in artificial intelligence
oceanparkk
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
lordmwesh
 

Similar to Minimax.pdf (20)

Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )Game Tree ( Oyun Ağaçları )
Game Tree ( Oyun Ağaçları )
 
1.game
1.game1.game
1.game
 
Game playing
Game playingGame playing
Game playing
 
9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx9SearchAdversarial (1).pptx
9SearchAdversarial (1).pptx
 
Artificial Intelligence gaming techniques
Artificial Intelligence gaming techniquesArtificial Intelligence gaming techniques
Artificial Intelligence gaming techniques
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 
Chess Engine
Chess EngineChess Engine
Chess Engine
 
Alpha go 16110226_김영우
Alpha go 16110226_김영우Alpha go 16110226_김영우
Alpha go 16110226_김영우
 
Module 3 Game Theory (1).pptx
Module 3 Game Theory (1).pptxModule 3 Game Theory (1).pptx
Module 3 Game Theory (1).pptx
 
Module_3_1.pptx
Module_3_1.pptxModule_3_1.pptx
Module_3_1.pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
AI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptxAI_Session 14 Min Max Algorithm.pptx
AI_Session 14 Min Max Algorithm.pptx
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Minimax
MinimaxMinimax
Minimax
 
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
 
cai
caicai
cai
 
Implementation and analysis of search algorithms in single player connect fou...
Implementation and analysis of search algorithms in single player connect fou...Implementation and analysis of search algorithms in single player connect fou...
Implementation and analysis of search algorithms in single player connect fou...
 
Gameplaying in artificial intelligence
Gameplaying in artificial intelligenceGameplaying in artificial intelligence
Gameplaying in artificial intelligence
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 

Recently uploaded

SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
mahaffeycheryld
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
bjmsejournal
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
morris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdfmorris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdf
ycwu0509
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
Kamal Acharya
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
PIMR BHOPAL
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 

Recently uploaded (20)

SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
morris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdfmorris_worm_intro_and_source_code_analysis_.pdf
morris_worm_intro_and_source_code_analysis_.pdf
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 

Minimax.pdf

  • 1. Name- Satyam Mahapatra Department:- B.Tech CSE-1 Univ Roll.No :- 12000220031 Year :- 3rd Semester :- 5th Clg Roll.No :- 2003140 Subject:-Artificial Intelligence Subject Code :- PEC-IT501B TOPIC :- MINIMAX ALGORITHM IN AI Image Source:- google.com
  • 2. Flow of Presentation ● Introduction ● Principle ● Description ● Example ● Application ● Advantage/Disadvantage ● Conclusion Image Source- levelup.gitconnected.com
  • 3. Introduction to Minimax ● Minimax is a decision- making algorithm typically in a 2 player game. ● 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 maximizer and another is called minimizer. ● The maximizer works to get the highest score, while the minimizer works to get the lowest score. ● It is based on the zero-sum game concept, whenever one player wins other loses. So the total score is always zero.
  • 4. Principle In two player games algorithm works as: ● The two players are moving towards opposite goals. ● The opponent will try to minimize whatever the algorithm is trying to minimize, hence “minimax”. ● The goal is to find the best move for the player.
  • 5. Description ● Construct the complete game tree. ● Evaluate scores for leaves using the evaluation function. ● Backup scores from leaves to root considering the player type: 1) For max player select the child with maximum score. 2) For min player select the child with minimum score. ● At the root node, choose the node with max value and perform the corresponding move. ● Start evaluating max with worst value of -infinity. ● Start evaluating max with worst value of +infinity.
  • 6. Example In this example, R is a player 1 maximizer and B is a player 2 minimizer.Here +infinity is a win for R and -infinity is a win for B. Basis: assume opponent best move. Task: to find the best move for max. Assume: max moves first and then min moves thus alternatively. Type: win, lose or draw Image Source- Youtube.com
  • 8. 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 for games with or without perfect information or chance e.g: ● Poker ● Monopoles ● Dice ● Tic-Tac-Toe ● Chess ● Checkers
  • 9. Advantages:- ● Returns an optimal action, assuming perfect opponent play. ● Minimax is the simplest possible game search algorithm. ● It provides complete possible search if tree is finite. 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.
  • 10. Conclusion :- Minimax algorithm is one of the most popular algorithms for computer board games. It is widely applied in turn based games. It can be a good choice when players have complete information about the game. Image Source- freecodecamp.org
  • 11. References :- ● https://en.wikibooks.org/wiki/Artificial_Intelligence/Search/Adversarial_search/Minimax_ Search ● https://www.baeldung.com/java-minimax-algorithm ● https://www.hackerearth.com/blog/developers/minimax-algorithm-alpha-beta-pruning/ ● https://www.freecodecamp.org/news/playing-strategy-games-with-minimax-4ecb83b39 b4b/ Thank You