Adding in the soda can challenge.

This commit is contained in:
Naveen Sundar Govindarajulu 2018-06-15 14:48:24 -07:00
parent 411e51dfc9
commit 6764c7faa4
2 changed files with 17 additions and 2 deletions

View file

@ -42,11 +42,11 @@ public class Sandbox {
public static void main(String[] args) throws com.naveensundarg.shadow.prover.utils.Reader.ParsingException {
List<PlanningProblem> planningProblemList = (PlanningProblem.readFromFile(Sandbox.class.getResourceAsStream("../problems/learning/reasoning_5.clj")));
List<PlanningProblem> planningProblemList = (PlanningProblem.readFromFile(Sandbox.class.getResourceAsStream("../problems/tora/sodacan.clj")));
Planner depthFirstPlanner = new DepthFirstPlanner();
PlanningProblem planningProblem = planningProblemList.stream().filter(problem -> problem.getName().equals("learning")).findFirst().get();
PlanningProblem planningProblem = planningProblemList.stream().filter(problem -> problem.getName().equals("soda can challenge")).findFirst().get();
depthFirstPlanner.plan(planningProblem.getBackground(), planningProblem.getActions(), planningProblem.getStart(), planningProblem.getGoal()).ifPresent(