arXiv:2609.06071cs.AISep 2026

Manuscript Offprint

arXiv:2609.06071

Generating Instance Generators in PDDL Planning

Nicola J. Müller, Naya Rudolph, Katharina Stein, Jörg Hoffmann, Ayal Taitler, Timo P. Gros

Abstract

PDDL, the de-facto standard language in the AI Planning community, is designed to specify planning domains: sets of instances that share the same predicates and action schemas. Yet it does not provide any means to specify the actual instance set, i.e., legality constraints on initial states and goal conditions, as well as possibly domain subset constraints specifying an instance subset we are interested in. One consequence of this is that instance generation has always been ad-hoc, with manually written domain- and subset-specific instance generators. Recent work has started to address this, through reasoning and learning methods that however suffer from scalability limitations. Here we introduce an alternative approach, leveraging LLMs to generate instance-generation programs, with built-in soundness guarantees through prescribed checks. We show that these automatically generated instance generators return large numbers of sound and diverse instances efficiently.

PDDL, the planning domain definition language, is the de-facto standard language in the AI Planning community (McDermott 2000; Bacchus 2000; Long and Fox 2003; Hoffmann and Edelkamp 2005; Gerevini et al. 2009; Haslum et al. 2019). PDDL is designed to specify planning domains: typically infinite sets of instances that share the same predicates and action schemas. Yet, PDDL does not provide any means to specify the intended set of instances.

First, in most domains, not all possible instances define legal initial states or goal conditions. For example, in the Blocksworld domain, a block must not be located on itself; in transportation domains, a truck must be in exactly one location, etc. Second, in many settings, we are actually interested in a subset of the legal domain instances; for example, we may want the goal to be a single stack of all blocks, or we may want to specify goal locations only for packages and not for trucks. We refer here to the former as legality constraints, and to the latter as subset constraints. This distinction has not generally been made in the literature. It is purely conceptual in that both are constraints on initial states, goals and combinations thereof. The distinction makes practical sense however, as legality constraints are fixed once per-domain, whereas subset constraints may vary depending on purpose.

In the absence of a specification language for such constraints in PDDL, past approaches to instance generation have been mostly ad-hoc. Researchers have manually written instance generators, domain-specific programs that generate

some subset of domain instances, with the underlying legality and subset constraints being implicit in the code. This opacity has long been a hindrance to identifying how a domain is actually defined, necessitating statements like "the set of instances that can be generated by generator X" when making claims about a domain (e.g. (Helmert 2003; Hoffmann 2005; Stein et al. 2026)). The lack of a more general methodology has also entailed that instance generators needed to be painstakingly implemented to cater for new domains or instance subsets.

An early attempt to address this problem was the work by Haslum and Scholz (2003), which proposed a language allowing to specify state invariants among others. This language, however, has never been adopted by the community. Later, Fuentetaja and De la Rosa (2012) introduced the first domain-independent instance generation method, including a language to specify legality constraints, with instance generation formulated as a planning problem. Yet the legality language is limited (each constraint on only a single predicate) and no experiments were published.¹

Recently, domain-independent instance generation has been addressed in two new approaches. Grundke, Helmert, and Röger (2025) specify legality constraints as PDDL axioms and use answer set programming to automatically generate instances. Núñez-Molina, Mesejo, and Fernández-Olivares (2024, 2025) formulate the problem of generating diverse and difficult instances as a Markov Decision Process, and use deep reinforcement learning (RL) to train policies that generate initial states and goals. While these works constitute significant progress, a weakness of both these approaches are scalability limitations. Answer set programming scales worst-case exponentially in the size of the generated instances, and thus quickly reaches its computational limits in practice. RL requires days of training time for each domain subset in practice; and the learned instance-generation policy has to generalize from small training instances to the large instances we desire to generate, which is challenging.

¹More work has been done on automated instance generation within domains, adjusting instance size/hardness automatically as suited, e.g., for learning purposes or for use in planning competitions (e.g. (Fern, Yoon, and Givan 2004; Marom and Rosman 2020; Torralba, Seipp, and Sievers 2021)).

