Skip to content

Commit 9054eef

Browse files
Agnishomnorvig
authored andcommitted
ModelBasedReflexAgent should have model. Code updated (aimacode#300)
1 parent 493fd13 commit 9054eef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

agents.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ def program(percept):
145145
return program
146146

147147

148-
def ModelBasedReflexAgentProgram(rules, update_state):
149-
"This agent takes action based on the percept and state. [Figure 2.12]"
148+
def ModelBasedReflexAgentProgram(rules, update_state, model):
149+
"This agent takes action based on the percept and state. [Figure 2.8]"
150150
def program(percept):
151-
program.state = update_state(program.state, program.action, percept)
151+
program.state = update_state(program.state, program.action, percept, model)
152152
rule = rule_match(program.state, rules)
153153
action = rule.action
154154
return action

0 commit comments

Comments
 (0)