Skip to content

Comments

[fud2] Planner Based Around Inductively Defining All Constructable States#2616

Open
jku20 wants to merge 3 commits intomainfrom
fud2/planner-I-thought-of-writing-the-paper-grrrr
Open

[fud2] Planner Based Around Inductively Defining All Constructable States#2616
jku20 wants to merge 3 commits intomainfrom
fud2/planner-I-thought-of-writing-the-paper-grrrr

Conversation

@jku20
Copy link
Collaborator

@jku20 jku20 commented Jan 20, 2026

I came up with this writing up fud2 for latte and trying to prove this planner problem NP hard w.r.t. the number of ops and states. Uhhh, I think the problem isn't actually that hard and this just kind of works and is actually okay-ishly efficient.

The big idea here is to keep a set of creatable states and iteratively look through every op to see if it's inputs are satisfied. If its inputs are satisfied, add the op's outputs to the set of creatable states and write the op down as used. This will find all creatable states from an input set.

However, this likely will create too large a set of ops, so this set is pruned. Ops whose outputs are redundant to other ops or whose outputs are never used are removed. This is iterated until ops stop getting removed.

It is possible for valid plans to exist this algorithm does not fine, but I think it does a pretty good job. It passes tests at least...

The complexity analysis on this one is a bit hard because it requires thinking up annoying worst case counter examples, but I can bound it by O(Ops^2 * States). The construction and pruning stage have nice symmetries where both require iterating over every op and each of those ops's inputs/output (the ops * states parameter) with an amount of iterations bound by the number of ops.

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