Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b261836

Browse filesBrowse files
Agnishomnorvig
authored andcommitted
ModelBasedReflexAgent should have model. Code updated (aimacode#300)
1 parent 01c7453 commit b261836
Copy full SHA for b261836

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎agents.py‎

Copy file name to clipboardExpand all lines: agents.py
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.