Closed fteicht closed 5 months ago
Hi Florent,
Thanks for your bug report.
"I get the following exception which seems to indicate an issue with the RDDL parser or the grounder"
Indeed, this is not actually a bug with the grounder, so much as it is a feature limitation. Currently, the grounder we've implemented only supports the original RDDL syntax "pre-enum", so it will not support enums and everything added to the language afterwards and explains why the grounder is crashing (note the message only lists "drone" as a valid type, whereas "propeller" is an enum type). I think we should definitely document that better.
You could get it to work if you replace the propeller type with a proper object type, but I don't remember how much exactly you'd have to change in the CPF definitions to make it work correctly. We are hoping to update the grounder support in the future, but there are some syntax features that we do not have an idea how to support, so we want to make sure enums can be properly handled during grounding when we decide to ahead with it (you are, of course, welcome to submit a PR if you are this ambitious :) )
"Please note that the exact same domain just works fine with pyRDDLGym-jax"
The JAX planner does not ground the domain because it represents all the pvariables using numpy/jax tensors, which allows it to scale quite well in practice thanks to vectorization. The JAX planner is indeed designed to solve continuous domains like this and does it optimally I believe, though you may get some mileage with the RL package too.
Hi again, It seems adding enum support was not that hard for the grounder (as enum objects are treated almost the same way as regular objects). I've added this feature to the latest (github) version of pyRDDLGym, along with a few other fixes and error handling of unsupported operations. If you have further problems with the grounder, please let me know. Thanks.
Sorry Mike for not having answered earlier! I haven't had time to give it another try following your updates, but I'm glad you found an elegant working solution! Best, Florent
Hi Florent, Apologies for my very late replies as well. If you have any further issues with pyRDDLGym or other packages, we'll be glad to help. Best, Mike
Hi,
First of all, thanks a lot for the great and helpful work on the pyrddlgym-project and all the dependent domains and solvers!
I tried to run pyRDDLGym-gurobi on the Quadcopter domain from
rddlrepository.archive.standalone.Quadcopter
using the following command:I get the following exception which seems to indicate an issue with the RDDL parser or the grounder:
Please note that the exact same domain just works fine with pyRDDLGym-jax, which is strange to me because I thought that pyRDDLGym-gurobi and pyRDLLGym-jax use the same parser and grounder.
Thanks for your help! Best, Florent