Conversation
Operators now carry structured trees next to the flat STRIPS fields: a Condition tree (Lit/Not/And/Or/Equality/NumericCond/Exists/Forall) evaluated by condition.holds(), and an Effect tree (AddDel/NumEff/ EffAnd/When/Universal) that grounding compiles into the unconditional effects plus CondEffect guards fired by State.apply against the pre-state. Quantifiers ground by expansion over typed world objects (forall vacuously true, exists vacuously false). A simple_conjunction flag keeps plain-STRIPS grounding on the static-pruned fast path; richer preconditions fall back to the cartesian product so no applicable binding is dropped. Reference planners now accept and evaluate :adl, :equality, :disjunctive-preconditions, :quantified/:universal/:existential- preconditions and :conditional-effects via capability negotiation. diagnostics._condition_atoms walks the new trees. Corpus: briefcase (conditional effects) and rooms (quantifiers). Known gaps documented: ADL inside (:goal ...) is still flattened; (either ...) unhandled. Suite 221 passing (+30), 100% coverage, ruff/mypy clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Conflict in docs/object-model.md Known limitations: kept the ADL entry (goal-side gap) and main's temporal entry; the stale 'or preserved but not evaluated' bullet is superseded by both sides. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10.
What
Brings the library from STRIPS+typing+negative-preconditions to ADL level, evaluated end-to-end: parse → ground →
State.applicable/apply→ solved by the reference planners.Design (implemented by a background agent, reviewed and finished in-session)
Operator(Lit/Not/And/Or/Equality/NumericCond/Exists/Forall): liftedprecondition_tree, groundedprecondition;holds(atoms, fluents)evaluates the full boolean structure —or,imply,=, quantifiers are evaluated, no longer just preserved (precondition formula using OR #13's connective becomes a special case).AddDel/NumEff/EffAnd/When/Universal): grounding compiles it into the flat unconditional effects plusCondEffectguards thatState.applyfires only when their condition holds in the pre-state.forall→And(vacuously true when no objects),exists→Or(vacuously false).simple_conjunctionflag keeps plain STRIPS on the static-pruned binder; richer preconditions fall back to the cartesian product so no applicable binding is dropped.:adl,:equality,:disjunctive-preconditions,:quantified/:universal/:existential-preconditions,:conditional-effects;:adlis the umbrella.pddlpy validate's atom walker handles the new trees.Documented remaining gaps (in docs/object-model.md)
or/forall/existsin(:goal …)) is still flattened to a conjunction — listed under Future development.(either …)union types (pre-existing).Tests
Corpus: briefcase (the classic conditional-effects domain) and rooms (quantifiers), solved by the planners. Suite 221 passing (+30), 100% coverage, ruff/mypy clean, full
makegreen.Conflicts note
Parallel to #114 (temporal, #84): both touch
pddlpy/planning/state.py, docs, and README's Future-development list. Merge either first; I'll rebase the other.🤖 Generated with Claude Code