In this work, we introduce an alternative approach that leverages LLMs to generate instance-generation programs in Python. These automatically generated Python programs are specific to the domain and desired instance subset, and tend to be efficient. The soundness of the generated instances is guaranteed through a prescribed post-processing procedure checking legality and subset constraints. Legality constraints are implemented once-per-domain by the user in the form of Python tests, supporting efficient checks. For subset constraints, we support declarative specification in first-order logic, facilitating easier changes and maintenance. Given these inputs, we prompt an LLM to generate an instance generator as a standalone Python module. We then go through a debugging loop to improve that module (loosely following ideas proposed for per-domain planner generation (Silver et al. 2024)). We test the instance generator for a large number of instances across multiple sizes, verifying whether these satisfy the constraints. The results are fed back to the LLM as part of a debug prompt, and the loop repeats. After several iterations, we return the generator that balances instance soundness with diversity (with the latter being inspired by Núñez-Molina, Mesejo, and Fernández-Olivares (2024, 2025)). At deployment time, the post-processing procedure guarantees that only sound instances are returned.

We show experimentally that our approach yields sound and diverse instance generators within minutes. Further, we show that the resulting instance generators can generate large numbers of instances much more efficiently than the approaches of Grundke, Helmert, and Röger (2025) and Núñez-Molina, Mesejo, and Fernández-Olivares (2024, 2025).

Moreover, we conduct a case study of instance generation for the purpose of evaluating generalized planning methods, which try to compute plans that generalize across all legal instances of a domain (Bonet, Frances, and Geffner 2019; Stählberg, Bonet, and Geffner 2022; Stählberg and Geffner 2026; Silver et al. 2024; Stein et al. 2026). Generalized plans tend to differ in their generalization capacity, in particular in the subset of instances they work well on. Our methodology permits, for the first time, to evaluate these aspects efficiently without excessive manual coding work or generator-learning. Our case study shows that interesting insights can be gained in this manner.

1 Background

We provide a brief overview of PDDL planning and related work on domain-independent instance generation.

PDDL Planning. The Planning Domain Definition Language (PDDL) is a lifted representation for planning problems, where problems consist of a domain DD and a problem instance II (Haslum et al. 2019). The domain DD defines a set of predicates P∈PP \in \mathcal{P} and a set of action schemas A∈AA \in \mathcal{A} that define arguments, preconditions, effects, and action costs. The instance II defines a set of objects o∈Oo \in \mathcal{O}, an initial state InitInit, and goal conditions G\mathcal{G}. By grounding the predicates and action schemas of DD with the objects in II, we get a problem ⟨S,s0,SG,Act,f⟩\langle \mathcal{S}, s_0, \mathcal{S}_\mathcal{G}, Act, f \rangle, which consists of a set of states s∈Ss \in \mathcal{S}, the initial state s0s_0, the set of goal states SG\mathcal{S}_\mathcal{G}, the sets of applicable ground actions for each state Act(s)Act(s), and the

transition function f:S×Act→Sf: \mathcal{S} \times Act \to \mathcal{S} (Ghallab, Nau, and Traverso 2004). A plan for an instance II is a sequence of ground actions a⃗=⟨a0,…,aT−1⟩\vec{a} = \langle a_0, \ldots, a_{T-1} \rangle that transitions from the initial state s0s_0 to a goal state sT∈SGs_T \in \mathcal{S}_\mathcal{G}.

Related Work. Grundke, Helmert, and Röger (2025) propose a domain-independent instance-generation approach that operates on formal specifications of PDDL domains, which use axioms to characterize legal initial states and goals. We refer to this approach as “Gr25”. Given a desired number of objects, Gr25 translates the formal domain specification into an answer set program (ASP) whose answer sets correspond to legal planning instances. An off-the-shelf ASP solver is then used to compute a set of answer sets, corresponding to legal instances.

The NeSIG approach by Núñez-Molina, Mesejo, and Fernández-Olivares (2024) formulates instance generation as a sequential decision-making problem and learns separate reinforcement-learning policies for constructing initial states and goals. At each step, a policy adds an object or fact to the partially generated instance or terminates the corresponding generation phase. During this process, user-provided consistency rules check whether the instance’s initial state is legal. NeSIG’s reward function encourages the policies to construct instances that are legal, diverse, and difficult. To compute the diversity, NeSIG computes a set of features for each constructed instance and then computes the distance between these feature vectors. To compute the difficulty, NeSIG runs a set of existing planners on the constructed problems and measures the number of expanded search nodes.

References (44)