ssardina-research / app-trapper Goto Github PK
View Code? Open in Web Editor NEWSoftware for IJCAI17 paper on solving APP with dead-end reasoning
Software for IJCAI17 paper on solving APP with dead-end reasoning
I can make the offline version, but online (see I have renamed main-traps.c
to main-online.c
in #1):
[ssardina@Thinkpad-X1 src]$ make online
gcc main-online.c -o pp-online -D__TOOLDIR__="\"`pwd | sed 's/src/tools/g'`\""
main-online.c: In function ‘create_domain_file’:
main-online.c:480:20: warning: too many arguments for format [-Wformat-extra-args]
480 | fprintf(out, ")\n", j); // the j is not used at all, no place in formatted string
| ^~~~~
main-online.c: In function ‘run_planner’:
main-online.c:597:7: internal compiler error: in subspan, at input.h:68
597 | snprintf(tmp, MAX_STR_LEN, COMMAND_LPG_1SOL, seed);
| ^~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
make: *** [makefile:7: online] Error 1
Wehn I try the online solver:
[ssardina@Thinkpad-X1 example]$ ../src/pp-online obj.pddl init.pddl predicates.pddl acts.pddl graph.txt 123 lpg
Checking plan: emptyplan.tmp
Plan executed successfully - checking goal
Goal not satisfied
Plan invalid
Failed plans:
emptyplan.tmp
Running trapper as follows: /home/ssardina/git/soft/planning/app/app-trapper.git/tools/lpg -f pfile.pddl -o domain.pddl -out soln.tmp -n 1 -seed 1692901013 -cputime 60 -nobestfirst -inst_with_contraddicting_objects -same_object
Unknown option: -same_object entered
LPG-td-1.0 SETTINGS:
This is because the commands in def.h
have the -same_object
when calling LPG. It is strange because they are in the original LPG indeed, but that does not seem to be recognized by the lpg binary!
What is happening here? If I delete that option from the commands, then it works!
This is not a problem, it is my misunderstanding of C and I am curious. ;-)
When I compile, say offline solver, I get many errors of this sort:
I want to understand what is happening here. My C is not great for sure. :-)
It is true the arguments to the function are char *
:
So if I understand well, that means that fgoals
is a pointer to (one) char. However, when it is called:
Now that future_goals
is defined in the Node
struct as:
char future_goals[MAX_CONN][MAX_STR_LEN]
I understand that an array of something in C, is just the address to the first element of the array.
But future_goals
is not just an array of char
of size 500 (MAX_STR_LEN
): it is an array of an array of chars...
But the compiler seems to expect a `char (*)[500]’
Why it is not telling me that it should be char (*)[100][500]
(since MAX_CONN = 100
).
@lchrpa , I suspect this is trivial for you...
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 #7 (comment)
@lchrpa , can we remove the j
here? (main-online.c
)
There are to main C files in src/
: main-trap.c
and main.c
.
Which is the right one ?
@lchrpa , we have this function:
and we call it like this:
I have replaced it with:
Agree? Why did it work well before?
Would be nice to clean-up the repo and code a bit so that it can be distributed to others that want to use it and test experiments.
Basically we want a README that can be followed step-by-step, from setup to compile to run.
System does not seem to run with lpg option:
[ssardina@Thinkpad-X1 example]$ ../src/pp-traps obj.pddl init.pddl predicates.pddl acts.pddl graph.txt 123 lpg
Checking plan: emptyplan.tmp
Plan executed successfully - checking goal
Plan valid
Final value: 0
Successful plans:
Value: 0
emptyplan.tmp
FAIL
Hi @lchrpa
With the examples you provided, I have done quite a lot of clean-up, both at source level and documentation.
I have left log run files *.log
in each example.
One thing that I am still trying to remember is the role of LPG when we use use DFS+ or LMCUT. So, the paper says:
So it seems that even when we use offline with DFS+, the LPG planner is called and this is true as it prints things like this:
; Command line: /home/ssardina/git/soft/planning/app/app-trapper.git/tools/lpg -f pfile.pddl -o domain.pddl -n 1 -input_plan soln.tmp -seed 125 -same_objects
However, I can see those LPG calls also in the online solvers when using DFS with and without traps.
And all this happens on both of our examples that do NOT have loops in the APP, they are both linear.
Do you know what is happening or what am I missing @lchrpa ?
; Command line: /home/ssardina/git/soft/planning/app/app-trapper.git/tools/lpg -f pfile.pddl -o domain.pddl -out soln
Command line: /home/ssardina/git/soft/planning/app/app-trapper.git/tools/lpg -f pfile.pddl -o domain.pddl -n 1 -inp
ut_plan soln.tmp -seed 1234 -same_objects
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.