PROC2PDDL: Open-Domain Planning Representations from Texts (2024)

Abstract: Planning in a text-based environment continues to be a significant challenge for AI systems. Recent approaches have utilized language models to predict planning domain definitions (e.g., PDDL) but have only been evaluated in closed-domain simulated environments. To address this, we present PROC2PDDL, the first dataset containing open-domain procedural texts paired with expert-annotated PDDL representations. Using this dataset, we evaluate the task of predicting domain actions (parameters, preconditions, and effects). We experiment with various large language models (LLMs) and prompting mechanisms, including a novel instruction inspired by the zone of proximal development (ZPD), which reconstructs the task as incremental basic skills. Our results demonstrate that PROC2PDDL is highly challenging for end-to-end LLMs, with GPT3.5’s success rate close to 0% and GPT-4o’s 38%. With ZPD instructions, GPT-4o’s success rate increases to 45%, outperforming regular chain-of-thought prompting’s 34%. Our analysis systematically examines both syntactic and semantic errors, providing insights into the strengths and weaknesses of language models in generating domain-specific programs.1

heading: 1 Introduction
text: Planning is the task of finding a sequence of actions to achieve a goal in a given environment (Fikes and Nilsson, 1971; LaValle, 2006). In real life, the environment is often described with natural language texts. To enable text-based, automated planning, recent work has used language models (LMs) to generate plans (Valmeekam et al., 2023a; Stein and Koller, 2023). However, this approach is found to fall short with regard to both performance and interpretability (Valmeekam et al., 2023c,b). Alternatively, another recent line of worked has instead
*Equal contribution. 1Our resources can be found at https://github.com/
zharry29/proc2pddl.
used LMs to translate the natural language description of environments to planning domain definition language (PDDL) (Ghallab et al., 1998). This symbolic representation can then be solved by a planner in a plan (Collins et al., 2022; Lyu et al., 2023; Liu et al., 2023; Xie et al., 2023; Wong et al., 2023). Despite of the success of such a neurosymbolic method, all the above work has only been evaluated in closed-domains simulated environments such as a household (e.g., ALFRED (Shridhar et al., 2020)) or discrete object placement (e.g., BlocksWorld (Valmeekam et al., 2024)) (as shown in Table 1).
To enable open-domain, text-based planning, we propose PROC2PDDL, a dataset to evaluate models’ ability to generate PDDL given procedural texts. PROC2PDDL consists of 27 pairs of open-domain procedures and PDDL representations. Each PDDL representation include a domain file DF that models the types, predicates, and actions, and a problem file PF that models the entities, initial states, and goal states, as illustrated in Figure 1. Because PROC2PDDL is not bound
1 13
to any simulation, the PDDL representations are manually annotated by experts trained on this task to ensure validity, resulting in 27 domain files and 95 problem files.
Using this dataset, we study the task of action modeling (Lindsay et al., 2017) formulated as follows. The input is some relevant natural language texts and the header of a DF (i.e., types, predicates, and names of actions). Based on a ZPD instruction, the output is the domain actions in the DF (i.e., parameters, preconditions, and effects). During evaluation, the predicted DF is 1) compared to a ground-truth DF as intrinsic evaluation, and 2) provided to a PDDL solver with ground-truth PFs for the existence and correctness of plans as extrinsic evaluation. Our system is delineated in Figure 2. In this formulation, our assumption of the DF header is necessary to ensure the consistency of semantics between the DF and the PF for evaluation. It is also empirically motivated; for example, a kitchen robot may have access to the types like ‘ingredients’ and predicates like ‘diced’ via some information extraction system given descriptive texts, but it may still need to predict, for “swinging a knife”, the precondition that it is only safe to do so to the ‘ingredients’ and the effect that they will become ‘diced’.
Through our experiment, we show that the task of action modeling in PROC2PDDL is highly challenging to state-of-the-art LMs, where GPT-3.5 almost fails completely, GPT-4 can only generate exactly matching DFs 16% of the time and solvable PFs 33% of the time, and GPT-4o demonstrate 18% DFs accuracy and 37% PFs solving rate. By devising a ZPD instruction that prompt LMs to modularly generate PDDL through extractioninference-translation approach, we improve action
accuracy by 3% and problem solving by 2-7% . In our analysis, the syntactic errors indicate LMs’ weakness in generating low-resource and domainspecific programming languages (Cassano et al., 2023) like PDDL, while the semantic errors suggest LMs’ inaccuracies to reason about actions and environments.

