function REFLEX-VACUUM-AGENT([location,status]) returns an action
if status = Dirty then return Suck
else if location = A then return Right
else if location = B then return Left
Figure ?? The agent program for a simple reflex agent in the two-state vacuum environment. This program implements the agent function tabulated in Figure ??.