Avoid Repeating states

Course Instructor: kinza ch

Three distinct problem types:
◦ Sensorless problems
◦ Contingency problems
◦ Exploration problems

This agent has no sensors at all

Initial state of these agents can be any one of the
possible states

Each action might lead to several successor states

Also called Conformant Problems





Suppose Vacuum agent with no sensors
Only information this agent has is possible set of states
{1,2,3,4,5,6,7,8}
Action Right will cause it to be in states {2,4,6,8}
Action Right,Clean will cause it to be in state
{4,8}…and so on.
So this agent perofrmed quite well, even when it
doesn’t have information from where it started
When the world is not fully observable, the agent must
reason about set of states
 These states are known as Belief States
 To solve sensorless problems we search in the set of
belief states rather than physical states (fully
observable)
 When there are 8 physical states of Vacuum world
example, its complete set of belief state will be 2^8=
256 belief states


Drawback
◦ If the environment is non-deterministic , the agent has no
way to tell which outcome has actually occurred in the
absence of any sensors


Environment => Partially observable
Actions => Uncertain

The agent percept will provide new information after
each action

If uncertainty is caused by actions of another agent,
these problems are called Adversarial problems

When the environment is such that agent can obtain
new information after each action from its sensors, the
agent faces contingency problems

Solution
◦ These problems can be solved with the help of tree, each
branch may be selected depending on the percepts received up
to that point in the tree

Example, Murphy’s Law World

When the states and actions of the environment are
unknown, the agent must act to discover them

Extreme case of contingency problems

Avoid Repeating states
 The
possibility of wasting time by expanding states that
are already been explored

For some problems, this possibility never comes up

Each state can only be reached one way. The efficient
formulation of the 8-queens can only be derived through
one path

For many problems, repeated states are unavoidable e.g.
Route finding problem

Tress of such problems are infinite

Avoiding repeated states can yield an exponential
reduction in search cost
a)
◦
b)
◦
State space graph
Two possible actions from every state
Tree from state space
Shows each possible path from state space graph
There are three ways to deal with repeated states
1.
Do not return to the state you just came from. Have the
expand function refuse to generate any successor that
is the same state as the node's parent
2.
Do not create paths with cycles in them. Have the
expand function refuse to generate any successor of a
node that is the same as any of the node's ancestors
3.
Do not generate any state that was ever generated
before. This requires every state that is generated to be
kept in memory (Hash tables)



Suppose a salesman have five cities to visit and then
must return home city
The goal of the problem is to find the shortest path for
the salesperson to travel