Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01f30fc

Browse files
committed
morning
1 parent 397f718 commit 01f30fc

File tree

5 files changed

+7700
-14
lines changed

5 files changed

+7700
-14
lines changed

.search_2.py.swp

-28 KB
Binary file not shown.

search_2.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def h(self, node): return 0
2525
def __str__(self):
2626
return '{}({!r}, {!r})'.format(
2727
type(self).__name__, self.initial, self.goal)
28-
2928

3029
class Node:
3130
"A Node in a search tree."
@@ -39,8 +38,7 @@ def __lt__(self, other): return self.path_cost < other.path_cost
3938

4039
failure = Node('failure', path_cost=math.inf) # Indicates an algorithm couldn't find a solution.
4140
cutoff = Node('cutoff', path_cost=math.inf) # Indicates iterative deepening search was cut off.
42-
43-
41+
4442
def expand(problem, node):
4543
"Expand a node, generating the children nodes."
4644
s = node.state

test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from search_2 import *
2+
3+
print_test()

0 commit comments

Comments
 (0)