Action-restricted planning and goal planning - #4
Open
vkatter-uantwerpen wants to merge 2 commits into
Open
Conversation
added 2 commits
September 2, 2026 11:07
…abet A caller executing plans on real hardware often implements only part of the alphabet. Today plan_sync and plan_disambiguate may route through any action, so a returned word can contain a letter the caller cannot perform, and there is no way to ask for one that does not. Adds plan_sync_allowed and plan_disambiguate_allowed, taking the permitted actions explicitly. Existing entry points are untouched: plan_sync, plan_disambiguate and the _from_records and _uncached variants keep their signatures and behaviour, and the internal partition search treats a NULL action set as the whole alphabet, so their results are unchanged. The restricted merge search runs over the automaton rather than the pair oracle. A pair step is (delta(a,x), delta(b,x)), so the oracle's table is an optimisation rather than information here - and its precomputed merge_action cannot answer the question at all, since that action may be one the caller excluded. Staying automaton-only also means the restricted planner behaves the same whether a snapshot or an oracle was loaded, and needs neither. Disambiguation still uses a record source for its heuristic. A heuristic word is assembled from precomputed pair records, which know nothing about the caller's alphabet, so a word containing an excluded letter now falls through to the bounded search instead of being returned as a plan the caller cannot execute.
Reaching a target set of states is a different question from telling states apart, and there was no way to ask it. plan_goal searches over belief supports for a word that lands every hypothesis in a goal set, honouring the same restricted action alphabet. It is a breadth-first search over supports and needs no pair oracle, since reachability of a goal is not a distinguishability question. Reported as the new method BELIEF_BFS, so it is never confused with a synchronizing or resolving word. Separated from the action-restriction commit deliberately: that one closes a gap in existing planners, this one adds a capability that may be outside what this library is meant to cover. Taking one without the other is fine.
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.
Hey Guillermo,
I was integrating 0.4.0 into the setup and needed two things that aren't in there yet, so I added them:
Both additive.
plan_sync,plan_disambiguateand the_from_records/_uncachedvariants are untouched, and your tests pass unchanged.Best,
Vincent