Skip to content

Fix GraphPlan: correct mutexes, interference, and level-off detection#1324

Merged
dmeoli merged 1 commit into
masterfrom
fix-graphplan
Jun 26, 2026
Merged

Fix GraphPlan: correct mutexes, interference, and level-off detection#1324
dmeoli merged 1 commit into
masterfrom
fix-graphplan

Conversation

@dmeoli

@dmeoli dmeoli commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Reworked, cleaned-up version of the GraphPlan fix originally proposed by @carwyn987 in #1315 (authorship of the commit is preserved). It keeps the valuable algorithmic work and adapts it to the current master while following the repo's conventions.

What it does

  • Reworks the GraphPlan engine: explicit proposition vs action mutexes, interference handling, proposition-level mutex propagation, invalid-action pruning, memoized backward solution extraction, and stronger level-off detection (state + mutex stability).
  • Adds a comprehensive tests/test_graphplan.py.
  • Adds curated planning environments: logistics_problem, generalized blocks_world, rush_hour, rush_hour_optimized.

Differences from #1315 (kept it in AIMA style)

  • Planning environments stay in planning.py (no separate planning_envs.py); from planning import * keeps working for the notebooks.
  • predicate_negate is a module-level helper in planning.py (the core Expr class in utils.py is untouched).
  • snake_case names and triple-quoted docstrings throughout; PEP 8 restored.
  • Dropped the experimental double_tennis_problem_simple* variants; double_tennis_problem/PartialOrderPlanner left unchanged.
  • requirements.txt keeps pytest-cov; README.md unchanged.

Tests

  • tests/test_graphplan.py: 34 passed
  • tests/test_planning.py: 37 passed
  • planning.py doctests: 102 passed

Supersedes #1315.

Rework the GraphPlan engine with explicit proposition vs action mutexes,
interference handling, proposition-level mutex propagation, invalid-action
pruning, memoized backward solution extraction, and stronger level-off
detection (state + mutex stability). Add a comprehensive tests/test_graphplan.py
and curated planning environments (logistics_problem, generalized blocks_world,
rush_hour, rush_hour_optimized). Existing planning tests and doctests pass.
@dmeoli dmeoli merged commit 814c3d9 into master Jun 26, 2026
4 checks passed
@dmeoli dmeoli deleted the fix-graphplan branch June 26, 2026 00:46
@dmeoli dmeoli mentioned this pull request Jun 26, 2026
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

Successfully merging this pull request may close these issues.

2 participants