FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Minor refactor on a variable name by D-K-E · Pull Request #925 · aimacode/aima-python · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 5 additions & 4 deletions search.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ def expand(self, problem):

def child_node(self, problem, action):
"""[Figure 3.10]"""
next_node = problem.result(self.state, action)
return Node(next_node, self, action,
next_state = problem.result(self.state, action)
next_node = Node(next_state, self, action,
problem.path_cost(self.path_cost, self.state,
action, next_node))

action, next_state))
return next_node

def solution(self):
"""Return the sequence of actions to go from the root to this node."""
return [node.action for node in self.path()[1:]]
Expand Down

Back | FazBrowse Home | New Git URL