Repository navigation
Make every planner honour its budget and claim only what it guarantees - #166
Merged
Merged
Conversation
Write down where and why we mean to publish jupyddl as citable research software (.docs/PUBLISHING.md): a Zenodo DOI per release, a JOSS paper, ICAPS workshops for the research results, with a readiness checklist, the paper outline, the AI-usage disclosure JOSS requires, and how contributors can be considered for authorship. The README states the project's aim and its Cite section now says which version the 2021 preprint describes. Add the community files an outside contributor expects: a security policy, a pull-request template, a "Propose an algorithm" issue template, and an "Adding an algorithm" section in CONTRIBUTING.md. Run tests and build on pull requests. They were `on: [push]`, which never fires for a fork, so a contributor's PR showed no checks at all. Fix AGENTS.md drift: the Python floor is 3.10 and Mergify is retired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RbGtRHF8XhkiPQCDVHtV2
A package can now add planners, heuristics and generators by declaring `jupyddl.planners`, `jupyddl.heuristics` or `jupyddl.generators` entry points. Once installed, they work from the CLI, the benchmark harness and `jupyddl.solve` by name, without anyone importing the package. Discovery is lazy and defensive (jupyddl/plugins.py): the CLI runs it before building its parser, the library only on a registry miss, so importing jupyddl never scans installed packages. A built-in name always wins, a plugin that fails to import is skipped with a warning, and JUPYDDL_NO_PLUGINS=1 turns it off. `jupyddl plugins` lists what was found. The CLI now reads `requires_heuristic` from the registry at call time, since INFORMED_PLANNERS is fixed at import and cannot know about plugins. .docs/EXTENDING.md walks through a heuristic, a planner from a priority function, a planner from scratch with the budget/observer contract, a generator, testing the guarantees you claim, and shipping as a plugin. tests/test_extending.py runs every Python block in it, so it cannot drift. best_first now accepts a tuple priority for tie-breaking; observers get its first element as `f`, so traces stay numeric. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RbGtRHF8XhkiPQCDVHtV2
# Conflicts: # .docs/PUBLISHING.md # AGENTS.md # CHANGELOG.md
Each of these returned a plan, a cost or a value without complaint, and validate_plan accepted the plans because it replays them through the same Task.apply. tests/test_semantics.py now pins them on tiny hand-written tasks; 16 of its cases fail on the previous code. - Derived facts were never retracted, and (not <derived>) held from the start. close() now recomputes axioms from scratch and maintains negated derived facts; negation inside a rule body (needs stratification) is refused. The relaxation gets the complement for free, so it never calls a solvable state a dead end. - An atom both added and deleted left its complement true too; a `when` re-adding a deleted atom did the same. Complements: the delete wins. - Under a (total-cost) metric an action without a cost effect is free, as in IPC planners (pegsol/sokoban optimised the wrong objective). Cost inside `when` was charged unconditionally: refused, as are negative costs. - A never-defined numeric fluent read as 0; conditions reading one fail. - blind skipped zero-cost actions and overestimated. - h1/h2/hm crashed on numeric states; LM-cut crashed on an empty goal. - lmcut and h2 clear `admissible` on tasks with conditional effects. - Optimal planners default to lmcut, not hff; `-H none` means blind. - make_heuristic builds a heuristic class or partial instead of passing it through unbuilt. - Fact ids and id sets are built in sorted order, so LM-cut tie-breaks, expansions and plans no longer change with PYTHONHASHSEED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RbGtRHF8XhkiPQCDVHtV2
- iddfs, idastar and ehc never read their budget, so --time-limit was ignored. They poll per expansion now; the recursive ones unwind with BudgetExhausted. beam polls per node, not per layer, and bnb stops evaluating siblings once the budget fires. - Hitting a depth cap (iddfs max_depth, bnb max_depth) or Python's recursion limit sets stats.truncated: it is not a proof of unsolvability, nor of optimality. - bfs and iddfs leave OPTIMAL_PLANNERS: they minimise plan length, and on errands return cost 16 where 10 is optimal. - Live dashboard: a budget stop no longer reads "no plan found"; lines are clipped to the stream's terminal width so repaints do not smear; the non-tty log writes at most every two seconds. - idastar/ehc/hc/beam without a heuristic raise a clear ValueError; MultiObserver forwards positional arguments; the SearchObserver and best_first docstrings say what actually happens. tests/test_search_contract.py runs every planner where the budget is the only thing that stops it, checks OPTIMAL_PLANNERS against dijkstra under action costs, and pins the dashboard behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RbGtRHF8XhkiPQCDVHtV2
guilyx
marked this pull request as ready for review
November 3, 2026 08:10
guilyx
pushed a commit
that referenced
this pull request
Nov 3, 2026
4 tasks done
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.
What and why
This PR fixes the planner-contract bugs from the search review. The old budget test ran on
tsp, which finishes before any budget matters, so three planners that never read their budget still passed it.iddfs,idastar,ehcignore the budget--time-limit 0.5still running after 20 sBudgetExhaustedbeamovershootsmax_expansions=5→ 12 expanded; a 0.3 s limit took 0.73 sbnbovershootsbnb/iddfsreported "No plan found" when they hitmax_depth; abnbplan under a cap counted as optimal (cost 16 vs 10)truncatedbfs/iddfslisted inOPTIMAL_PLANNERSidastar/ehc/hc/beamwith no heuristic crashed with aTypeErrordeep in the search;MultiObserverrejected positional args; theSearchObserverdocstring claimed hooks are called "defensively"ValueError; positional args forwarded; docstrings correctedGuarantees changed
bfsandiddfsleaveOPTIMAL_PLANNERS. They stay shortest-in-length, and the README already described them that way.truncatedis now also set when a depth cap or the recursion limit stops a run. That is the only honest reading of such a result.How it was checked
tests/test_search_contract.py(38 cases):max_expansions=100and withtime_limit=0.3OPTIMAL_PLANNERSmember matched againstdijkstraon errands, which has action coststruncatedMultiObserverpositional argsflake8andblackare clean, andweb/distis rebuilt.Checklist
flake8 jupyddl tests toolsandpytestpass locallypython tools/build_web.pyre-run;web/distcommittedOPTIMAL_PLANNERSare stated aboveCHANGELOG.mdupdated (Unreleased → Fixed)The history has a
merge -s oursof the already-merged #165 tip so the push fast-forwards. Squash-merge.Generated by Claude Code