diff --git a/src/main/java/edu/rpi/rair/DepthFirstPlanner.java b/src/main/java/edu/rpi/rair/DepthFirstPlanner.java index 5054f24..3549a90 100644 --- a/src/main/java/edu/rpi/rair/DepthFirstPlanner.java +++ b/src/main/java/edu/rpi/rair/DepthFirstPlanner.java @@ -13,7 +13,7 @@ import java.util.stream.Collectors; public class DepthFirstPlanner implements Planner { - private static int MAX_DEPTH = 4; + private static int MAX_DEPTH = 5; private static boolean EXHAUSTIVE_TILL_MAX_DEPTH = false; public static int getMaxDepth() { diff --git a/src/main/java/edu/rpi/rair/Operations.java b/src/main/java/edu/rpi/rair/Operations.java index 90aa7bd..517c07a 100644 --- a/src/main/java/edu/rpi/rair/Operations.java +++ b/src/main/java/edu/rpi/rair/Operations.java @@ -67,7 +67,7 @@ public class Operations { }).findAny(); - if(cachedOptional.isPresent()){ + if(cachedOptional.isPresent() && cachedOptional.get().getValue().isPresent()){ return cachedOptional.get().getValue(); } diff --git a/src/main/java/edu/rpi/rair/utils/RunDemo.java b/src/main/java/edu/rpi/rair/utils/RunDemo.java index 971a971..6ec7f0e 100644 --- a/src/main/java/edu/rpi/rair/utils/RunDemo.java +++ b/src/main/java/edu/rpi/rair/utils/RunDemo.java @@ -65,8 +65,7 @@ public class RunDemo { long start = System.currentTimeMillis(); Goal g1 = goalTrackingProblem.getGoalNamed("G1"); - Goal g2a = goalTrackingProblem.getGoalNamed("G2a"); - Goal g2b = goalTrackingProblem.getGoalNamed("G2b"); + Goal g2 = goalTrackingProblem.getGoalNamed("G2"); Goal g3 = goalTrackingProblem.getGoalNamed("G3"); Goal g4 = goalTrackingProblem.getGoalNamed("G4"); @@ -74,8 +73,8 @@ public class RunDemo { tryAndAddGoal(g1, goalTracker); - tryAndAddGoal(g2a, goalTracker); - tryAndAddGoal(g2b, goalTracker); + tryAndAddGoal(g2, goalTracker); + // tryAndAddGoal(g2b, goalTracker); tryAndAddGoal(g3, goalTracker); diff --git a/src/main/resources/edu/rpi/rair/goal_management_6.clj b/src/main/resources/edu/rpi/rair/goal_management_6.clj index e0e5304..edde9ec 100644 --- a/src/main/resources/edu/rpi/rair/goal_management_6.clj +++ b/src/main/resources/edu/rpi/rair/goal_management_6.clj @@ -157,16 +157,13 @@ :goals {G1 {:priority 1.0 :state [(not (open (door room1)))]} - G2a {:priority 1.0 + G2 {:priority 1.0 :state [(in prisoner room1)]} - G2b {:priority 1.0 - :state [(in guard room1)]} - G3 {:priority 1.0 :state [(sameroom guard prisoner)]} - G4 {:priority 2.1 + G4 {:priority 2.0 :state [(accompanies prisoner commander)]} }