@@ -44,3 +44,41 @@ def test_state_assertion():
4444 "pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl"
4545 )
4646 assert not apla .satisfies (apla .problem .goal , apla .initial_state )
47+
48+ def test_bfs ():
49+ apla = AutomatedPlanner (
50+ "pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl"
51+ )
52+ path , _ , _ = apla .breadth_first_search ()
53+ plan = apla .get_actions_from_path (path )
54+ plan_state = apla .get_state_def_from_path (path )
55+ assert plan and plan_state
56+
57+ def test_dfs ():
58+ apla = AutomatedPlanner (
59+ "pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl"
60+ )
61+ path , _ , _ = apla .depth_first_search ()
62+ plan = apla .get_actions_from_path (path )
63+ plan_state = apla .get_state_def_from_path (path )
64+ assert plan and plan_state
65+
66+ def test_dij ():
67+ apla = AutomatedPlanner (
68+ "pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl"
69+ )
70+ path , _ , _ = apla .dijktra_best_first_search ()
71+ plan = apla .get_actions_from_path (path )
72+ plan_state = apla .get_state_def_from_path (path )
73+ assert plan and plan_state
74+
75+
76+ def test_astar ():
77+ apla = AutomatedPlanner (
78+ "pddl-examples/dinner/domain.pddl" , "pddl-examples/dinner/problem.pddl"
79+ )
80+ path , _ , _ = apla .astar_best_first_search ()
81+ plan = apla .get_actions_from_path (path )
82+ plan_state = apla .get_state_def_from_path (path )
83+ assert plan and plan_state
84+
0 commit comments