pucrs-automated-planning / pddl-parser

:snake: Classical Planning in Python
GNU General Public License v3.0
84 stars 23 forks source link

FEATURE: add domain and problem for 8-puzzle #13

Closed bcorfman closed 2 years ago

bcorfman commented 2 years ago

I translated the 8-puzzle example from Artificial Intelligence: A Modern Approach by Russell and Norvig. It's easily understandable as a sample but also something that works the planner fairly hard, and it can be used as a basis for improved search.

Maumagnaguagno commented 2 years ago

The question is why add more example domains? Aren't the ones here enough? If we keep adding more examples we will end up with something similar to potassco/pddl-instances, and more people would expect example pull requests to be accepted. At some point we would have too many domains and new pull requests would not even be considered. 8-Puzzle is not a complex domain, the example grounding and planner are actually too simple on purpose. It is simple as TSP, with a single action and types.

The original version included only the Dinner domain as it is one of the few propositional domains clearly defined, and my original vision of a minimal propositional planner. The few other examples were added to test more features or to show interesting properties, as the visited predicate from TSP. Blocksworld and DWR are commonly found in class examples, and good enough to demonstrate objects and types in PDDL. I am actually considering removing Airport, and linking to external PDDL repositories.

My goal is to have a minimal set of examples. I hope you understand, my intention is only to keep this project simple. I still think it would be better to not have typing hierarchies at all, much simpler to explain the codebase.

meneguzzi commented 2 years ago

Hey, I agree with @Maumagnaguagno about not adding too many examples that can be found elsewhere. About the airport domain, I initially thought this was the same domain from Russel and Norvig (which it's not), so what I'd do is just replace it with the version everybody uses in the AI courses to exemplify planning, just to keep the educational aspect of this repo.

bcorfman commented 2 years ago

Thank you for allowing me to suggest the change, and I appreciate your thoughts. I have the 2003 copy of the Russell and Norvig text, but there is just a diagram with no canonical version in the text. If you have one you would like to share, please let me know, and I will make the changes.

I did not include this example in your unit tests because I understood you would want to keep them performant. I just included it in the README, so people would at least know of its existence if it was accepted.

However, if you wish to close the request rather than pursue it further, I certainly understand.

Maumagnaguagno commented 2 years ago

I also find the Air cargo transport domain (from Russel and Norvig, 3rd edition, 10.1.1) better for our use case, compared to Airport, however it is very close to a simplified DWR. Consider what we already have:

From my perspective we need a special set of domains that are not too long and with increasing details, so any student could read them all without feeling repetitive. The Air cargo transport feels too close to DWR, the same as N-Puzzle to TSP, and easy to describe or find online. Also, the current examples already cover the PDDL features supported, and the Parser is the main part of this project.

I will close this pull request, remove the Airport domain and improve the README in the next few days to make the project goal and scope more clear.