Lab 3: A simple reflex agent loses its way

5DV248 Lecture 1 · A 4x4 corridor world. Dark cells are outside the agent's perception. Switch the location sensor off and watch the agent's condition-action rules fail.
True world (you see everything; the agent does not)

Location sensor on (fully observable)
Flaky Suck motor (succeeds 80%)
Dirt sensor works at every cell
The agent's agent function (slides, adapted to a corridor)
function REFLEX-AGENT(percept) returns an action if status = Dirty then return Suck else if location known and Right is free then return Right else if location known then return Left-to-the-other-end else return NoOp // percept (?, Clean): no rule matches!

What the agent perceives each step
Step the agent to see its percepts.

Decision log