File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,3 +134,4 @@ logs/*
134134! logs /.gitkeep
135135data.json
136136pddl-examples /*
137+ data /*
Original file line number Diff line number Diff line change 88import coloredlogs
99import sys
1010
11- apla = AutomatedPlanner ("data/domain.pddl" , "data/problem.pddl" )
12-
1311
1412def test_searchDFS ():
13+ apla = AutomatedPlanner ("pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl" )
1514 dfs = DepthFirstSearch (apla )
1615 res = dfs .search ()
1716 assert res [1 ] != 0 # Path, computation time, opened nodes
1817
1918
2019def test_searchBFS ():
20+ apla = AutomatedPlanner ("pddl-examples/flip/domain.pddl" , "pddl-examples/flip/problem.pddl" )
2121 bfs = BreadthFirstSearch (apla )
2222 res = bfs .search () # Path, computation time, opened nodes
2323 assert res [1 ] != 0
2424
2525
2626def test_searchDijkstra ():
27+ apla = AutomatedPlanner ("pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl" )
2728 dijk = DijkstraBestFirstSearch (apla )
2829 res = dijk .search () # Goal, computation_time, opened_nodes(in this order)
2930 assert res [1 ] != 0 # Assert that it took some time to compute
3031 assert res [- 1 ] > 0 # Assert that it visited some nodes
3132
3233
3334def test_searchAStar ():
35+ apla = AutomatedPlanner ("pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl" )
3436 astar = AStarBestFirstSearch (apla , apla .available_heuristics ["goal_count" ])
3537 res = astar .search () # Goal, computation_time, opened_nodes(in this order)
3638 assert res [1 ] != 0 # Assert that it took time to compute
You can’t perform that action at this time.
0 commit comments