Skip to content

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

Open
jku20 wants to merge 4 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 4 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.

@github-actions
Copy link
Contributor

This pull request has not seen activity in 14 days and is being marked as stale. If you're continuing work on this, please reply and state how to get this PR in a mergeable state or what issues it is blocked on. If the PR is not ready for review, please mark it as a draft. The PR will be closed in 7 days if there is no further activity.

@jku20
Copy link
Collaborator Author

jku20 commented Mar 23, 2026

This can be simplified to a BFS if I want, but that's annoying. Just going to merge for now.

@github-actions github-actions bot removed the S: Stale label Mar 23, 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.

1 participant