Closed ssardina closed 3 years ago
@lchrpa , first thanks for replacing the example with a working one for the online one.
Now, I am trying to understand this better. As far as I can see this is an example with two steps and no cycle:
So, first, can we delete all the other goals G2
to G6
in example/
which presumably we do not use at all (they are not in the graph)? I think so, but just want to check with you beforehand.
Second, this example is quite trivial right? In that it does two planning steps and that's it. It would be nice to have this one, but also a variant that the offline solver solves, and the online solver sometimes solves it.
One way is to allow 2 plans for the first goal, and if the online planner chooses the first one, it will not be able to solve the second one.
Would that be possible at all? Maybe introducing some dummy predicate that will kil the second goal? What do you think?
@ssardina regarding the example that, in the online version, might sometimes work and sometimes not, we might need some branching (e.g. going from G0 either to G1 or G2), where the planner does something that is ok for one branch while not ok for the other branch. Another possibility is to use (only) LPG as it is the only randomized planner is our collection. However, at this moment the seed value is hard coded for LPG (for the experiment reproducibility purpose).
Correct. I think the first option is nicer, we want to show the issue at the APP level, not at the planner level.
But the offline solver should be able to solve both right? It is just that the online planner will get a solution when choosing G1 but will most probable won't get a solution if the goal selected is G2.
The example that we have here seems really simple, linear.
Maybe add a G0 to G2 and G2 to G3, such that the path G0--> G2 --> G3 is doable by the offline solver (i.e., there is a solution) but the online will fail? But how to do so if you are saying it is deterministic anwyays?
I'll look at the benchmarks we have (tomorrow) if there are similar scenarios. The results usually do not favor online no trap variants, while with traps they are more favorable.
I have added one of the Woodworking examples, where the offline versions work, the online ones with traps work as well, while the online ones without traps do not. I believe that it will emphasize the strengths of our approach.
I apologize that it took me long to deal with it.
Thanks a lot @lchrpa , it is getting nicer and nicer!
Yes what you said is great and will show very well our technique: adding traps avoids bad decisions online!
I have run my OFFLINE and fails because LPG seems to have been compiled with few operators:
; Command line: /home/ssardina/git/soft/planning/app/app-trapper.git/tools/lpg -f pfile.pddl -o domain.pddl -out soln.
tmp -n 1 -seed 2323 -cputime 60 -nobestfirst -inst_with_contraddicting_objects -same_objects
Parsing domain file: domain 'WOODWORKING' defined ... done.
Parsing problem file: problem 'WOOD-PROB' defined ... done.
too many operators! increase MAX_OPERATORS (currently 10000)
it is using the LPG binary in tools/
which are already pre-compiled. I am curious what lpg
binary you are using that you don't get this limit in MAX_OPERATORS
.
I think we should provide the lpg
planner here, so that it is all self-contained. I will see now if I can find it.
OK I figured what happened. The path to my lpg was long, so it was exceding the MAX_STR_LEN
limit of 200 and some planning calls were just failing as it was truncated and LPG got wrong CLI options and failed! Eventually it kept searching until it was too big.
Fixed it by increasing it to 300.
I am also documenting the file main-offline.c
step-by-step while I try to understand it.. ;-) It is in branch clean-up-offline
Now the example with offline works perfectly, great!! and it takes quite a bit which means it is far from trivial, yes!
Tomorrow I try the online and will document the example for anyone wanting to understand it.
Thanks @lchrpa for putting it all together!
I still would like to have the sources of LPG!
Thanks @ssardina !
I see, perhaps we can increase MAX_STR_LEN
even more (just in case someone installs it in a "long" directory).
Thanks also for documenting the code. I am sure that there is a lot of dead code that can be removed.
Unfortunately, I don't have the LPG sources as well. I guess the only option to get the sources is to ask Alfonso or Alessandro from Brescia.
I have asked Alessandro. It is not major anyways.
Yes maybe I should increase it to 500 right? My path is long already but someone may even have a longer path. It is very tricky to see why it does not work because the system runs, but it sends the wrong system call and ...
Maybe I should check the length of the string and see if there is a char in the last element and tell the user to check?
OK examples are done at this point, thanks @lchrpa .
I will open other issues regarding non-example aspects and code. This is great, the examples are good!
ops, I should leave it open so that I don't forget to have this and the other (non-working unlucky example)
Originally posted by @ssardina in https://github.com/ssardina-planning/app-trapper/issues/7#issuecomment-783742586