In the exercises in Chapter
2, a modified version of the vacuum cleaner world is mentioned.
(1) The geography of the environment is unknown.
(2) The location sensor is replaced by a bump sensor that detects
the agent's attempt to move into an obstacle or to cross the wall.
(3) At each time step, each room has a certain chance of increasing
1 unit of dirt.
Here we provide a small
program for who are interested in designing agents in the above
world. The prior knowledge of the environment and the performance
measure are described as follows:
(1) The environment is a
10x10 maze. (A 8x8 maze surrounding by walls. See the screenshot at
the end of this page.)
(2) Each cell is either a wall or a room.
(3) The walls are always clean.
(4) The agent cannot pass through the wall.
(5) The agent can go north, south, east, and west. Each move costs 1
point of energy.
(6) The agent can suck, each time decreasing 1 unit of dirt. Each
suck costs 2 point of energy.
(7) The agent can stay idle, costing no energy.
Given a period T,
the goal is
(1) minimize the sum of square of amount of dirt in all rooms over
(2) minimize the consumed energy