Title: Classical Planning with LLM-Generated Heuristics: Challenging the State of the Art with Python Code
Venue: NeurIPS 2025
Accepted: yes
Keywords: automated planning

planning

heuristic search

search
Abstract: In recent years, large language models (LLMs) have shown remarkable performance in many problems. However, they fail to plan reliably. Specialized attempts to improve their planning capabilities still produce incorrect plans and fail to generalize to larger tasks. Furthermore, LLMs designed for explicit "reasoning" fail to compete with automated planners while increasing computational costs, which reduces one of the advantages of using LLMs. In this paper, we show how to use LLMs to always generate correct plans, even for out-of-distribution tasks of increasing size. For a given planning domain, we ask an LLM to generate several domain-dependent heuristic functions in the form of Python code, evaluate them on a set of training tasks with a greedy best-first search, and choose the best one. The resulting LLM-generated heuristic functions solve substantially more unseen out-of-distribution test tasks than end-to-end LLM planning, particularly for non-reasoning LLMs. Moreover, they also solve many more tasks than state-of-the-art domain-independent heuristics for classical planning, and are competitive with the strongest learning algorithm for domain-dependent planning. These results are impressive given that our implementation is based on a Python planner and the baselines all build upon highly optimized C++ code. In some domains, the LLM-generated heuristics expand fewer states than the baselines, showing that they are not only efficiently computable but also more informative than the state-of-the-art heuristics. Overall, our results show that sampling a set of planning heuristic functions can significantly improve the planning capabilities of LLMs.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper proposes using LLMs to generate domain-dependent heuristic functions in Python and integrating them into the Pyperplan planner for PDDL domains. This pipeline outperforms pure LLM planning that does not use PDDL. Unlike prior work, which prompts the LLM to generate a plan or develops complicated pipelines for LLM-based planning, this paper takes a PDDL description as input and outputs a heuristic that can be directly integrated into an off-the-shelf planner. The results indicate that LLM-generated heuristics can solve more planning tasks than domain-independent heuristics while being competitive with learning algorithms for domain-dependent planning. The LLM-generated heuristics are generally efficient to compute and can even be more informative than state-of-the-art heuristics, resulting in fewer node expansions.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths\n- The paper tackles a relevant research question: How can LLMs be integrated into classical planning? The quality of the heuristic function is essential for efficient planning, so applying an LLM to improve it makes sense.\n- The paper is well-written and easy to follow.\n- The method is simple compared to complex LLM planning pipelines, which is a significant strength. The results are promising and consistent across domains. The computational efficiency gains over end-to-end LLM planning are significant, especially as the generated heuristics can be re-used for multiple tasks.\n- The difference between this work and prior work is discussed in detail.\n\nWeaknesses\n- The method uses LLMs to create domain-specific heuristics for well-known planning domains. Some of the domains are very well-known, and, to my knowledge, all of them have been published before. It is unclear whether the LLM is genuinely synthesizing novel heuristics based on the PDDL description or if it is simply performing retrieval, ensembling, and/or adaptation of known solutions for known problems. Prompting the LLM for 25 candidates could essentially be hill-climbing on memorized fragments.\n- A Python-based planner outperforming a C++-based Fast Downward is an impressive result. However, the paper could provide more details, such as average/median number of node expansions and plan length, to understand the significance of these results. Figure 2 gives some answers but is insufficient alone.\n- While the issue with memory limit for the training phase is documented (Lines 138-139), it is still a concern in terms of fairness. Furthermore, the IPC 2023 competition rules did not allow the use of GPUs. Considering the size of DeepSeek models and the lack of public details on Gemini models, only the Distill Qwen 14B is somewhat comparable to the baselines in terms of memory usage during inference. This model is outperformed by the domain-independent heuristic h^{FF}. On the other hand, recent work [1] has noted that successfully scaling up GPU compute in these tasks is a non-trivial problem, with neural network-based methods struggling to outperform classical ML methods. From this perspective, this paper suggests a promising solution.\n- In addition to FunSearch and Ling et al., which the paper cites, there is other recent work [2-5] doing LLM-based heuristic generation for non-PDDL tasks. In addition to LLM-based sampling of heuristics proposed by this paper, some of these papers include reflective evolution and search that utilizes diversity. On the other hand, the authors acknowledge the feedback loop as a direction for future work, and the paper achieves strong results in PDDL domains even without it.\n\n[1] Chen, D. Z., Trevizan, F., & Thiébaux, S. (2024). Return to tradition: learning reliable heuristics with classical machine learning. In Proceedings of the International Conference on Automated Planning and Scheduling (Vol. 34, pp. 68-76).\n\n[2] Dat, P. V. T., Doan, L., & Binh, H. T. T. (2025). Hsevo: Elevating automatic heuristic design with diversity-driven harmony search and genetic algorithm using llms. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 39, No. 25, pp. 26931-26938).\n\n[3] Ye, H., Wang, J., Cao, Z., Berto, F., Hua, C., Kim, H., ... & Song, G. (2024). Reevo: Large language models as hyper-heuristics with reflective evolution. NeurIPS 2024\n\n[4] Liu, F., Tong, X., Yuan, M., Lin, X., Luo, F., Wang, Z., ... & Zhang, Q. (2024). Evolution of heuristics: Towards efficient automatic algorithm design using large language model. ICML 2024\n\n[5] Zheng, Z., Xie, Z., Wang, Z., & Hooi, B. (2025). Monte Carlo Tree Search for Comprehensive Exploration in LLM-Based Automatic Heuristic Design. arXiv preprint arXiv:2501.08603.\n\nQUESTIONS:\n- Could you run obfuscation experiments, where the domains, predicates, actions, etc., are completely renamed? This would help understand the drivers of performance and whether the LLM is fully utilizing the given PDDL specification to generate heuristics or if the LLM's behavior is similar to parametric retrieval based on the domain name. A small performance degradation could indicate that LLMs can generate heuristics for novel PDDL domains they have not encountered before.\n- Could you add more detailed reporting of the quantitative results (e.g., the runtime of heuristic functions in C++/Python, number of expansions, and plan length)? To make the results fully comparable and eliminate the impact of differences in frameworks, re-implementing a set of heuristics in Fast Downward would also be beneficial. A subset of the best R1-generated heuristics would already improve the paper.\n- An additional interesting experiment would be to fully adhere to the competition rules (32GB of RAM, no GPU, select suitable model & quantization) and see how far LLMs running on CPUs can be pushed. This would result in fully comparable performance metrics and help assess how close LLMs really are to the state of the art in this domain, considering that \"Challenging the State of the Art\" appears in the paper's title. This is a nice-to-have suggestion, not a requirement.\n\nLIMITATIONS:\n- There are no significant ethics concerns or potential negative social impact. Limitations are discussed interspersed throughout the text. The authors could point out that this method relies on PDDL. While the proposed method is significantly superior to purely LLM-based planning when the problem is easily expressible in PDDL, LLM-based planning does not have this dependency, which makes it a more general approach.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-06-15"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper shows how LLMs can be used to generate domain-dependent heuristics which can be integrated off-the-shelf into Pyperplan, a python based planner developed with educational purposes in mind, not performance. The methodology prompts an LLM providing the PDDL representation of the target domain, with the smallerst and largest instance. The prompt is complemented with two examples of planning domains, their models, their solution in python, their static domain and state representation in Pyperplan along with a checklist of common errors. A sample of heuristics are generated, n=25, and the best performing one over the training instances from the learning competition in the International Planning Competition (IPC)  is selected given the agile score of the IPC, with a five minutes timeout.\n\nThe experimental results strongly suggest that this approach to derive a heuristic function is competitive with state-of-the-art domain-independent heuristics, as well as other learning approaches to develop domain-dependent heuristic based on Gaussian models. Overall, the generated heuristic yields better coverage with similar expansion rates and plan length, meaning that the increase in coverage doesn't come with a cost of computation time, as a function of expanded nodes, and plan quality. \n\nOverall, it doesn't only outperform planners developed for performance considerations and well known domain-independent heuristics, it also shows how it substantially increases the performance of LLMs without reasoning capabilities.\n\nSTRENGTHS AND WEAKNESSES:\n# Quality\n\nThe paper develops a sound methodology following the style of papers aiming to understand how to prompt an LLM for coding purposes. It evaluates in depth how to assess the value of the approach by comparing the generated pipeline with existing approaches in the planning literature. Several metrics are used, baselines are provided using different LLMs, planning codebases, domain-independent heurstics and learnt heuristics, and the approach seems to be easily reproducible following the appendix. \n\nOn the flip side, a minor comment is that I missed having more details on the computation time to create the heuristic, as well as computation time to evaluate the heuristic. It is only mentioned in text with as a few hours. See question below. \n\nI also missed a deeper analysis of the strategies used by the LLM to develop their heuristics. The paragraph before section 5 is really insightful, but I was left wanting to know more, which per se it is a good outcome of a paper, but can also be a negative one. In trying to understand and relate the heuristics to theory, or to general strategies in planning, as a reviewer I was left wondering if all heuristics would follow the structure of the heuristics developed by correlation complexity [1], using weighted linear combinations of state variables, or other general strategies in the literature similar to relaxations, decomposition, etc. Having a deeper dive on what the heuristic \"looks like\" would make the paper more insightful. \n\nNo mention was added with respect of testing problems that have already been used for training the LLM. The paper cited below contains heuristics which are very similar to the one produced by the LLM in Blocksworld, as well as well known strategies to solve blocksworld suboptimally. Understanding how novel the new heuristics are (in terms of general strategies for problem solving) could address this issue, as well as devising new domains. \n\n[1] Jendrik Seipp, Florian Pommerening, Gabriele Röger, and Malte Helmert. 2016. Correlation complexity of classical planning domains. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence (IJCAI'16). AAAI Press, 3242–3250.\n\n# Clarity\nThe experimental design follows well accepted performance metrics by the Planning community, which is essential to convey the results. The text is well written and easy to follow. \n\nMinor suggestions:\n- move footnote 4 to the main text, it's an important observation.\n- Table 3, clarify number of failed heuristics out of how many? The table could also be more informative if shown as a figure.\n  \n# Significance\n\nIn the context of how to make LLMs to plan, this represents a promising approach to lift their performance closer to state-of-the-art symbolic planners, and at the same time, it provides a way forward to integrate LLMs within symbolic planning systems. This has been proved to be a very difficult task, with all the literature so far showing how far LLMs are in their planning capabilities when faced with planning problems specified in PDDL.\n\nThe results in this paper clearly motivate an active research direction developing this methodology further for other planning formalisms, improving LLMs planning ability and the integrations of LLMs in the development of symbolic planners.\n\n# Originality\n\nThis approach is not novel, i.e. programming a heuristic as noted by the authors has been tried before, but it has never been shown to perform so well on satisficing classical planning, a problem that so far has been proved to be extremely challenging for LLMs.\n\nQUESTIONS:\n- What is the speed factor difference when you try to solve a task with a highly engineered planner in C++ vs a planner written in python with educational purposes? This result can help the reader understand the impact of table 2. It could be measured by expansion time running breadth first search, or running the same LLM heuristic and greedy best first search, one written in python, the other one adapted by the authors in C++.\n\n- Can you clarify further on the issues raised above with respect to understanding what general strategies the heuristic is following, and how different it is from work published in the literature?\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 5, "CLARITY": 3, "IMPACT": 4, "ORIGINALITY": 3, "DATE": "2025-06-23"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper investigates the usage of LLM for solving classical planning tasks defined in PDDL. Instead of generating an end-to-end plan, the authors propose generating domain-dependent heuristics that are used in a greedy best-first search. The method consists of choosing a best-of-n heuristic by the score on the training set. The experiments include 8 classic planning environments. Results demonstrate that generated heuristics outperform domain-independent baselines and show competitive performance to the domain-dependent one.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n - The paper is well-written and easy to follow, with enough background information provided.\n\nWeaknesses:\n - The PDDL environments are often used to benchmark the LLM's planning abilities in general, which is why the plans are generated in full, end-to-end. While the models are known to fail on larger, out-of-distribution tasks, the key here is that the model can be applied to general-case planning for problems not defined in PDDL (e.g., agentic and robotics tasks). Although in the related work section, the authors discuss the possibility of incorporating their heuristic generation method into the pipeline where natural text problems are translated into PDDL, they do not attempt it, making the comparison unfair.\n - Overall, the method is a very simplistic BoN, with no modifications made to make it specific for the planning problems. Since the results are comparable to the only one provided domain-dependent baseline (371 $h^{WLF}_{GPR}$ vs. 373 $h^{R1}$), I would expect either a much greater margin, which would indeed demonstrate surprising abilities of the model to generate domain-specific heuristics, or some modifications/training specific for planning.\n- The statement of the baselines being state-of-the-art is questionable, since IPC 2023 shows the winners of GOFAI & HUZAR, which are not used in the comparison.\n- The possible contamination issue is not addressed. Though unlikely, there is a possibility of such heuristics present in the training set of R1 & Gemini (which were released after the IPC 2023).\n - Ablation study shows large deviations, which makes the statistical significance questionable.\n\nQUESTIONS:\nThe paper requires redirecting, as the general problem that the authors are trying to solve is unclear. Is it proposing the new SOTA LLM-based method for classical planning? If so, the results should be SOTA, and perhaps the paper is a better fit for a planning conference. Is it a new hybrid method for planning, applicable to the general natural text planning problems? Then, such applications and results should be shown and compared to the suitable baselines.\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 2, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 1, "ORIGINALITY": 1, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a novel method to improve classical planning by leveraging large language models (LLMs) to generate domain‐dependent heuristic functions from PDDL domain descriptions. Instead of relying on end-to-end plan generation by the LLM, the method “induces” heuristics in the form of Python code that guide a greedy best-first search. The approach involves prompting the LLM multiple times with a detailed and multi-component prompt (including PDDL domain files, sample tasks, example heuristics, and even a checklist of pitfalls), collecting diverse candidate heuristics, evaluating their performance on a training set of planning tasks, and finally selecting the best performing heuristic to tackle out-of-distribution test tasks. The paper includes extensive experiments comparing the LLM-generated heuristics with traditional domain-independent heuristics (e.g., FF) and state-of-the-art learning-based planners. Ablation studies on prompt components further illustrate the impact of various parts of the prompt. Overall, the work demonstrates that LLM-generated heuristics can significantly enhance planning performance and even overcome performance gaps between Python-based prototypes and C++ implementations in existing planners.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n- The paper presents an original idea of using LLMs to “induce” domain-dependent heuristics, circumventing the drawbacks of end-to-end plan generation and manual heuristic design.\n- A thorough experimental evaluation is provided, with comparisons against well-known baselines and state-of-the-art methods; the experiments on IPC domains, ablation studies, and runtime comparisons add credibility to the results.\n- The paper carefully explains the heuristic generation pipeline, including prompt design, candidate generation, evaluation, and selection. Supplementary material provides detailed prompts and example code, which aids reproducibility and transparency.\n- Although demonstrated on classical planning with PDDL, the approach has potential to be extended to other planning or combinatorial task settings.\n\nWeaknesses:\n- The method appears highly sensitive to the design and length of the prompt. The appendix shows an extremely long and intricate prompt—raising questions about scalability and whether the approach would still work as effectively with shorter or less detailed instructions.\n- The process of selecting the “best” heuristic from a generated set is somewhat heuristic itself, and additional discussion on the sensitivity of this selection mechanism and its potential failure modes would strengthen the work.\n\nQUESTIONS:\n- How sensitive is the overall performance to changes in the prompt formulation? Could more concise prompts yield similar performance, or is the detailed multi-component prompt essential?\n- How do variations in the underlying LLM (e.g., reasoning vs. non-reasoning models or model scale) affect the quality of the generated heuristics? Is there a clear trade-off between computational cost and heuristic performance? The LLMs in the paper are very strong.\n- Maybe worth discuss the LLM domain induction works on PDDL for better position the paper.\n\nLIMITATIONS:\nI don't see a separate limitation section. Not clearly discussed in Section 4 as well.", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work showed sampling a set of planning heuristic functions can significantly improve the planning capabilities of LLMs. More specifically, for a given planning domain, LLM generates several domain-dependent heuristic functions in the form of Python code, evaluates them on a set of training tasks with a greedy best-first search, and chooses the best one. They showed that the LLM-generated heuristic functions solve more tasks than LLMs prompted to generate plans end-to-end, and this difference is especially pronounced for non-reasoning LLMs.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n\n- The paper uses LLM to generate heuristics for the problem which seems interesting and showing that these heuristics may outperform the existing planner is surprising.\n\n- The paper provide comparison against existing planner \n\nWeaknesses/Questions:\n\n- It seems the LLM itself is not solving the planning problems and it produces the heuristics that still need the solver to find the plan. Also the paper mentioned that these heuristics outperforms existing planners which I don’t understand because if there exists a better heuristic then we should be able to design a better approximate algorithm. For example, for the blocksworld, there is a known 2-approx algorithm. Does that mean the generated heuristic by LLMs does better? If yes, is there any evidence for that?\n\n- The paper mentioned that LLM-generated heuristic functions solve more tasks than LLMs prompted to generate plans end-to-end. But it is not LLM that eventually executes the heuristics. Also I am wondering if the generated heuristics are executable or they still need human check!\n\n- In a more general case, the complexity of classical planning problems varies from polynomial to the Pspace. Does that mean LLMs are able to give us a reasonable approximate solution for np-complete, Pspace problems? \n\n- h^{FF} is referred to in the paper but never explained what the heuristic is. Especially when saying LLM's heuristics outperform state-of-the-art heuristics, such as h^{FF}. There should be some examples and justification. Also there are other heuristics mentioned in the paper which need to be explained for better understanding of LLMs’ heuristics. \n\n- The paper should discuss the details on datasets distribution on size, etc. They only mentioned an example like this: In Blocksworld, for example, the largest training task contains 29 146 blocks, while the largest test task has 488 block\n\nQUESTIONS:\nplease take a look at weakness and questions ablove.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 3, "CLARITY": 2, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-11"}