dtolpin / ff-all-plans

quick fix to FF planner by Jorg Hoffman to find all plans
0 stars 0 forks source link

First actions are always the same when generating all plans #1

Open alexEnsimag opened 7 years ago

alexEnsimag commented 7 years ago

Taking the example of a reverse-shell, with only 2 files descriptors available (fd0 and fd1, respectively for the input and output streams), and generating all plans without transpositions, all plans start with:

close fd1 socket fd1

when there exists legal plans plans starting with:

close fd0 socket fd0

Also tested with transpositions (until 20.000 plans), same problem.

dtolpin commented 7 years ago

I need a self-contained minimal example. Doman, problem, command-line. As small as possible

alexEnsimag commented 7 years ago

Here is an example with 3 actions. Generated plans with the command below are in the file plans.txt. ./ff -o domain1.pddl -f problem1.pddl -a 1 -t 1

It here generates 4 plans starting with (close fd1). And stops after the first plan generated with (close fd0), when it is supposed to expand on fd0 the same way it did on fd1.

domain1.txt problem1.txt plans.txt

dtolpin commented 7 years ago

This is NOT a minimal example. This is like 50 lines of code per file. If there is a bug in the planner it should come up in a simpler example. Otherwise, check your preconditions.

A minimal example would include:

We want to see that the actions are chained in all possible way. Are they?

alexEnsimag commented 7 years ago

Looking at the generated plans of the previous example, all actions are obviously not chained. And it's looks like that there is a problem of branching.

I add here an example with:

domain1.txt problem1.txt

Here are the 3 plans generated (same results with or without transpositions):

0: CLOSE FD1 1: EXECVE

0: CLOSE FD0 1: EXECVE

0: CLOSE FD1 1: CLOSE FD0 2: EXECVE

Missing plan:

0: CLOSE FD0 1: CLOSE FD1 2: EXECVE

dtolpin commented 7 years ago

Many thanks, let's see if I can stick A* into FF.

dtolpin commented 7 years ago

Hi Alex, when I run without transpositions I get infinite number of plans. Are you sure your example is correct?

I implemented A*, but need tests which work.

dtolpin commented 7 years ago

1) I implemented A*.

2) A* expands plans in a different order.

3) However if avoiding transpositions is on, plans leading to the same intermediate state will not be generated. That's actually the desired behavior for non-trivial domains --- you want different paths, not just permutations.

4) Without tracking transpositions, the plans are more diverse than with BFS, of course.

5) Alex, I need tests.

A* is turned on by -A 1 on the command line. Run this with -t 0 and see whether the generated plans are better. I think they are.

If (by using examples in addition to definitions) you can explain me what is the anticipated behavior of all plans while tracking transpositions (I'd say that is visiting any state at most once except for the goal state --- do you mean a different semantics?) I can try to implement this too.