Professional Documents
Culture Documents
(Nondeterministic Actions)
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:
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