heading: 2 Task Formulation
text: The task of predicting a planning domain definition in a text-based environment can be seen as translating natural language texts to PDDL symbolic language, which consists of a domain file (DF) and one or more problem files (PFs). A DF defines all actions in the environment: • parameters (e.g., water, pot) as a list of typed
variables • preconditions (e.g., water and pot belongs to
player; water is not treated) as a conjunctive normal form of predicates • effect (e.g., water is treated) as a conjunctive normal form of predicates A PF defines the initial and goal environments:
2
• initial states (e.g., bucket is empty) • goal states (e.g., bucket is filled with rainwater;
rainwater is treated) We say that a DF and a PF can be solved if there exists a sequence of actions A1, . . . , An that results in a transition from the initial state to the goal state.
Traditionally, the task of text-based PDDL generation involves predicting PF based on text T, where a successfully generated PF can be solved by the predefined DF.
In this paper, we address an alternative formulation, action modeling (A), in which the generated DF, given text T and the domain header H2, is capable of producing plans for PFs.

heading: 3 Dataset
text: We introduce the PROC2PDDL dataset of 27 different T-DF-PFs tuples, drawing procedural texts from wikiHow articles of various topics (see Appendix A). A class of graduate students in a U.S. university with prior knowledge of PDDL are each given a wikiHow article and annotate a DF and multiple corresponding PFs from the article, each with a gold plan to solve it. On average, there are 13.33 defined actions in a DF and 8.07 instantiated actions in a gold plan. In this work, all our data is used for evaluation, as all our methods are without task specific model training. Some sample data of PROC2PDDL can be found in Appendix B.

heading: 4 Methodology
text: We first introduce a novel prompt design option, ZPD, and then discuss the choices of text format (T), which can range from 10 to 2,000 tokens and influence the selection of LMs.

heading: 4.1 ZPD Prompt Design
text: To predict domain actions A based on relevant T and the header H , we prompt an LM in zeroshot or few-shot instructions. Our instruction employs Zone of Proximal Development (ZPD) theory proposed for human learning (Vygotsky and Cole, 1978), which is a variant of the chain-ofthought (CoT) approach. In typical CoT, a task is decomposed into several constituents (steps), i.e., parameters, precondition, and effect. In contrast, according to ZPD, the complex PROC2PDDL task is decomposed into atomic skills: 1) extracting the
2The domain header includes types, predicates, and names of actions in DF. As the information specified by H is guaranteed to be consistent with that of the PFs, the evaluation is well-defined.
relevant description of an action; 2) extracting and inferring the incorporated entities and their state changes; and 3) translating the entity-state changes to accessible PDDL predicates. Next, we establish the relationships between these atomic skills: to perform the task, each skill is a prerequisite for the next. Finally, we explicitly instruct the LMs to incrementally perform the three basic skills, leading to the successful completion of the PROC2PDDL task (the prompt can be found in Appendix D): 1. Extraction: describe each action, including the
expected preconditions and effects; 2. Inference: list the involved entities and their
state changes; 3. Translation: based on the information above,
convert T to PDDL.

