| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0a08b7c commit 201e5f2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,11 +109,12 @@ def expand(self, problem): | |||
| 109 | 109 | ||
| 110 | 110 | def child_node(self, problem, action): | |
| 111 | 111 | """[Figure 3.10]""" | |
| 112 | - next_node = problem.result(self.state, action) | ||
| 113 | - return Node(next_node, self, action, | ||
| 112 | + next_state = problem.result(self.state, action) | ||
| 113 | + next_node = Node(next_state, self, action, | ||
| 114 | 114 | problem.path_cost(self.path_cost, self.state, | |
| 115 | - action, next_node)) | ||
| 116 | - | ||
| 115 | + action, next_state)) | ||
| 116 | + return next_node | ||
| 117 | + | ||
| 117 | 118 | def solution(self): | |
| 118 | 119 | """Return the sequence of actions to go from the root to this node.""" | |
| 119 | 120 | return [node.action for node in self.path()[1:]] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments