Skip to content

Commit e549b48

Browse files
authored
Update search.py
1 parent 61d695b commit e549b48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

search.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,9 @@ def compare_searchers(problems, header,
15601560
recursive_best_first_search]):
15611561
def do(searcher, problem):
15621562
p = InstrumentedProblem(problem)
1563-
searcher(p)
1564-
return p
1563+
solution = searcher(p)
1564+
path_cost = solution.path_cost #Adding path cost
1565+
return (path_cost,p) # We return now both path cost and problem stats
15651566

15661567
table = [[name(s)] + [do(s, p) for p in problems] for s in searchers]
15671568
print_table(table, header)

0 commit comments

Comments
 (0)