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