LeanPlan: Optimal Planning with LLM-Generated Heuristics and Admissibility Proofs
André G. Pereira, Augusto B. Corrêa, Felipe Meneguzzi, Jendrik Seipp
cs.AI
Oct 6, 2026 · v1
cs.LG cs.SC
TL;DR
Implements LLM-generated planning heuristics, their admissibility proofs, and an A* planner with machine-checked grounding and search in Lean 4.
Abstract
Frontier large language models (LLMs) can generate heuristic functions that guide search to achieve state-of-the-art performance in satisficing planning, where any plan is acceptable. However, these heuristics are not guaranteed to be admissible and can lead to suboptimal plans. We introduce LeanPlan, the first planning system that finds optimal plans with LLM-generated heuristics whose admissibility is machine-checked. Given a domain description and training tasks, an agentic loop uses planner feedback to iteratively improve a reusable domain-specific heuristic, its admissibility proof and the required domain assumptions. LeanPlan implements the heuristic, its proof and an efficient planner with machine-checked grounding and search in Lean 4. We evaluate LeanPlan on ten domains from the International Planning Competition and three new domains, using test tasks with up to 57 times as many objects as the training tasks. With GPT-5.6 Sol in the agentic loop, we successfully generate heuristics and admissibility proofs for all these domains. With the resulting heuristics, LeanPlan usually expands fewer states than the state-of-the-art Scorpion planner and solves more tasks overall.
Problem
LLM-generated heuristics perform well in satisficing classical planning, but they are not guaranteed to be admissible, so A* search using them can return suboptimal plans. Optimal planning needs heuristics with proven admissibility.
Approach
A deterministic generator translates each PDDL domain into a Lean 4 module. An LLM coding agent (GPT-5.6 Sol in Codex) iteratively develops a domain-specific heuristic, its admissibility (consistency and goal-awareness) proof, and the domain assumptions it relies on, guided by planner feedback and Lean build errors. Lean's kernel checks the proofs. At planning time, a certificate of domain assumptions is checked on each task before A* search, and grounding and search are themselves machine-checked in Lean.
Results
Heuristics and admissibility proofs were generated for all 13 domains (10 IPC 2023 Learning Track domains and 3 new ones), at about 70 minutes and US$17 per domain. LeanPlan solved 348 tasks in total, compared with 272 for Scorpion SCP and 209 for LM-cut, and usually expanded fewer states. The certificate checks also found a bug in an IPC 2023 Floortile training task.
| Domain set | Blind Scorpion | Blind LeanPlan | LM-cut | SCP | LeanPlan |
|---|
| IPC 2023 sum | 157 | 154 | 198 | 221 | 281 |
| New domains sum | 9 | 8 | 11 | 51 | 67 |
| Total | 166 | 162 | 209 | 272 | 348 |
Tasks solved (coverage) per configuration