heading: 4.2 Choice of Input Text
text: We also consider the following choices of wikiHow text as T.
Prompt without text (w/o T) is an ablation baseline where the model predicts A solely based on H . Naturally, none of the three aforementioned stages are involved in this prompt condition.
3
Prompt with text (w/ T) additionally provides the model with four different portions of T, involving the three aforementioned stages, as follows: (T = all): All steps in a wikiHow article. (T = rel): In PROC2PDDL, each wikiHow article consists of step paragraphs that may or may not be used in defining the actions in the DF. Hence, a mapping between actions and steps is also annotated. This context includes relevant steps to all actions in a DF. (e.g., Step 1. Find fresh water... Step 2. Collect food... Step 7. Set up camp...) (T = map): Each action is mapped with steps based on the annotated mapping in PROC2PDDL. (e.g., clean_water: Step 1. Find fresh water...) (T = sum): An one-line summary of each action annotated in PROC2PDDL. (e.g., clean_water; boil water to clean it) The four prompts are increasingly general. Distinguishing from the required skills, the full text condition demands accurate information extraction, while the text summary clearly defines the action but requires the model’s robust ability to infer implicit entity states. All prompts request an exact translation.

heading: 4.3 Experiments
text: We conducted experiments with three large language models3: GPT-3.5-turbo-16k, GPT-4-32k (dated June 2023), and GPT-4o. For GPT-4-32k, we used a maximum token limit of 10,000. GPT3.5-turbo-16k and GPT-4o were tested with theirs default hyperparameters. The few-shot examples can be found in Appendix C.
3Due to the need for very long input and output, the choice of open-source models is limited. We are in progress of implementing Mixtral-8x7B.

heading: 5 Evaluation and Analysis
text: Now that a model generates the parameters, preconditions, and effects for each action, we have a complete DF. We evaluate it in two ways (Figure 2). Intrinsically, we semantically compare the predicted A with the ground-truth provided by our PROC2PDDL and report an action-wide accuracy. Equivalence of two action definitions does not depend on the naming of variables nor on the order within conjunctions (detailed in Appendix E). Extrinsically, to measure actions’ coherence, a BFSbased PDDL solver4 attempts to solve ground-truth PFs with the predicted DF and a success rate is reported. An unsolved PF is caused by (1.) no plan can be found, or (2.) the solver runs for more than 30 seconds, or (3.) the solver returns an error (usually a syntax error in the generated PDDL).
The intrinsic and extrinsic results are shown in Table 2. gpt-3.5-turbo which achieves impressive performance on many tasks has a close-to-zero performance. In contrast, gpt-4 performs significantly better with 18% action prediction accuracy and 36% solve rate of PFs. The most advanced gpt-4o presents the highest performance, with 21% action accuracy and 45% PFs solving rate. Still, the performance is far worse than ideal, showing that even a simplified open-domain planning formulation is challenging to state-of-the-art LMs.
ZPD Instruction Analysis ZPD is helpful in each setting since it explicitly spells out many implicit entities and state changes in the inference stage which are critical to predicting parameters. In most situations, the model summarizes the action and extracts the entity states correctly, though sometimes missing a few implicit entities. However, ZPD’s bottleneck lies in the translation stage, during which there are mainly three types of errors. 1. mismatched predicates: the model uses (at
?loc ?item) instead of (inventory ?item); 2. hallucinated predicates: the model creates a new
predicate (soaked ?item) while neglecting the existing (submerged ?item); 3. complicated predicates: the model adds unnecessary predicates (inventory ?submerged_item - item) when already has (inventory ?item).
4https://github.com/pucrs-automated-planning/ pddl-parser
4
To address these, we leave to future work to demonstrate and standardize the translation process by clearly describing all necessary entity-state change and encouraging the model to compare and strictly match the given predicates. Finer-grained evaluation results are shown in Table 3 to tease out the performance regarding such component within an action. It is clear that the LM is worse at predicting preconditions than at predicting effects. This is understandable as procedural texts like wikiHow tend to be less explicit about predictions than about effects (e.g., from ‘bake for 10 minutes’ it is obvious that the food will be baked, but it is unclear what state it had been in).
Text Format Analysis As shown in Table 4, in w/o T setting, fully relying on its implicit knowledge, the model is already capable of inferring PDDL syntactically and semantically. In w/ T settings, our model shows an ‘U’ performance in terms of the text length. Using a sentence-long description for each action (T = sum) provided by PROC2PDDL, the model achieves the best performance among all, showing a strong deduction ability with the limited but precise NL input. The T = all setting ensues, which requires the most extraction rather than inference. In contrast, the middle ones (T = rel/map) with decreasing signal-to-noise ratio lead to worse results, indicating its shortage of extraction-inference trade-off. The signals contain both the described entity states and step relations, explicitly and implicitly. This shortage may come less from the entity states (e.g., fish, spear in hunt_fish), but more from the relation between actions (e.g., make_spear to hunt_fish) which may be expressed in the T = sum and all settings.
Case Analysis To provide deeper insights into model performance, we manually inspect the model output of gpt-4 on all 6 examples (15 PFs) in the development set. We consider the following scenarios. Unsolved Whenever the predicted DF cannot
solve a PF, either a syntactic or a semantic error has occurred. For a syntactic error, the output may contain illegal expressions that cannot be parsed. For example, (inventory ?player (clean ?strips)) is unacceptable because the arguments to a predicate must be atomic types, not another predicate. For a semantic error (namely, a ‘bad action’), we identify the first problematic action that differs with the ground-truth. For example, if the action cut_plant misses a critical effect of (inventory ?player ?stalk), then other actions such as graft_stalk requiring it cannot be executed. At times, there could be false negatives where the predicted action definitions are in fact reasonable but still cannot lead to a solution (namely, a ‘good action’).
Solved Even when the predicted DF solves a PF, the plan may be different from the gold plan. It is naturally possible that the predicted plan is a fluke made possible by under-specified preconditions or over-exaggerated effects, as well as loopholes in the PF leading to unreasonable shortcuts. For the example in Figure 1, a model could cheat by defining the action get by not requiring the person and object to be in the same location; thus, the predicted plan would unreasonably omit the action go. However, at times, the predicted plan could also be a reasonable alternative.
The statistics of these errors are shown in Table 5. When no solution can be found, true negative is highly likely as the model indeed makes aforementioned mistakes during action prediction. When some solution is found, false positive is still possible as the predicted plan may be unreasonable. See attached materials for a complete error analysis of these examples. Our aforementioned future pipeline that separates summarization and translation would likely mitigate these errors.

