You are on page 1of 11

CSE 860 Artificial Intelligence

(Nondeterministic Actions)

Prof. Dr. Yasar Ayaz


(Pride of Performance)

Chairman / Central Project Director


National Center of Artificial Intelligence (NCAI)
Pakistan

Professor & Founding Head


Department of Robotics & AI
NUST-SMME
1
• When the environment is fully observable and
deterministic, the agent knows the exact
results of its actions.
• When the environment is partially observable
or nondeterministic, percepts have to be used
to tell which state the agent is in.
• Solution → Contingency Plan (Strategy) that
tells what to do based on percepts.

2
3
Now we introduce nondeterminism in the form
of a powerful but erratic vacuum cleaner. In the
erratic vacuum world, the Suck action works as:
• 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.

4
➔[Suck, if State =5 then [Right, Suck] else [ ]]

5
• The complete solution is in the form of a tree
rather than a sequence.
• To nest if-then-else inside the tree, two kinds
of nodes are introduced:

➢OR Nodes: Branching due to agent’s choices


➢AND Nodes: Branching due to environment’s
choices

6
OR Node

AND Node

7
8
• Sometimes due to a recurring erratic action,
the agent may find itself in the same state
again and again. For such a cyclic solution is to
keep trying the same action until it works.
• This can be tackled by adding a label to the
cyclic part of the plan and using the label later
instead of repeating the plan itself.
• Consider a vacuum cleaner that sometimes
slips and fails to execute: Right or Left actions.

9
10
• Such a Cyclic Solution will eventually lead the
agent to the goal provided that each outcome
of a nondeterministic action eventually occurs.

11

You might also like