def SimpleReflexAgentProgram(rules, interpret_input):
def program(percept):<EOL><INDENT>state = interpret_input(percept)<EOL>rule = rule_match(state, rules)<EOL>action = rule.action<EOL>return action<EOL><DEDENT>return program<EOL>
This agent takes action based solely on the percept. [Fig. 2.10]