heading: 6 Conclusion
text: We present PROC2PDDL, the first open-domain dataset that juxtaposes natural language and planning domain definition language. Our experiments show that ZPD instructions facilitate LMs’ performance, while still find it challenging to translate the precondition and effects of actions. We hope our instruction design, evaluations and dataset help future progress towards integrating the best of LM and formal planning.
5

heading: 7 Limitations
text: Any planning language, including PDDL which we consider in this work, is an approximation of planning in the real world and cannot accurately reflect its complexity. Due to the consideration for simplicity in the annotation process, we use the primitive version of PDDLs, with restricted expressions and syntax, instead of newer versions of the planning language which extend its syntax in a variety of way.
Annotating PROC2PDDL is extremely costly as it requires knowledge of PDDL and much effort to translate procedural texts to PDDL. Thus, our dataset is relatively small with a limited range of topics. Due to the highly complex and subjective nature of the annotation process, each annotated example may reflect idiosyncratic though processes and biases of the individual annotator.
As with many similar works, there is a known gap between high-level planning such as ours (with high-level actions like “boil”) and the actions used by present-day robots (with low-level motor functions like “move”). However, like similar works, we believe our efforts can see more practical application in the near future.
Our modeling efforts so far have mainly considered options of zero-shot prompting. There of course exists many other approaches including the few-shot setting, fine-tuning, and the model distillaion paradigm, which we plan to experiment with in the future. Moreover, our evaluation is imperfect in that even a well-annotated DF-PF pair might have multiple successful plans. Manual inspection is still necessary to accurately gauge models.

heading: Acknowledgements
text: This research is supported in part by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via the HIATUS Program contract #2022-22072200005. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.

