Movatterモバイル変換


[0]ホーム

URL:


Uploaded bySumodSundar1
PPTX, PDF87 views

foundations of AI:module 3,csp,minimax algorithm

The document discusses adversarial search in multi-agent environments, particularly in game playing, covering concepts like perfect and imperfect information games, deterministic and non-deterministic games, and zero-sum games. It details the minimax algorithm, which provides optimal moves assuming rational opponents, and explains its functioning, including pruning techniques to manage complex game trees. Overall, it highlights the components of games in AI, such as game tree structures, utility values, and the algorithm's performance metrics.

Embed presentation

Download to read offline
Search in Complex environments
 Adversarial search - Games, Optimaldecisions in games The Minimax algorithm AlphaBeta pruning. Constraint Satisfaction Problems – DefiningCS Backtracking search for CSPs, Structure of CSP problems, Constraint Propagation inference in CSPs
 Adversarial search is a search, where weexamine the problem which arises when wetry to plan ahead of the world and otheragents are planning against us.
 In previous topics, we have studied the searchstrategies which are only associated with asingle agent that aims to find the solutionwhich often expressed in the form of asequence of actions. But, there might be some situations wheremore than one agent is searching for thesolution in the same search space, and thissituation usually occurs in game playing
 The environment with more than one agent istermed as multi-agent environment, Each agent is an opponent of other agent andplaying against each other. Each agent needs to consider the action of otheragent and effect of that action on theirperformance. So, Searches in which two or more players withconflicting goals are trying to explore the samesearch space for the solution, are calledadversarial searches, often known as Games.
 Perfect information: A game with the perfectinformation is that in which agents can look intothe complete board. Agents have all theinformation about the game, and they can seeeach other moves also. Examples are Chess,Checkers, Go, etc. Imperfect information: If in a game agents do nothave all information about the game and notaware with what's going on, such type of gamesare called the game with imperfect information,such as tic-tac-toe, Battleship, blind, Bridge, etc.
 Deterministic games: Deterministic games arethose games which follow a strict pattern and setof rules for the games, and there is norandomness associated with them. Examples arechess, Checkers, Go, tic-tac-toe, etc. Non-deterministic games: Non-deterministic arethose games which have various unpredictableevents and has a factor of chance or luck. Thisfactor of chance or luck is introduced by eitherdice or cards. These are random, and each actionresponse is not fixed. Such games are also calledas stochastic games.Example: Backgammon, Monopoly, Poker, etc.
Zero-Sum Game Zero-sum games are adversarial search whichinvolves pure competition. In Zero-sum game each agent's gain or loss ofutility is exactly balanced by the losses or gainsof utility of another agent. One player of the game try to maximize onesingle value, while other player tries to minimizeit. Each move by one player in the game is called asply. Chess and tic-tac-toe are examples of a Zero-sum game.
Formalization of the problem:A game can be defined as a type of search in AI which can be formalized ofthe following elements Initial state: It specifies how the game is set up at the start. Player(s): It specifies which player has moved in the state space. Action(s): It returns the set of legal moves in state space. Result(s, a): It is the transition model, which specifies the result of movesin the state space. Terminal-Test(s): Terminal test is true if the game is over, else it is falseat any case. The state where the game ends is called terminal states. Utility(s, p): A utility function gives the final numeric value for a gamethat ends in terminal states s for player p. It is also called payofffunction. For Chess, the outcomes are a win, loss, or draw and its payoffvalues are +1, 0, ½. And for tic-tac-toe, utility values are +1, -1, and 0.
Game tree: A game tree is a tree where nodes of the treeare the game states and Edges of the tree arethe moves by players. Game tree involves initial state, actionsfunction, and result Function.
TECHNIQUES REQUIRED TO GET THE BESTOPTIMAL SOLUTIONWe always choose an algorithm which providethe best optimal solution in a limited time.2 techniques:1)Pruning:A technique which allows ignoringthe unwanted portions of the search treewhich makes no difference in the final result
2)Heuristic evaluation function:It allows to approximate the cost value at eachlevel of the search tree ,before reaching thegoal state.
WORKING OF THE ELEMENTS WITH THE HELP OFGAME TREE DESIGNED FOR TIC TAC TOE Example: Tic-Tac-Toe game tree: The following figure is showing part of thegame-tree for tic-tac-toe game. Following aresome key points of the game: There are two players MAX and MIN. Players have an alternate turn and start withMAX. MAX maximizes the result of the game tree MIN minimizes the result.
 Utility value -1 means game loss Ultility value +1 means game win Utilitity value 0 means draw
 Mini-max algorithm is a recursive or backtrackingalgorithm which is used in decision-making and gametheory. It provides an optimal move for the playerassuming that opponent is also playing optimally. Mini-Max algorithm uses recursion to search throughthe game-tree.
 Min-Max algorithm is mostly used for game playing inAI. Such as Chess, Checkers, tic-tac-toe, go, andvarious tow-players game. This Algorithm computesthe minimax decision for the current state.
 In this algorithm two players play the game, one is calledMAX and other is called MIN. Both the players fight it as the opponent player gets theminimum benefit while they get the maximum benefit. Both Players of the game are opponent of each other,where MAX will select the maximized value and MINwill select the minimized value.
 The minimax algorithm performs a depth-first searchalgorithm for the exploration of the complete gametree. The minimax algorithm proceeds all the way down tothe terminal node of the tree, then backtrack the treeas the recursion
