pyperplan icon indicating copy to clipboard operation
pyperplan copied to clipboard

Do you plan to improve this library?

Open guicho271828 opened this issue 1 year ago • 10 comments

I have a code base that cleans up the parser (mainly type annotations) and a separate branch that supports action costs. Is this repo open for pull-requests like this?

guicho271828 avatar Jun 13 '23 19:06 guicho271828

Dear Masataro, apologies for the lack of reply so far. The maintenance status of the project is not very clear. It is not very actively maintained. In practice it seems that @jendrikseipp and I are the ones that answer most questions, and Jendrik has taken the bulk of the maintenance work in recent years. Jendrik, what do you think about Masataro's question? I think improvements along those lines would be nice in principle.

maltehelmert avatar Sep 20 '23 08:09 maltehelmert

Hey Masataro, thanks for the suggestions! Type annotations would be great to have, but we'd need to also have tests for them, so that we know they're in sync with the code (probably using mypy). Action costs I'm less certain about, since this is a feature that is often omitted for teaching students about planning. It also depends on how much more complicated this change makes the code.

jendrikseipp avatar Sep 21 '23 11:09 jendrikseipp

Noticed your replies now. I am slow too :)

Yes, I use mypy.

The current parser is not designed for modularity and yes, adding action costs was a significant change.

I also feel the current design is a bit over-engineered (Visitor pattern), but this is another story and I do not address this.

guicho271828 avatar Oct 03 '23 18:10 guicho271828

I hope to see a refactoring that includes mixins for parsing each extension, e.g., action-costs, cond-effects, numeric variables, etc. Consider a code like this:

class STRIPS(Parser):
   ...
class DerivedPredicates(Parser):
    ...
class CondEffect(Parser):
    ...
class Probabilistic(Parser):
    ...
class Numeric(Parser):
    ...

class NumericProbabilistic(Numeric, Probabilistic, STRIPS):
    pass

guicho271828 avatar Oct 03 '23 18:10 guicho271828

@cjmuise Suggested replacing the parser to https://github.com/AI-Planning/pddl

guicho271828 avatar Oct 03 '23 18:10 guicho271828

@haz

guicho271828 avatar Oct 03 '23 18:10 guicho271828

I also feel the current design is a bit over-engineered (Visitor pattern), but this is another story and I do not address this.

pyperplan is an undergrad student project, so its developers did not have much software engineering experience.

maltehelmert avatar Oct 04 '23 08:10 maltehelmert

Given that this project should strive to remain simple, I think action costs are out of scope. And there's value in having no external dependencies, so I'd be reluctant to consider adding an external parsing library. But as I said, type annotations with mypy tests sound like a great idea for making the project more accessible to students.

jendrikseipp avatar Oct 05 '23 14:10 jendrikseipp

It seems multiple people are keen on having an entire planner written in Python with pretty software engineering, as I've had similar queries in the infrastructure I use for my own undergraduate planning assessment (and the very basic parser we developed in my group). Perhaps there's an opportunity for a community project here. An ICAPS planning in Python hackathon? 🥇

meneguzzi avatar Oct 05 '23 18:10 meneguzzi

Regarding Python planners: the Fast Downward team is working towards adding a Python API to the planner. And the Mimir planner, which is also implemented in C++, already has a Python API.

jendrikseipp avatar Oct 10 '23 10:10 jendrikseipp