Giter Club home page Giter Club logo

app-trapper's Issues

Make online compile error

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

Error due to LPG option `-same_object`

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!

char *x vs char (*x)[500] warning

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:

image

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 *:

image

So if I understand well, that means that fgoals is a pointer to (one) char. However, when it is called:

image

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 charof 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...

Is this fix correct?

@lchrpa , we have this function:

image

and we call it like this:

image

I have replaced it with:

image

Agree? Why did it work well before?

Clean-up repo and do documentation

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.

Not running with lpg option

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

Understand Trapper-based solvers using LPG

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:

image

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.