:function minimax(node, depth, maximizingPlayer) isif depth ==0 or node is a terminal node thenreturn static evaluation of nodeif MaximizingPlayer then // for Maximizer PlayermaxEva= -infinityfor each child of node doeva= minimax(child, depth-1, false)maxEva= max(maxEva,eva) //gives Maximum of the valuesreturn maxEvaelse // for Minimizer playerminEva= +infinityfor each child of node doeva= minimax(child, depth-1, true)minEva= min(minEva, eva) //gives minimum of the valuesreturn minEva
 The working of the minimax algorithm can be easily describedusing an example. Below we have taken an example of game-tree which is representing the two-player game. In this example, there are two players one is called Maximizerand other is called Minimizer. Maximizer will try to get the Maximum possible score, andMinimizer will try to get the minimum possible score. This algorithm applies DFS, so in this game-tree, we have togo all the way through the leaves to reach the terminal nodes. At the terminal node, the terminal values are given so we willcompare those value and backtrack the tree until the initialstate occurs. Following are the main steps involved in solvingthe two-player game tree:
 Complete- Min-Max algorithm is Complete. It willdefinitely find a solution (if exist), in the finite searchtree. Optimal- Min-Max algorithm is optimal if bothopponents are playing optimally. Time complexity- As it performs DFS for the game-tree, so the time complexity of Min-Max algorithmis O(bm), where b is branching factor of the game-tree,and m is the maximum depth of the tree. Space Complexity- Space complexity of Mini-maxalgorithm is also similar to DFS which is O(bm).
 The main drawback of the minimax algorithm is that itgets really slow for complex games such as Chess, go,etc. This type of games has a huge branching factor,and the player has lots of choices to decide. Thislimitation of the minimax algorithm can be improvedfrom alpha-beta pruning

Recommended

PDF
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
PPTX
AI_unit3.pptx
PPTX
Adversarial search
PPTX
Adversarial search is a game-playing technique .pptx
PPTX
AI-UNIT-2 PPT FINAL Complete unit 2.pptx
PPTX
Adversial Search and its applications in Artificial intelligence
PPTX
9SearchAdversarial (1).pptx
PPTX
Artificial intelligence dic_SLIDE_3.pptx
PPTX
Module_3_1.pptx
PPTX
Min-Max algorithm
PPTX
22PCOAM11 Unit 2: Session 8 Min-Max.pptx
PPTX
MCS229_Lab_SlideShare_Demonstration_For_MCA
PPTX
AI_Session 14 Min Max Algorithm.pptx
PPT
Unit 2 Topic 6 Adversarggggial Search.ppt
PPTX
Minmax Algorithm In Artificial Intelligence slides
PPT
Adversarial Search and Game-Playing .ppt
PPTX
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
PPTX
Adversarial search in artificial intelligence
PPTX
Different Adversarial search Approaches.pptx
PPTX
AI- to eat boiled egg and cheese Unit-II.pptx
PPTX
MINI-MAX ALGORITHM.pptx
PPT
cai
PPTX
Mini-Max Algorithm in Artificial Intelligence.pptx
PPTX
Game Playing Overview, And Example Domain.pptx
PPTX
adversial search.pptx
PDF
Adversial-search.pdf topic of AI/ML for Diploma students
PPTX
Min Max Algorithm in Artificial Intelligence
PPTX
Adversarial search
PDF
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
PPTX
CEC369 IoT P CEC369 IoT P CEC369 IoT PCEC369 IoT PCEC369 IoT P

