Skip to content

Action-restricted planning and goal planning - #4

Open
vkatter-uantwerpen wants to merge 2 commits into
gaperez64:mainfrom
vkatter-uantwerpen:contrib/action-restricted-planning
Open

Action-restricted planning and goal planning#4
vkatter-uantwerpen wants to merge 2 commits into
gaperez64:mainfrom
vkatter-uantwerpen:contrib/action-restricted-planning

Conversation

@vkatter-uantwerpen

@vkatter-uantwerpen vkatter-uantwerpen commented Sep 2, 2026

Copy link
Copy Markdown

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:

  • Restricting planning to a set of actions. My robot only implements five, and a word containing a letter it can't drive is useless to me.
  • Goal planning, to get a belief into a target set of states. Separate commit, so feel free to take only the first if this one isn't what the library is for.

Both additive. plan_sync, plan_disambiguate and the _from_records / _uncached variants are untouched, and your tests pass unchanged.

Best,
Vincent

Vincent 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.
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.

1 participant