You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function converts an and/or nesting from the YAML into a logical formula, and converts it to DNF.
The issue is that the naive implementation for converting to CNF (without using auxiliary variables) has yet to be implemented: QuMuLab/python-nnf#21
Once it is, you should be able to use the results returned from this function to generate actions that carry out the equivalent condition. This is based on the idea that having an action with the precondition "a or b" is equivalent to having two adjacent actions with the same effects, one with the precondition a, the other with the precondition b. We avoid using "or" conditions directly because of the tendency to create axioms.
Ideally we can also apply this to "when" conditions, although "when" conditions may end up being converted to regular actions, in which case no extra work would need to be done (see #3 ).
Finally, it should also be applied to "context" specifications for context dependent system action, replacing the current context setting with the possibility for more complex formulas.
The text was updated successfully, but these errors were encountered:
beckydvn
changed the title
Use DNF's to allow bot designers to specify arbitrary logical formulas for preconditions and "when" conditions
Use DNF's to allow bot designers to specify arbitrary logical formulas for preconditions, "when" conditions, and context dependent system actions
Sep 26, 2022
beckydvn
changed the title
Use DNF's to allow bot designers to specify arbitrary logical formulas for preconditions, "when" conditions, and context dependent system actions
Use DNFs to allow bot designers to specify arbitrary logical formulas for preconditions, "when" conditions, and context dependent system actions
Sep 26, 2022
Implementation has started here (see this function): https://github.com/QuMuLab/plan4dial/blob/ee7654440b3e2a6632e1b215d2ecb96a93c09700/plan4dial/parsing/json_config_parser.py#L90
This function converts an and/or nesting from the YAML into a logical formula, and converts it to DNF.
The issue is that the naive implementation for converting to CNF (without using auxiliary variables) has yet to be implemented: QuMuLab/python-nnf#21
Once it is, you should be able to use the results returned from this function to generate actions that carry out the equivalent condition. This is based on the idea that having an action with the precondition "a or b" is equivalent to having two adjacent actions with the same effects, one with the precondition a, the other with the precondition b. We avoid using "or" conditions directly because of the tendency to create axioms.
Note that currently, the user is able to specify "or"s in the precondition, as well as "or"s of "and's" by listing multiple conditions under an "or" bullet (see https://github.com/QuMuLab/plan4dial/blob/ee208d2849a40a68ac9d358e03ea6c4988b7cd3e/plan4dial/yaml_samples/or_test.yml#L75) and the equivalent actions will be generated (see https://github.com/QuMuLab/plan4dial/blob/ee7654440b3e2a6632e1b215d2ecb96a93c09700/output_files/or_test/or_test_domain.pddl#L56). Further nestings like "and"s of "or"s are not currently allowed, which is what this issue hopes to solve.
Ideally we can also apply this to "when" conditions, although "when" conditions may end up being converted to regular actions, in which case no extra work would need to be done (see #3 ).
Finally, it should also be applied to "context" specifications for context dependent system action, replacing the current
context
setting with the possibility for more complex formulas.The text was updated successfully, but these errors were encountered: