Closed arbimo closed 3 months ago
@arbimo This makes sense, but waht would be the semantics for a problem with uninitailized value? If you remember, engines and validators in PDDL have a wide variety of interpretation of waht is allowed and disallowed...
The interpretation in this PR (enforced by a test case) is the most conservative one: the evaluation of an expression is undefined if it refers to an undefined value, as per the PDDL spec.
My position on the matter is that we have to allow models with undefined values as their are simply to many benchmarks with those. This issue was already reported 3 times (+2 if you count myself and another PhD at LAAS). For the semantics, we need to pick a "preferred" one and the one from the PDDL spec appears to be the least evil in the absence of a consensus in the community.
@arbimo I agree but let me try to summarize what I think we are implying here, at least for the numeric case which I think is the more critical. There are two cases. Numeric expressions in conditions and numeric expressions as right-hand side of effects (and let's treat inc and dec as assignment here). Conditions: any numeric expression containing an undefined numeric value in a state s is undefined is s, and the numeric condition that contains it evaluates to false in s. Any formula containing an undefined numeric condition (e.g., \phi = x +y >= 5) as a subformula is false (e.g., state s = {...x = undefined} \not \models \phi) . Numeric effect: any effect x = exp having exp undefined is undefined. An action having at least one undefined effect in s is not applicable. I think this is the closest semantics to PDDL2.1 and also the most conservative one, and hopefully I am not forgetting anything :)
Attention: Patch coverage is 93.90244%
with 5 lines
in your changes are missing coverage. Please review.
Project coverage is 85.34%. Comparing base (
ee56971
) to head (5915fed
).
Files | Patch % | Lines |
---|---|---|
...ed_planning/grpc/generated/unified_planning_pb2.py | 25.00% | 3 Missing :warning: |
unified_planning/io/pddl_reader.py | 66.66% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds support for undefined values in the initial state.
In essence, it introduces two new problem features that capture whether a problem has numeric/non-numeric state variables with undefined values in the initial state. If one of these features hold, then
problem.initial_value(...)
may returnNone
.fix #569 fix #526
todo: Missing the doc for the new features