heading: A Topics
text: Below are a list of the titles of wikiHow articles in PROC2PDDL, chosen per the requirement of a gruaduate-level university class.
• create secret society • throw an anime party
• open a coconut • calculate pi • hack • get out of quicksand • make a detective kit • lock picking • make papyrus • survive on a desert island • survive in the jungle • survive a war • survive a comet hitting earth • survive a nuclear attack • survive in the woods • survive deserted island • survive shark attack • survive emp attack
Each topic may have one or more annotated DFs representing different domains. The homogeneity of the last 7 topics is due to the class’ topic of interactive fictions.
B Sample Data: T, DF, and PF
To exemplify PROC2PDDL, below is an example procedural text T titled ‘survive in the jungle‘, up to the third step, truncating the rest. 1. Collect rainfall from leaves and bamboo
stalks. Look for large leaves that collect rainfall and bend them into a funnel to pour the water into a bottle or straight into your mouth. Bend bamboo stalks to let the water that collects in the compartments flow out into a container or break the bamboo compartment off at the line that goes across the stalk to use it as a water bottle. You could also look for rock formations that form natural pools and collect rainwater, but it is best to do this after a fresh rainfall to avoid pools that have been sitting for a long time and may be contaminated with bacteria. If you don't have a water bottle or other container to collect water, try to find other natural containers in the jungle such as a coconut shell or piece of wood shaped like a bowl. You can also leave these items out when it rains to collect the fresh water.
2. Boil water from streams to kill any bacteria. Look for running streams to find fresh water. Filter out any particles through a sock, shirt, or other fabric, then start a fire and boil the water to kill bacteria that can make you sick. If you don't have a pot to boil water in, then you can use a tin can, single-walled stainless steel water bottle, or any other metal container. If you have no way of making a fire or boiling the water, then you should avoid drinking water from streams. It can be contaminated with many types of bacteria from animals that will make you very sick. Always avoid
7
drinking water from stagnant pools as the water is likely contaminated.
3. Make a solar water still with a container and a plastic sheet. Dig a hole in an area that receives at least some direct sunlight and
put a container, such as a water bottle or can, in the middle of the hole. Fill the space between the sides of the hole and the container with wet leaves. Place a plastic sheet over the top of the hole and put rocks or other heavy objects around the edges to hold it in place. Put a small stone in the middle of the sheet above the container. The plastic sheet will accumulate condensation that will drip down the underside of the sheet and into the container. This water is distilled and safe to drink. You can use natural containers such as bamboo or a coconut shell if you don't have a bottle or can. A solar still does not collect large amounts of water. It should be used as a supplemental source of water rather than a primary source.
......
Below is a sample annotated DF of the above: (define (domain survive_in_the_jungle)
(:requirements :strips :typing) (:types
stone wood bamboo_container water fire sos_sign fruit - item basecamp - location ill dehydrated hungry - condition player direction
)
(:predicates (has_bamboo ?loc - location) ; this
location has bamboo to create a container
(has_rainfall ?loc - location) ; this location has received rainfall to collect water (has_fruit ?loc - location) ; this location has fruits to pick (treated ?water - water) ; True if the water has been decontaimated by boiling it (is ?c - condition ?p - player) ; True if the player is under the specified condition (at ?obj - object ?loc - location) ; an object is at a location (inventory ?player ?item) ; an item is in the player's inventory (connected ?loc1 - location ?dir - direction ?loc2 - location) ; location 1 is connected to location 2 in the
direction (blocked ?loc1 - location ?dir - direction
?loc2 - location) ; the connection between location 1 and 2 in currently blocked
)
(:action go ; navigate to an adjacent location
:parameters (?dir - direction ?p - player ? l1 - location ?l2 - location) :precondition (and (at ?p ?l1) (connected ? l1 ?dir ?l2) (not (blocked ?l1 ?dir ? l2)))
:effect (and (at ?p ?l2) (not (at ?p ?l1))) )
(:action get ; pick up an item and put it in the inventory
:parameters (?item - item ?p - player ?l1 - location) :precondition (and (at ?p ?l1) (at ?item ? l1)) :effect (and (inventory ?p ?item) (not (at ?item ?l1)))
)
(:action get_bamboo_container; get a bamboo container using surrounding bamboo
:parameters (?p - player ?loc - location) :precondition (and (at ?p ?loc) (has_bamboo ?loc)) :effect (inventory ?p bamboo_container)
)
(:action collect_rain_water :parameters (?p - player ?loc - location) :precondition (and (at ?p ?loc) (inventory
?p bamboo_container) (has_rainfall ? loc)) :effect (and (inventory ?p water) (not ( treated water)))
)
(:action create_fire :parameters (?p - player ?loc - location) :precondition (and (at ?p ?loc) (inventory
?p stone) (inventory ?p wood)) :effect (and (at fire ?loc) (not (inventory
?p stone)) (not (inventory ?p wood))) )
(:action treat_water :parameters (?p - player ?loc - location) :precondition (and (inventory ?p water) (
not (treated water)) (at fire ?loc)) :effect (and (treated water))
)
(:action drink_water :parameters (?p - player) :precondition (and (inventory ?p water) (
treated water)) :effect (not (is dehydrated ?p))
)
(:action drink_untreated_water :parameters (?p - player) :precondition (and (inventory ?p water) (
not (treated water))) :effect (is ill ?p)
)
(:action create_sos_sign :parameters (?p - player) :precondition (and (inventory ?p stone) (at
?p basecamp)) :effect (and (not (inventory ?p stone)) (at
sos_sign basecamp))
8
) (:action pick_fruit :parameters (?p - player ?loc - location) :precondition (and (at ?p ?loc) (has_fruit
?loc)) :effect (inventory ?p fruit)
)
(:action eat_fruit :parameters (?p - player) :precondition (and (is hungry ?p) (
inventory ?p fruit)) :effect (and (not (inventory ?p fruit)) (
not (is hungry ?p))) )
(:action escape :parameters (?p - player) :precondition (and (at ?p basecamp) (at
sos_sign basecamp) (not (is hungry ?p)) (not (is dehydrated ?p)) (not (is ill ?p)))
:effect (not (at ?p basecamp)) )
)
Below is an annotated PF of the above: (define (problem escape)
(:domain survive_in_the_jungle)
(:objects npc - player jungle bamboo_forrest basecamp - location in out north south east west up down -
direction stone wood sos_sign - item ill dehydrated hungry - condition
)
(:init (at npc basecamp) (connected basecamp west bamboo_forrest) (connected bamboo_forrest east basecamp) (connected basecamp east jungle) (connected jungle west basecamp)
(has_bamboo bamboo_forrest) (has_fruit jungle) (has_rainfall jungle)
(at stone bamboo_forrest) (at stone basecamp) (at wood jungle)
(is dehydrated npc) (is hungry npc)
)
(:goal (and (not (at npc basecamp)) (not (at npc bamboo_forrest)) (not (at npc jungle) ) ))
)