More Related Content

PDF
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
PPTX
AI_unit3.pptx
PPTX
Adversarial search
PPTX
Adversarial search is a game-playing technique .pptx
PPTX
AI-UNIT-2 PPT FINAL Complete unit 2.pptx
PPTX
Adversial Search and its applications in Artificial intelligence
PPTX
9SearchAdversarial (1).pptx
PPTX
Artificial intelligence dic_SLIDE_3.pptx
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI_unit3.pptx
Adversarial search
Adversarial search is a game-playing technique .pptx
AI-UNIT-2 PPT FINAL Complete unit 2.pptx
Adversial Search and its applications in Artificial intelligence
9SearchAdversarial (1).pptx
Artificial intelligence dic_SLIDE_3.pptx

Similar to foundations of AI:module 3,csp,minimax algorithm

PPTX
Module_3_1.pptx
PPTX
Min-Max algorithm
PPTX
22PCOAM11 Unit 2: Session 8 Min-Max.pptx
PPTX
MCS229_Lab_SlideShare_Demonstration_For_MCA
PPTX
AI_Session 14 Min Max Algorithm.pptx
PPT
Unit 2 Topic 6 Adversarggggial Search.ppt
PPTX
Minmax Algorithm In Artificial Intelligence slides
PPT
Adversarial Search and Game-Playing .ppt
PPTX
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
PPTX
Adversarial search in artificial intelligence
PPTX
Different Adversarial search Approaches.pptx
PPTX
AI- to eat boiled egg and cheese Unit-II.pptx
PPTX
MINI-MAX ALGORITHM.pptx
PPT
cai
PPTX
Mini-Max Algorithm in Artificial Intelligence.pptx
PPTX
Game Playing Overview, And Example Domain.pptx
PPTX
adversial search.pptx
PDF
Adversial-search.pdf topic of AI/ML for Diploma students
PPTX
Min Max Algorithm in Artificial Intelligence
PPTX
Adversarial search
Module_3_1.pptx
Min-Max algorithm
22PCOAM11 Unit 2: Session 8 Min-Max.pptx
MCS229_Lab_SlideShare_Demonstration_For_MCA
AI_Session 14 Min Max Algorithm.pptx
Unit 2 Topic 6 Adversarggggial Search.ppt
Minmax Algorithm In Artificial Intelligence slides
Adversarial Search and Game-Playing .ppt
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
Adversarial search in artificial intelligence
Different Adversarial search Approaches.pptx
AI- to eat boiled egg and cheese Unit-II.pptx
MINI-MAX ALGORITHM.pptx
cai
Mini-Max Algorithm in Artificial Intelligence.pptx
Game Playing Overview, And Example Domain.pptx
adversial search.pptx
Adversial-search.pdf topic of AI/ML for Diploma students
Min Max Algorithm in Artificial Intelligence
Adversarial search

Recently uploaded

