Skip to content

Commit

Permalink
Adding new experiments (from latent space) and a refactoring to remov…
Browse files Browse the repository at this point in the history
…e files from goal recognition problems.
  • Loading branch information
ramonpereira committed Jan 16, 2018
1 parent d0f9e42 commit 7fc4699
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
Binary file added goalrecognizer1.1.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions src/heuristic/GoalCompletionHeuristic.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public boolean recognize() throws IOException, InterruptedException{
boolean correctGoalRecognized = recognizedGoals.contains(this.realGoal);
System.out.println("\n<?> Correct goal: " + this.realGoal);
System.out.println("<?> Was the correct goal recognized correctly? " + correctGoalRecognized);
Process p = Runtime.getRuntime().exec("rm -rf domain.pddl template.pddl templateInitial.pddl obs.dat hyps.dat plan.png real_hyp.dat");
p.waitFor();
return correctGoalRecognized;
}

Expand Down
2 changes: 2 additions & 0 deletions src/heuristic/LandmarkUniquenessHeuristic.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public boolean recognize() throws IOException, InterruptedException {
boolean correctGoalRecognized = recognizedGoals.contains(this.realGoal);
System.out.println("\n<?> Correct goal: " + this.realGoal);
System.out.println("<?> Was the correct goal recognized correctly? " + correctGoalRecognized);
Process p = Runtime.getRuntime().exec("rm -rf domain.pddl template.pddl templateInitial.pddl obs.dat hyps.dat plan.png real_hyp.dat");
p.waitFor();
return correctGoalRecognized;
}

Expand Down
4 changes: 3 additions & 1 deletion src/recognizer/Recognizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ public Recognizer(String fileName, float threshold){
throw new IOException(fileName + " not found.");

System.out.println("rm -rf domain.pddl template.pddl templateInitial.pddl obs.dat hyps.dat plan.png real_hyp.dat");
Process p = Runtime.getRuntime().exec("rm -rf domain.pddl template.pddl templateInitial.pddl obs.dat hyps.dat plan.png real_hyp.dat");
p.waitFor();
System.out.println("tar -jxvf " + this.planRecognitionFile);
Process p = Runtime.getRuntime().exec("tar -jxvf " + this.planRecognitionFile);
p = Runtime.getRuntime().exec("tar -jxvf " + this.planRecognitionFile);
p.waitFor();
String domainFilePath = "domain.pddl";
Path path = Paths.get(domainFilePath);
Expand Down
2 changes: 1 addition & 1 deletion test/heuristic/GoalCompletionHeuristicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testGoalCompletionHeuristicBlocksWorldCompactedFile(){

@Test
public void testGoalCompletionHeuristic(){
GoalCompletionHeuristic gcHeuristic = new GoalCompletionHeuristic("experiments/spider/pb03_spider_out_100.tar.bz2", 0.0f);
GoalCompletionHeuristic gcHeuristic = new GoalCompletionHeuristic("experiments/lodigital/pb06_lodigital_out_100.tar.bz2", 0.0f);
try {
boolean recognized = gcHeuristic.recognize();
assertEquals(true, recognized);
Expand Down

0 comments on commit 7fc4699

Please sign in to comment.