heading: C Few-shot Examples
text: Example 1: action: slide_straw_over_skewer
text: Slide a segment of plastic straw over the 2 skewers. Cut a segment of a plastic straw that is equal to the width between the wheel wells on your car. Then, slide it onto 1 of the skewers that's attached to a wheel. Do the same with the other skewer.
pddl_action: (:action slide_straw_over_skewer :parameters (?straw1 - straw ?straw2 - straw ?
skewer1 - skewer ?skewer2 - skewer ?wheel1 - wheel ?wheel2 - wheel)
:precondition (and (attached ?skewer1 ?wheel1) (attached ?skewer2 ?wheel2) (equal_width ?straw1 ?skewer1) (equal_width ?straw2 ?skewer2)) :effect (and (over ?straw1 ?skewer1) (over ?straw2 ?skewer2)))
entity_state_inference: - action name: slide_straw_over_skewer - summarize action: The action involves cutting
a segment of a plastic straw and sliding it over two skewers attached to wheels. The straw segments should be equal to the width between the wheel wells on a car. - what is needed to do the action: A segment of a plastic straw, two skewers attached to wheels.
- what is the result: The straw segments are slid over the skewers, which helps in maintaining the structure of the car and providing stability to the wheels.
- entities: - entity name: plastic straw segment - before: Not cut and not on skewers - after: Cut and slid onto skewers - entity name: skewer - before: Without straw segments - after: With straw segments slid onto them - entity name: wheel - before: Attached to skewers, without straw
segments on the skewers - after: Attached to skewers, with straw
segments on the skewers
Example 2: action: mix_sand_with_color
text: Close the bags tightly, then shake and squeeze them to mix the sand. Zip the bags shut tightly first. Next, shake the bags to help distribute the food coloring. You can also gently squeeze and massage the sand through the bags. Keep doing this until the color is even. Add more food coloring if the color is too light for you. Keep in mind that the sand will dry lighter.
pddl_action: (:action mix_sand_with_color :parameters (?bag - bag ?sand - sand ?color -
food_coloring) :precondition (and (sealed ?bag) (contains ?bag
?sand) (contains ?bag ?color) (not (
9
evenly_colored ?sand))) :effect (evenly_colored ?sand))''',
entity_state_inference: - action name: mix_sand_with_color - summarize action: This action involves mixing
colored sand by sealing bags containing sand and food coloring, then shaking, squeezing, and massaging the bags until the sand color is evenly distributed. More food coloring may be added if the color is too light, with the understanding that the sand will dry
lighter. - what is needed to do the action: Sealed bags
containing sand and food coloring, ability to shake and squeeze the bags. - what is the result: The sand inside the bags is evenly colored.
- entities: - entity name: bags - before: contains uncolored or unevenly
colored sand and food coloring - after: contains evenly colored sand - entity name: sand - before: uncolored or unevenly colored - after: evenly colored - entity name: food_coloring - before: present in the bags - after: mixed evenly with the sand
Example 3: action: melt_wax
text: Melt candle wax flakes or cubes in a double boiler. Set a can, jar, or another heat-proof container in a pot, and place your solid candle wax (soy or paraffin are most common) inside. Surround the container with water, filling the pot about halfway up the container, then heat the pot on medium
heat to double boil the wax to melt it completely, stirring every minute or so to make sure it melts evenly.
pddl_action: (:action melt_wax :parameters (?wax ?container ?pot ?heat_source
?water) :precondition (and (solid ?wax) (in ?wax ?
container) (heatproof ?container) (in ? container ?pot) (in ?water ?pot) (cold ? water)) :effect (and (liquid ?wax) (heated ?water)))
entity_state_inference: - action name: melt_wax - summarize action: This action involves melting
solid candle wax using a double boiler method. The solid wax is placed in a heatproof container, which is then placed in a pot filled with water. The pot is heated, and the wax is stirred until it melts completely.
- what is needed to do the action: The action requires solid wax, a heat-proof container, a pot, water, and a heat source. - what is the result: The solid wax is melted into liquid wax.
- entities: - entity name: wax - before: solid - after: liquid - entity name: container - before: empty or containing solid wax - after: containing liquid wax - entity name: pot - before: empty or containing water and
container with solid wax - after: containing water and container with
liquid wax - entity name: water - before: cold or room temperature - after: heated - entity name: heat_source - before: off - after: on

heading: D Prompts
text: For reproducibility, we provide the verbatim prompts that we used in the above experiments.
D.1 Prompt without ZPD Could you fill out the below PDDL actions with the predicates based on the text? All fields: parameters, precondition and effect, should have predicates. For each action, do NOT change the name and do NOT drop the action and do NOT add more actions. The output should be in correct PDDL format.
<wikiHow text and domain header>
here are the actions I want: <insert_action_names> here are the types I have: <insert_types> here are the predicates I have: <insert_predicates> here are the texts containing steps to <insert_goal>: <insert_text>
Example Completion: (:action clean_water
:parameters (?player - human ?water - water) :precondition (inventory ?player ?water) :effect (treated ?water)
)
D.2 Prompt with ZPD Could you fill out the below PDDL actions with the predicates based on the text? All fields: parameters, precondition and effect, should have
10
predicates. For each action, do NOT change the name and do NOT drop the action and do NOT add more actions and: First, summarize the action in a few sentences based on the text and provide its requirements and its aims if it has. Next, identify ALL the entities involved in the action and describe whether it changed, unchanged, added, removed in the action in natural language. Last, translate it into PDDL format. Check all the related entities are in the ’parameters’.
Please use this output format: - action name: ... - summarize action: ... - what is needed to do the action: ... - what is the result: ...
- entities: - entity name: ... - before: ... - after: ...
- describe how to match it to relevant predicates step by step: 1. ... 2. ...
<wikiHow text and domain header>
here are the actions I want: <insert_action_names>
here are the types I have: <insert_types>
here are the predicates I have: <insert_predicates>
here are the texts containing steps to <insert_goal>: <insert_text>
Example Completion: - action name: clean_water - summarize action: The player cleans water in their inventory using heat from a fire. - what is needed to do the action: The player must have untreated water in their inventory and be at a location with fire. - what is the result: The player has treated water in their inventory.
- entities: - entity name: player - before: Having untreated water in inventory. - after: Having treated water in inventory. - entity name: water - before: Untreated. - after: Treated.
- describe how to match it to pddl relevant predicates step by step: 1. Check if the player has untreated water in their inventory. 2. Check if the player is at a location with a fire. 3. Replace untreated water with treated water in the player’s inventory in the effect.
PDDL: (:action clean_water
:parameters (?player - human ?loc - location ?water - water)
:precondition (and (at ?player ?loc) (inventory ?player ?water) (not (treated ?water)) (has_fire ?loc))
:effect (treated ?water) )

heading: E Calculating Actions Equivalence
text: The distance between two actions can be divided to two parts:
1. The distance between parameters:
We do not need to consider the specific parameter names; we only need to consider the parameter types. For each parameter in Action1, we iterate over the parameter list of Action2 to find the first parameter in Action2 with the same type. We use two hash maps, p1 and p2, to record these two parameters and their corresponding types. We increment the counter by 1, remove that parameter from the parameter list of Action2, and break from the current loop. After the iteration, we obtain the number of matching parameters, n. The distance between parameters can be calculated as |number of parameters in Action1 − n|+ |number of parameters in Action2 − n|.
2. The distance between preconditions/effects:
For each condition in Action1, we iterate over the condition list of Action2. The conditions can only match if they have the same predicate and
11
the same number of parameters. We iterate over the parameters in these conditions and make the following judgments:
• If neither of the two current parameters has appeared before (in p1 and p2) and these parameters are not identical, they don’t match.
• If the two parameters have different categories, they don’t match.
• If the two parameters have the same categories and don’t have an index, we consider them as the same parameter entity and give them the same index. We continue the iteration.
• If the two parameters already have indexes, we check if the indexes are equal. If they are not equal, they don’t match. Otherwise, we continue the iteration.
• In any other case, they don’t match.
If all parameters of the two conditions match, we increment n by 1. The distance between preconditions/effects can be calculated as |number of preconditions/effects in Action1 − n|+|number of preconditions/effects in Action2− n|.
12

heading: Future Work
text: However, like similar works, we believe our efforts can see more practical application in the near future. Our modeling efforts so far have mainly considered options of zero-shot prompting. There of course exists many other approaches including the few-shot setting, fine-tuning, and the model distillaion paradigm, which we plan to experiment with in the future. Moreover, our evaluation is imperfect in that even a well-annotated DF-PF pair might have multiple successful plans. Manual inspection is still necessary to accurately gauge models