AI3391 Session 13 searching with Non-Deterministic Actions and partial observations .pptx
1. AI3391 ARTIFICAL INTELLIGENCE
(II YEAR (III Sem))
Department of Artificial Intelligence and Data Science
Session 13
by
Asst.Prof.M.Gokilavani
NIET
11/14/2023 Department of AI & DS 1
2. TEXTBOOK:
• Artificial Intelligence A modern Approach, Third Edition, Stuart Russell
and Peter Norvig, Pearson Education.
REFERENCES:
• Artificial Intelligence, 3rd Edn, E. Rich and K.Knight (TMH).
• Artificial Intelligence, 3rd Edn, Patrick Henny Winston, Pearson
Education.
• Artificial Intelligence, Shivani Goel, Pearson Education.
• Artificial Intelligence and Expert Systems- Patterson, Pearson Education.
11/14/2023 Department of CSE (AI/ML) 2
3. Topics covered in session 13
11/14/2023 Department of AI & DS 3
Unit II: Problem Solving
• Heuristic search Strategies
• Heuristic function
• Local search and optimization problems
• Local search in continuous space
• Search with non deterministic actions
• Search in partial observation environments
• Online search agents and unknown environment
4. Introduction
• In an environment, the agent can calculate exactly which state results from any
sequence of actions and always knows which state it is in.
Searching with non-deterministic Actions
Searching with partial observations
• When the environment is nondeterministic, percepts tell the agent which of the
possible outcomes of its actions has actually occurred.
• In a partially observable environment, every percept helps narrow down the set of
possible states the agent might be in, thus making it easier for the agent to achieve
its goals.
11/14/2023 Department of CSE (AI/ML) 4
5. Example: Vacuum world, v2.0
• In the erratic vacuum world, the Suck action works as follows:
• When applied to a dirty square the action cleans the square and
sometimes cleans up dirt in an adjacent square, too.
• When applied to a clean square the action sometimes deposits
dirt on the carpet.
• Solutions for nondeterministic problems can contain nested if–then–
else statements; this means that they are trees rather than sequences.
11/14/2023 Department of CSE (AI/ML) 5
6. Example: Vacuum world, v2.0
The eight possible states of the
vacuum world; states 7 and 8 are
goal states.
• Suck(p1, dirty)= (p1,clean) and
sometimes (p2, clean)
• Suck(p1, clean)= sometimes
(p1,dirty)
Solution : contingency plan
• [Suck, if State = 5 then [Right,
Suck] else [ ]] .
• nested if–then–else statements
11/14/2023 Department of CSE (AI/ML) 6
7. • Non-deterministic action= there may be several possible outcomes
• Search space is an AND-OR tree
• Alternating OR and AND layers
• Find solution= search this tree using same methods.
• Solution in a non-deterministic search space
• Not simple action sequence
• Solution= subtree within search tree with:
• Goal node at each leaf (plan covers all contingencies)
• One action at each OR node
• A branch at AND nodes, representing all possible outcomes
• Execution of a solution = essentially
11/14/2023 Department of CSE (AI/ML) 7
AND–OR search trees
8. AND–OR search trees
• The first two levels of the search tree
for the erratic vacuum world.
• State nodes are OR nodes where some
action must be chosen.
• At the AND nodes, shown as circles,
every outcome must be handled, as
indicated by the arc linking the
outgoing branches.
• The solution found is shown in bold
lines.
11/14/2023 Department of CSE (AI/ML) 8
9. Non-deterministic search trees
• Start state = 1
• One solution:
1. Suck,
2. if(state=5) then [right, suck] ]
11/14/2023 Department of CSE (AI/ML) 9
10. Non-determinism: Actions that fail (Try, try again)
• Action failure is often a non-
deterministic outcome
• Creates a cycle in the search tree.
• If no successful solution (plan)
without a cycle:
• May return a solution that contains a
cycle
• Represents retrying the action
• Infinite loop in plan execution?
• Depends on environment
• Action guaranteed to succeed
eventually?
• In practice: can limit loops
• Plan no longer complete (could fail)
11/14/2023 Department of CSE (AI/ML) 10
11. Non-determinism: Actions that fail (Try, try again)
• Part of the search graph for the slippery vacuum world, where we
have shown (some) cycles explicitly.
• All solutions for this problem are cyclic plans because there is no way
to move reliably.
11/14/2023 Department of CSE (AI/ML) 11
12. Searching with partial observations
• In a partially observable environment, every percept helps narrow
down the set of possible states the agent might be in, thus making it
easier for the agent to achieve its goals.
• The key concept required for solving partially observable problems is
the belief state.
• belief state -representing the agent’s current belief about the
possible physical states.
• Searching with no observations
• Searching with observations
11/14/2023 Department of CSE (AI/ML) 12
13. Conformant (sensorless) search: Example space
• Belief state space for the super simple vacuum world
• Observations:
– Only 12 reachable states. Versus 2^8= 256 possible belief
states
– State space still gets huge very fast! à seldom feasible in
practice
– We need sensors! à Reduce state space greatly!
11/14/2023 Department of CSE (AI/ML) 13
15. Searching with no observations
• (a) Predicting the next belief state for the sensorless vacuum world
with a deterministic action, Right.
• (b) Prediction for the same belief state and action in the slippery
version of the sensorless vacuum world.
11/14/2023 Department of CSE (AI/ML) 15
16. Searching with observations
• (a) In the deterministic world, Right is
applied in the initial belief state,
resulting in a new belief state with
two possible physical states; [B,
Dirty] and [B, Clean].
• (b) In the slippery world, Right is
applied in the initial belief state,
giving a new belief state with four
physical states; [A, Dirty], [B, Dirty],
and [B, Clean].
11/14/2023 Department of CSE (AI/ML) 16
17. Topics to be covered in next session 14
• online search agents and unknown environments.
11/14/2023 Department of CSE (AI/ML) 17
Thank you!!!