Skip to content
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

External Function call for numerical evaluation #117

Open
ShrutheeshIR opened this issue Mar 3, 2022 · 1 comment
Open

External Function call for numerical evaluation #117

ShrutheeshIR opened this issue Mar 3, 2022 · 1 comment

Comments

@ShrutheeshIR
Copy link

ShrutheeshIR commented Mar 3, 2022

Hello, this is more of a planner question, rather than an issue that belongs here, but I was wondering if you support a feature, where instead of very simple arithmetic functions, such as '+', '-', '>=', if I could be able to call a function such as evaluate(a,b,c), which would return a boolean value, similar to the simple arithmetic functions. Eg., instead of

(>= (length ?a) (+ ( length ?b) (length ?c)))

to be something like

def eval_len(a,b,c):
    return a>=b+c
...
(eval_len(length ?a, length ?b, length ?c))

If this question does not belong here, apologies, will remove it.

Thanks.

@jan-dolejsi
Copy link
Owner

Theoretically the expressions could be anything, if the planner could evaluate it. Practically, however, the planner needs to be able to handle it efficiently. For that, planners build meta data about the pddl domain at hand using static and dynamic analysis. The simplicity of the pddl language makes it possible. If you build a planner that handles calls to this kind of Python code, you would have to implement static analysis of the Python expressions in order to keep the planner performant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants