day 24 timing

main
magical 2022-12-24 10:25:43 -08:00
parent 0d50dd1874
commit 66f2250b21
1 changed files with 6 additions and 0 deletions

View File

@ -122,8 +122,14 @@ show(0)
show(1) show(1)
#show((len(data)-2)*(len(data[0])-2)) #show((len(data)-2)*(len(data[0])-2))
import time
t1 = time.time()
start_node = start + (0, 1) start_node = start + (0, 1)
print(astar.search(start_node, is_goal, neighbors, heuristic)) print(astar.search(start_node, is_goal, neighbors, heuristic))
t2 = time.time()
start_node = start + (0, 3) start_node = start + (0, 3)
print(astar.search(start_node, is_goal, neighbors, heuristic)) print(astar.search(start_node, is_goal, neighbors, heuristic))
print("part 1", t2 - t1)
print("part 2", time.time() - t2)