The problem
Consider a rectangular room discretised into an R × C grid. Every cell is in exactly one of three states: clean, dirty or blocked by an obstacle (furniture, walls, clutter). A vacuum agent is dropped into the room with no map. It perceives only its immediate surroundings, and its battery, modelled as a budget of moves, is finite.
The task is to design an agent function that maps what the agent has perceived so far to an action, so that all reachable dirt is removed with as little wasted motion as possible, and without ever driving into an obstacle.
Seen through the lens of state-space search, the problem has a precise formulation:
- Initial state
- Agent at (0, 0); an unknown dirt configuration.
- Actions
- UP, RIGHT, DOWN, LEFT, SUCK, HALT.
- Transition model
- Deterministic; moves into walls/obstacles leave the agent in place (a bump).
- Goal test
- No reachable dirty cell remains.
- Path cost
- 1 per move, plus a penalty per collision.