Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
7 views
29 pages
Unit 3 (AI)
AI information
Uploaded by
Dhanashree Kavathkar
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save unit-3(AI) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
7 views
29 pages
Unit 3 (AI)
AI information
Uploaded by
Dhanashree Kavathkar
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save unit-3(AI) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save unit-3(AI) For Later
You are on page 1
/ 29
Search
Fullscreen
Adversarial Search It is a game-playing technique where agents are surrounded by a competitive environment. A conflicting goal is given to the agents. Game-playing means discussing those games where human intelligence & logic factor is used. Tic- tac-toe, chess, checkers. This search is based on the concept of ‘Game Theory? To complete game, one has to win the game & other looses automatically. Veta icsis Gh nd barr td we We are opponents: I win, you loose.Techniques required to get the best optimal solution There is always a need to choose those algorithms which provide the best optimal solution in a limited time. So, we use the following techniques which could fulfill our requirements: * Pruning: A technique which allows ignoring the unwanted portions of a search tree which make no difference in its final result. * Heuristic Evaluation Function: It allows to approximate the cost value at each level of the search tree, before reaching the goal node.Types of algorithms in Adversarial search - In a normal search, we follow a sequence of actions to reach the goal or to finish the game optimally. But in an adversarial search, the result depends on the players which will decide the result of the game. It is also obvious that the solution for the goal state will be an optimal solution because the player will try to win the game with the shortest path and under limited time. - There are following types of adversarial search: ‘max Algorithm * Alpha-beta PruningMin-Max Algorithm * It is a recursive or backtracking algorithm which is used in decision-making and game theory. It provides an optimal move for the player assuming that opponent is also playing optimally. * Mini-Max algorithm uses recursion to search through the game-tree. * It is mostly used for game playing in Al. Such as Chess, Checkers, tic-tac-toe, go, and various tow-players game. * In this algorithm two players play the game, one is called MAX and other is called MIN. * Both the players fight it as the opponent player gets the minimum 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 MIN will select the minimized value. * The minimax algorithm performs a depth-first search algorithm for the exploration of the complete game tree.Min-Max AlgorithmMin-Max Algorithm Properties of jax algorithm: Complete- Min-Max algorithm is Complete. It will definitely find a solution (if exist), in the finite search tree. Optimal- Min-Max algorithm is optimal if both opponents are playing optimally. Time complexity As it performs DFS for the game-tree, so the time complexity of Min-Max algorithm is O(b™), where b is branching factor of the game-tree, and m is the maximum depth of the tree. Space Complexity- Space complexity of Mini-max algorithm is also similar to DFS which is O(bm).Alpha-Beta Pruning Alpha-beta pruning is an advance version of MINIMAX algorithm. The drawback of minimax strategy is that it explores each node in the tree deeply to provide the best path among all the paths. This increases its time complexity. But as we know, the performance measure is the first consideration for any optimal algorithm. Therefore, alpha-beta pruning reduces this drawback of minimax strategy by less exploring the nodes of the search tree.Alpha-Beta Pruning. MAX A MIN . : (6 c MAX / ; 0 é Fe @ MIN: -* > - 7 : : . . 4 =) J kK ie tn " a AK AAS a cS Ar # > ‘.* * Stochastic Games Many games are unpredictable in nature, such as those involving dice throw. These games are called as Stochastic Games. The outcome of the game depends on skills as well as luck. In the Stochastic Games, the winner of the game is not only decided by the skill but also by luck. Examples are Gambling game Golf ball game Backgammon etc...Stochastic Search Algorithms(Methods) * Stochastic search algorithms are designed for problems with inherent random noise or deterministic problems solved by injected randomness. * Desired properties of search methods are % High probability of finding near-optimal solutions (Effectiveness) * Short processing time (Efficiency) They are usually conflicting; a compromise is offered by stochastic techniques where certain steps are based on random choice. * Many stochastic search techniques are inspired by processes found in nature. (Like Temperature)Fully observable / Partially Observable Fully observable Partially Observable + Anagent can always see the entire + Amagent can never see state of an environment. the entire state of an environment. + Example: Chess + Example: Card gameWhat is an Agent? An agent can be anything that perceives environment through sensors and acts upon that environment through actuators. Perceives Acts upon Environment Environment through through Sensors ActuatorsKnowledge-Based Agent + An intelligent agent needs knowledge about the real world for taking decisions and reasoning to act efficiently. + Knowledge-based agents are those agents who have the capability of 1. maintaining an internal state of knowledge, 2. reason over that knowledge, 3. update their knowledge after observations 4. take actions. + These agents can represent the world with some formal representation and act intelligently.How it works? Inference Engine Knowledge BaseKnowledge base A central component of a knowledge-based agent It is also known as KB. It is a collection of sentences These sentences are expressed in a language which is called a knowledge representation language. The Knowledge-base of KBA stores fact about the world.Inference Engine Inference means deriving new sentences from old. A sentence is a proposition about the world. Inference engine allows us to add a new sentence to the knowledge base. Inference engine applies logical rules to the KB to deduce new information. Inference engine generates new facts so that an agent can update the KB. An inference engine works mainly in two rules which are given as: 1. Forward Chaining and 2.Backward ChainingWhat is the Wumpus World ? The wumpus world is a cave consisting of rooms connected by passageways. Lurking somewhere in the cave is the terrible wumpus, a beast that eats anyone who enters its room. The wumpus can be shot by an agent, but the agent has only one arrow. Some rooms contain bottomless pits that will trap anyone who wanders into these rooms (except for the wumpus, which is too big to fall in). The only mitigating feature of this bleak environment is the possibility of finding a heap of gold.Performance Measure + +1000 for climbing out of the cave with the gold. -1000 for falling into a pit or being eaten by the wumpus. -1 for each action taken. -10 for using up the arrow. The game ends either when the agent dies or when the agent climbs out of the cave.Environment A 4x4 grid of rooms. The agent always starts inthe 4 square labeled [1,1], facing to the right. The locations of the gold and the wumpus are chosen randomly, with a uniform 2 distribution, from the squares other than the start square. In addition, each square other 1 than the start can be a pit, with probability 0.2. + | BeActuators + Agent can perform following actions: 1. Forward : The agent can move Forward 2. Turnleft and TurnRight : The agent can TurnLeft by 90°, or TurnRight by 90°. 3. Grab : The action Grab can be used to pick up the gold if it is in the same square as the agent. 4. Shoot : The action Shoot can be used to fire an arrow in a straight line in the direction the agent is facing. The arrow Mlinnad ath it either hits (and hence kills) the wumpus or Its a wall.Sensors The agent has five sensors, each of which gives a single bit of information: In the square containing the wumpus and in the directly (not diagonally) adjacent squares, the agent will perceive a Stench. In the squares directly adjacent to a pit, the agent will perceive a Breeze. In the square where the gold is, the agent will perceive a Glitter. When an agent walks into a wall, it will perceive a Bump. When the wumpus is killed, it emits a woeful Scream that can be perceived anywhere in the cave.$ Sionen oo “yY $ Stench SPropositional Logic + A very simple logic, here the statements are made by propositions. * The propositional logic is also called as Boolean Logic. * The sentence / statement is declarative, which is either true or false, but can not be both. * Questions, opinion, and comma(,) are not allowed in propositional logic. Eg. + Students are studying in college (True Proposition) + 5 + 3 = 8 (True Proposition) + print(“Hello World”) (True Proposition) + 4+4 2 = 5 (False Proposition) + What is your name? (not accepted / syntax error) + Some students are intelligent (false proposition because this declares both true / falsePropositional Logic - Syntax « Syntax - defines the allowable sentences * The atomic sentences- the individual syntactic elements- consist of a single proposition symbol. + Each such symbol stands for a proposition that can be true or false. + We will use uppercase names for symbols: P, Q, R, and so on. + For example, » W1,3 stand for the proposition that the Wumpus is in [1,3].Propositional Logic - Syntax... * Complex sentences : constructed from simpler sentences using logical connectives (logical opeators) * = (not) : called the negation, A literal is either an atomic sentence (a positive literal) or a negated atomic sentence (a negative literal). °A (and) : A sentence whose main connective is called a conjunction; its parts are the conjuncts. °V (or): a disjunction of the disjuncts += (implies) : is called an implication (or conditional). «© (if and only if) : The sentence is a biconditional.A Formal Grammar of Propositional Logic + A BNF (Backus-Naur Form) grammar of sentences in propositional logic Sentence AtomicSentence | CompleaSentence > AtomicSentence -+ True| False | Symbol Symbol + P| Q|R]... ComplexSentence -—+ —- Sentence | ( Sentence A Sentence ) | (Sentence V Sentence ) | (Sentence => Sentence ) | (Sentence < Sentence }Propositional Logic - Semantics * The semantics defines the rules for determining the truth of a sentence with respect to a particular model. «In propositional logic, a model simply fixes the truth value - true or false - for every proposition symbol. mi = (P1,2 = false, P2,2 =false, P3,1= true).Propositional Logic - Semantics... «The semantics for propositional logic must specify how to compute the truth value of any sentence, given a model. ¢ This is done recursively. + All sentences are constructed from atomic sentences and the five connectives. * Specify how to compute the truth of atomic sentences and how to compute the truth of sentences formed with each of the five connectives. + Atomic sentences are easy. ¢« Complex sentences : For any sentence s and any model m, the sentence -— s is true in m if and only if s is false in mTruth Tables for the Five Logical Connectives P Q =P | PaQ | PvQ | PSQ | PeQ False |False |\True |False |False |True |True False |True |True |False |True |True_ |False True |False |False |False |True_ |False |False True |True |False |True |True |True |True
You might also like
AI Decode
PDF
No ratings yet
AI Decode
139 pages
AI - Unit - 2
PDF
No ratings yet
AI - Unit - 2
30 pages
AI Notes Unit II
PDF
No ratings yet
AI Notes Unit II
31 pages
Ai Unit 2
PDF
No ratings yet
Ai Unit 2
135 pages
AI All Units
PDF
No ratings yet
AI All Units
93 pages
4 Adversel Search Game Tree
PDF
No ratings yet
4 Adversel Search Game Tree
51 pages
Ai Unit 3
PDF
No ratings yet
Ai Unit 3
138 pages
AI-Lecture 6 (Adversarial Search)
PDF
No ratings yet
AI-Lecture 6 (Adversarial Search)
68 pages
Unit 3 Updated
PDF
No ratings yet
Unit 3 Updated
112 pages
AI Unit-III
PDF
No ratings yet
AI Unit-III
124 pages
Adversarial Search
PDF
No ratings yet
Adversarial Search
37 pages
Unit 3 - Ai - II Aiml Full-1
PDF
No ratings yet
Unit 3 - Ai - II Aiml Full-1
108 pages
Lecture 5 - Adversal Search
PDF
No ratings yet
Lecture 5 - Adversal Search
88 pages
GamePlaying Minimax Unit-2 SPS
PDF
No ratings yet
GamePlaying Minimax Unit-2 SPS
72 pages
Adversarial Search and Game Playing
PDF
No ratings yet
Adversarial Search and Game Playing
77 pages
AI Unit 3
PDF
No ratings yet
AI Unit 3
76 pages
AI Unit 3
PDF
No ratings yet
AI Unit 3
54 pages
Lec 04
PDF
No ratings yet
Lec 04
79 pages
Games
PDF
No ratings yet
Games
41 pages
3 GamePlaying - Minimax
PDF
No ratings yet
3 GamePlaying - Minimax
75 pages
AI Unit-3
PDF
No ratings yet
AI Unit-3
109 pages
Unit 2 Studcou
PDF
No ratings yet
Unit 2 Studcou
64 pages
Lecture 6 KR
PDF
No ratings yet
Lecture 6 KR
58 pages
Yapay Zeka - 8
PDF
No ratings yet
Yapay Zeka - 8
48 pages
Game Playing. Updated
PDF
No ratings yet
Game Playing. Updated
44 pages
Adversarial Search Two - Persons Game: Russel Norvig (Text) Book and Patrick Henry Winston (Reference Book)
PDF
No ratings yet
Adversarial Search Two - Persons Game: Russel Norvig (Text) Book and Patrick Henry Winston (Reference Book)
71 pages
Adversarial Search
PDF
No ratings yet
Adversarial Search
42 pages
W Chapter5
PDF
No ratings yet
W Chapter5
58 pages
Chapter3 - Search4
PDF
No ratings yet
Chapter3 - Search4
37 pages
AI Lec03 Adversarial Search
PDF
No ratings yet
AI Lec03 Adversarial Search
38 pages
Unit 2 Adversial Search
PDF
No ratings yet
Unit 2 Adversial Search
36 pages
Lecture 6 - Adversarial Search
PDF
No ratings yet
Lecture 6 - Adversarial Search
45 pages
Chapter. 06 - Adversarial Search and Games - No Embedded Videos
PDF
No ratings yet
Chapter. 06 - Adversarial Search and Games - No Embedded Videos
51 pages
Week4 Lect9 10 AI
PDF
No ratings yet
Week4 Lect9 10 AI
49 pages
UNIT 2 AI Notes
PDF
No ratings yet
UNIT 2 AI Notes
26 pages
Lec11&12-Adversarial Search
PDF
No ratings yet
Lec11&12-Adversarial Search
30 pages
CC511 Week 4
PDF
No ratings yet
CC511 Week 4
57 pages
Artificial Intelligence: Adversarial Search
PDF
No ratings yet
Artificial Intelligence: Adversarial Search
62 pages
Game-Playing & Adversarial Search
PDF
No ratings yet
Game-Playing & Adversarial Search
68 pages
Oradea: Bucharest Arad Craiova
PDF
No ratings yet
Oradea: Bucharest Arad Craiova
53 pages
Lecture 4
PDF
No ratings yet
Lecture 4
29 pages
Search Chapter5
PDF
No ratings yet
Search Chapter5
36 pages
Adversial Search
PDF
No ratings yet
Adversial Search
38 pages
Adversarial Search: in Artificial Intelligence
PDF
No ratings yet
Adversarial Search: in Artificial Intelligence
21 pages
Adversial Search
PDF
No ratings yet
Adversial Search
21 pages
AI Lec07 Adversarial Search
PDF
No ratings yet
AI Lec07 Adversarial Search
29 pages
Artificial Intelligence: Adversarial Search
PDF
No ratings yet
Artificial Intelligence: Adversarial Search
58 pages
CSC-411-AI-lec6-Adversarial Search
PDF
No ratings yet
CSC-411-AI-lec6-Adversarial Search
38 pages
CS 188: Artificial Intelligence: Adversarial Search
PDF
No ratings yet
CS 188: Artificial Intelligence: Adversarial Search
44 pages
AdversialSearch Max MinGameAlphaBeta Pruning
PDF
No ratings yet
AdversialSearch Max MinGameAlphaBeta Pruning
19 pages
Unit 3
PDF
No ratings yet
Unit 3
13 pages
06 Adversarialsearch
PDF
No ratings yet
06 Adversarialsearch
36 pages
University Paper Solution 2021-22
PDF
No ratings yet
University Paper Solution 2021-22
12 pages
Game Playing
PDF
No ratings yet
Game Playing
53 pages
Game Playing: Adversarial Search
PDF
No ratings yet
Game Playing: Adversarial Search
66 pages
AI Unit 3
PDF
No ratings yet
AI Unit 3
6 pages
It-1 Aiml Answer Key
PDF
No ratings yet
It-1 Aiml Answer Key
8 pages
Adversarial Search and Game Playing: Games
PDF
No ratings yet
Adversarial Search and Game Playing: Games
8 pages