-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constant predicate in init error #4
Comments
Thanks for the report, @happysf128 . Could you attach the domain and instance files so that we can reproduce the issue? Could you also paste the exact command you use to invoke the planner? |
I have rewrite a simple example about what's wrong.
I am not sure how to attach files, here is a link to the problem file and domain file: |
Hi, I had another look on the problem. It looks like the parser treats special predicates (for example
Currently, my quick fix on this issue is to create a dummy action in the domain.pddl to put all those special predicates as effects. It would not affect the planning results, and it get around the problem (those predicates will not be treated as constants anymore). |
Although it does not make sense to have a constant predicate in the problem file (init:), it might be involved in debug your PDDL code.
Here is the issue:
Firstly, I define a predicate in the domain file,
(start)
Then, put it in the problem file
(:init (start))
, and make sure there is no action can change it.Then, here are the error message I got:
Problem domain: s_media_2 Problem instance: problem Working directory: /home/ghu1/Dropbox/fs/workspace/190218/s_media_2/problem Processing 1 action schemas Action schema "post" has arity 2 and 12 potential groundings 0/1 action schemas pruned for lack of groundings There is a total of 1.20E+01 potential ground actions Traceback (most recent call last): File "run.py", line 17, in <module> runner.main(sys.argv[1:]) File "/home/ghu1/Dropbox/fs/python/parser/runner.py", line 244, in main return run(parse_arguments(args)) File "/home/ghu1/Dropbox/fs/python/parser/runner.py", line 234, in run representation.generate() File "/home/ghu1/Dropbox/fs/python/parser/representation.py", line 41, in generate self.serialize_static_extensions() File "/home/ghu1/Dropbox/fs/python/parser/representation.py", line 62, in serialize_static_extensions serialized = elem.serialize_data(self.index.objects.data) File "/home/ghu1/Dropbox/fs/python/parser/static.py", line 138, in serialize_data return [serialize_symbol(self.elems[()], symbols)] # We simply print the only element File "/home/ghu1/Dropbox/fs/python/parser/static.py", line 33, in serialize_symbol serialized = symbol if python.utils.is_int(symbol) else table[symbol] File "/home/ghu1/Dropbox/fs/python/utils.py", line 62, in is_int int(s) TypeError: int() argument must be a string, a bytes-like object or a number, not 'tuple'
The issue get fixed by add a dummy action, that contains
(start)
as it effect, although this action will never appeared in any solution.The text was updated successfully, but these errors were encountered: