Closed nirlipo closed 1 month ago
In terms of information about the use of costs in PDDL see below:
I haven't found anything interesting to be honest. So far, this is the existing simple visualization of a temporal plan:
You can access this by going to editor.planning.domains -> plugins -> install timeline viewer. http://editor.planning.domains/#read_session=qZxJB4b2Ht
This simply takes the plan file actions, and place them below using the initial time(first number) and their duration number within square brackets [].
There's some literature of tools visualizing temporal planning but I can't find anything that applies just to costs/numeric planning.
Below I discuss few possible visualizations of costs and visual semantics that can be attached to them.
Foreach predicate/function defined in the initial state, we can associate it witha drawing e.g. A line, an image, etc. and allow to:
PDDLexamples:
Draw a reservoir, and allow to define: max, min, and units. Then we can assign the cost or function/predicate to a specific reservoir. We have to see where in the UI we can add this
PDDLExample:
Note that in these two examples, capacity and fuel are expressed through predicates instead of functions, as it assumes no use of numeric variables, just action costs.This leads to the encoding of boolean predicates representing numbers, where the initial state expresses basic arithmetic such as sum, greater, smaller, etc. Think how can you associate these predicates into a visualization like the above. It may need a special function, similar to what we have for associating a set of predicates into a grid: https://planimation.github.io/documentation/ap_guide/#25-functions
Loopy is a nice visualization tool for systems thinking. We can take it as an inspiration to visualize flows and stocks, which are similar to reservoirs.
Explore some avilable demos provided by loopy and how it visualizes concepts
This type of semantics can be very helpful for some numeric fluents problems and lead to temporal planning visualizations.
Currently, on the branch feature/19-action-cost, the program can handle the PDDL files mentioned above. However, it only hardcoding the keywords "traverse-cost" and "total-cost" (for example, https://github.com/planimation/backend/blob/feature/19-action-cost/server/app/vfg/parser/Plan_generator.py#L126). The parser functions in the backend needs to be updated to handling complex PDDL syntax, maybe using some third-party libraries is a better option. Due to this reason, this branch is not merged into the develop branch yet. We found some potential libraries: https://pypi.org/project/pddlpy/ https://github.com/garydoranjr/pyddl
I also updated the predicate list generator function: https://github.com/planimation/backend/blob/125d6b020d8efc0bacc55f831781827921ed9b16/server/app/vfg/parser/Domain_parser.py#L34.
Currently, on the branch feature/19-action-cost, the program can handle the PDDL files mentioned above. However, it only hardcoding the keywords "traverse-cost" and "total-cost" (for example, https://github.com/planimation/backend/blob/feature/19-action-cost/server/app/vfg/parser/Plan_generator.py#L126). The parser functions in the backend needs to be updated to handling complex PDDL syntax, maybe using some third-party libraries is a better option. Due to this reason, this branch is not merged into the develop branch yet. We found some potential libraries: https://pypi.org/project/pddlpy/ https://github.com/garydoranjr/pyddl
I also updated the predicate list generator function:
Regarding the flexibility issue, our solution on the branch feature/19-action-cost-v2 allows users to specify the action cost keyword in the animation profile themselves. The backend will handle action costs based on the cost_keyword specified by the user.
However, we don't think this is the perfect solution, as it only supports one action cost_keyword. What if there are two separated action costs for Truck1 and Truck2?
I was trying to planimate this problem:
but I get an incorrect visualization:
Is this error a result of using PDDL action costs syntax? If that's the case, we could just ignore action costs effects and functions in the problem and domain files, and think later about how to visualize action costs.
If I run the same domain removing action costs from the problem, I get the correct visualization:
Best,