PDF
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
PPTX
CEC369 IoT P CEC369 IoT P CEC369 IoT PCEC369 IoT PCEC369 IoT P
PDF
Introduction to MySQL Spatial Features and Real-World Use Cases
PPTX
waste to energy deck v.3.pptx changing garbage to electricity
PPTX
Supercapacitor.pptx...............................
PDF
IPE 105 - Engineering Materials Constitution of Alloys
PPTX
Waste to Energy - G2 Ethanol.pptx to process
PDF
application of matrix in computer science
PPT
Virtual Instrumentation Programming Techniques.ppt
PPTX
31.03.24 - 7.CURRICULUM & TEACHING - LEARNING PROCESS IMPLEMENTATION DETAILS....
PPTX
DevFest Seattle 2025 - AI Native Design Patterns.pptx
PDF
Event #3_ Build a Gemini Bot, Together with GitHub_private.pdf
PPTX
Lead-acid battery.pptx.........................
PDF
November_2025 Top 10 Read Articles in Computer Networks & Communications.pdf
PPTX
Intrusion Detection Systems presentation.pptx
PDF
Welcome to ISPR 2026 - 12th International Conference on Image and Signal Pro...
PPTX
Washing-Machine-Simulation-using-PICSimLab.pptx
PPTX
2-Photoelectric effect, phenomena and its related concept.pptx
PPTX
AI at the Crossroads_ Transforming the Future of Green Technology.pptx
PPTX
Principles of Energy Efficiency_ Doing More with Less
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
CEC369 IoT P CEC369 IoT P CEC369 IoT PCEC369 IoT PCEC369 IoT P
Introduction to MySQL Spatial Features and Real-World Use Cases
waste to energy deck v.3.pptx changing garbage to electricity
Supercapacitor.pptx...............................
IPE 105 - Engineering Materials Constitution of Alloys
Waste to Energy - G2 Ethanol.pptx to process
application of matrix in computer science
Virtual Instrumentation Programming Techniques.ppt
31.03.24 - 7.CURRICULUM & TEACHING - LEARNING PROCESS IMPLEMENTATION DETAILS....
DevFest Seattle 2025 - AI Native Design Patterns.pptx
Event #3_ Build a Gemini Bot, Together with GitHub_private.pdf
Lead-acid battery.pptx.........................
November_2025 Top 10 Read Articles in Computer Networks & Communications.pdf
Intrusion Detection Systems presentation.pptx
Welcome to ISPR 2026 - 12th International Conference on Image and Signal Pro...
Washing-Machine-Simulation-using-PICSimLab.pptx
2-Photoelectric effect, phenomena and its related concept.pptx
AI at the Crossroads_ Transforming the Future of Green Technology.pptx
Principles of Energy Efficiency_ Doing More with Less

foundations of AI:module 3,csp,minimax algorithm

  • 1.
    Search in Complexenvironments
  • 2.
     Adversarial search- Games, Optimaldecisions in games The Minimax algorithm AlphaBeta pruning. Constraint Satisfaction Problems – DefiningCS Backtracking search for CSPs, Structure of CSP problems, Constraint Propagation inference in CSPs
  • 3.
     Adversarial searchis a search, where weexamine the problem which arises when wetry to plan ahead of the world and otheragents are planning against us.
  • 4.
     In previoustopics, we have studied the searchstrategies which are only associated with asingle agent that aims to find the solutionwhich often expressed in the form of asequence of actions. But, there might be some situations wheremore than one agent is searching for thesolution in the same search space, and thissituation usually occurs in game playing
  • 5.
     The environmentwith more than one agent istermed as multi-agent environment, Each agent is an opponent of other agent andplaying against each other. Each agent needs to consider the action of otheragent and effect of that action on theirperformance. So, Searches in which two or more players withconflicting goals are trying to explore the samesearch space for the solution, are calledadversarial searches, often known as Games.
  • 6.
     Perfect information:A game with the perfectinformation is that in which agents can look intothe complete board. Agents have all theinformation about the game, and they can seeeach other moves also. Examples are Chess,Checkers, Go, etc. Imperfect information: If in a game agents do nothave all information about the game and notaware with what's going on, such type of gamesare called the game with imperfect information,such as tic-tac-toe, Battleship, blind, Bridge, etc.
  • 7.
     Deterministic games:Deterministic games arethose games which follow a strict pattern and setof rules for the games, and there is norandomness associated with them. Examples arechess, Checkers, Go, tic-tac-toe, etc. Non-deterministic games: Non-deterministic arethose games which have various unpredictableevents and has a factor of chance or luck. Thisfactor of chance or luck is introduced by eitherdice or cards. These are random, and each actionresponse is not fixed. Such games are also calledas stochastic games.Example: Backgammon, Monopoly, Poker, etc.
  • 8.
    Zero-Sum Game Zero-sumgames are adversarial search whichinvolves pure competition. In Zero-sum game each agent's gain or loss ofutility is exactly balanced by the losses or gainsof utility of another agent. One player of the game try to maximize onesingle value, while other player tries to minimizeit. Each move by one player in the game is called asply. Chess and tic-tac-toe are examples of a Zero-sum game.
  • 9.
    Formalization of theproblem:A game can be defined as a type of search in AI which can be formalized ofthe following elements Initial state: It specifies how the game is set up at the start. Player(s): It specifies which player has moved in the state space. Action(s): It returns the set of legal moves in state space. Result(s, a): It is the transition model, which specifies the result of movesin the state space. Terminal-Test(s): Terminal test is true if the game is over, else it is falseat any case. The state where the game ends is called terminal states. Utility(s, p): A utility function gives the final numeric value for a gamethat ends in terminal states s for player p. It is also called payofffunction. For Chess, the outcomes are a win, loss, or draw and its payoffvalues are +1, 0, ½. And for tic-tac-toe, utility values are +1, -1, and 0.
  • 10.
    Game tree: Agame tree is a tree where nodes of the treeare the game states and Edges of the tree arethe moves by players. Game tree involves initial state, actionsfunction, and result Function.
  • 11.
    TECHNIQUES REQUIRED TOGET THE BESTOPTIMAL SOLUTIONWe always choose an algorithm which providethe best optimal solution in a limited time.2 techniques:1)Pruning:A technique which allows ignoringthe unwanted portions of the search treewhich makes no difference in the final result
  • 12.
    2)Heuristic evaluation function:Itallows to approximate the cost value at eachlevel of the search tree ,before reaching thegoal state.
  • 13.
    WORKING OF THEELEMENTS WITH THE HELP OFGAME TREE DESIGNED FOR TIC TAC TOE Example: Tic-Tac-Toe game tree: The following figure is showing part of thegame-tree for tic-tac-toe game. Following aresome key points of the game: There are two players MAX and MIN. Players have an alternate turn and start withMAX. MAX maximizes the result of the game tree MIN minimizes the result.
  • 15.
     Utility value-1 means game loss Ultility value +1 means game win Utilitity value 0 means draw
  • 16.
     Mini-max algorithmis a recursive or backtrackingalgorithm which is used in decision-making and gametheory. It provides an optimal move for the playerassuming that opponent is also playing optimally. Mini-Max algorithm uses recursion to search throughthe game-tree.
  • 17.
     Min-Max algorithmis mostly used for game playing inAI. Such as Chess, Checkers, tic-tac-toe, go, andvarious tow-players game. This Algorithm computesthe minimax decision for the current state.
  • 18.
     In thisalgorithm two players play the game, one is calledMAX and other is called MIN. Both the players fight it as the opponent player gets theminimum benefit while they get the maximum benefit. Both Players of the game are opponent of each other,where MAX will select the maximized value and MINwill select the minimized value.
  • 19.
     The minimaxalgorithm performs a depth-first searchalgorithm for the exploration of the complete gametree. The minimax algorithm proceeds all the way down tothe terminal node of the tree, then backtrack the treeas the recursion
  • 20.
    :function minimax(node, depth,maximizingPlayer) isif depth ==0 or node is a terminal node thenreturn static evaluation of nodeif MaximizingPlayer then // for Maximizer PlayermaxEva= -infinityfor each child of node doeva= minimax(child, depth-1, false)maxEva= max(maxEva,eva) //gives Maximum of the valuesreturn maxEvaelse // for Minimizer playerminEva= +infinityfor each child of node doeva= minimax(child, depth-1, true)minEva= min(minEva, eva) //gives minimum of the valuesreturn minEva
  • 21.
     The workingof the minimax algorithm can be easily describedusing an example. Below we have taken an example of game-tree which is representing the two-player game. In this example, there are two players one is called Maximizerand other is called Minimizer. Maximizer will try to get the Maximum possible score, andMinimizer will try to get the minimum possible score. This algorithm applies DFS, so in this game-tree, we have togo all the way through the leaves to reach the terminal nodes. At the terminal node, the terminal values are given so we willcompare those value and backtrack the tree until the initialstate occurs. Following are the main steps involved in solvingthe two-player game tree:
  • 27.
     Complete- Min-Maxalgorithm is Complete. It willdefinitely find a solution (if exist), in the finite searchtree. Optimal- Min-Max algorithm is optimal if bothopponents are playing optimally. Time complexity- As it performs DFS for the game-tree, so the time complexity of Min-Max algorithmis O(bm), where b is branching factor of the game-tree,and m is the maximum depth of the tree. Space Complexity- Space complexity of Mini-maxalgorithm is also similar to DFS which is O(bm).
  • 28.
     The maindrawback of the minimax algorithm is that itgets really slow for complex games such as Chess, go,etc. This type of games has a huge branching factor,and the player has lots of choices to decide. Thislimitation of the minimax algorithm can be improvedfrom alpha-beta pruning

[8]ページ先頭

©2009-2025 Movatter.jp