How Coding Agents Solve Generalized Robot Task and Motion Planning

How Coding Agents Solve Generalized Robot Task and Motion Planning

Matteo Merler, Bowen Li, Josh Roy, Yichao Liang, Qianwei Wang +2 more

4 min read•Sep 26, 2026

Markov Decision Processes and Simulator Access

Each environment is represented by a Markov decision process (MDP) and a task description.

The task description specifies the objective that the robot must accomplish.

The initial-state distribution generates problem instances with varying object counts, configurations, and geometry. For example, in an object-retrieval task, instances may differ in the number and placement of obstacles surrounding the target object. The state and action spaces, transition model, and reward function are shared.

Synthesis and Evaluation

At evaluation time, the program is frozen and the synthesis method is no longer invoked. In particular, any coding agent or large language model used during learning is unavailable. The program is evaluated on initial states that were intentionally hidden during learning.

The hidden initial-state distribution supplies evaluation problems that were not available during synthesis.

The primary metric is success rate: the probability that the program reaches the goal within the specified horizon and a wall-clock limit of 60 seconds.

The horizon defines the maximum number of steps allowed before an evaluation instance ends.

Per-instance computation time is also measured. This includes time spent planning and deciding on actions, excluding synthesis and time spent advancing the evaluation environment.

Baselines

AgenticGenPlan is compared against task and motion planning (TAMP) planners that combine symbolic search with sampling to satisfy continuous constraints. The benchmarks provide planners for 16 of the 28 environments.

Official implementations are followed for the hand-written predicates, operators, samplers, and motion planners, or skills, used to generate feasible trajectories. These methods compute a new plan for each evaluation instance.

Synthesized robot planning strategies rendered across benchmark environments

Environment Setup

For each method, five independent runs are performed per environment. Each coding-agent and LLMGenPlan synthesis run has a budget of $20 in model usage.

The resulting programs and planners are evaluated on the same 100 instances per environment, sampled from the same initial-state distribution used during synthesis. Evaluation seeds are generated randomly to make it unlikely that agents test them during synthesis, and this is verified afterward by checking that none were used.

A timeout of 60 seconds per evaluation instance is used for all methods, matching the original KinDER protocol.

The evaluation timeout limits the wall-clock time available to solve each instance.

Agentic Synthesis of Robotic Programs

Since Code-as-Policies, large language models have demonstrated the ability to generate robot control code that integrates manipulation skills and perception interfaces. Later works such as GenCHiP and InstructFlow motivate code as a flexible policy representation while highlighting the importance of the supplied action interface and feedback.

In symbolic task planning, large language models and execution feedback have been used to synthesize reusable programs that solve new PDDL instances without further language-model calls.

Qualitative comparison of synthesized and evaluated robotic planning behavior

Discussion

Limitations

The setup assumes fully observed, object-centric states and simulator access during synthesis. It therefore does not establish performance under perception uncertainty.

The models’ training data are undisclosed, so prior exposure to benchmark code cannot be excluded. However, the synthesis logs show policies being developed through environment probing, testing, and substantial revision. Together with the unexpected strategies the agents synthesized, this provides evidence against simply recalling complete solutions seen during pretraining.

Conclusions

Coding agents are strong generalized TAMP planners, synthesizing reusable programs that outperform hand-engineered planners and existing large-language-model-based synthesis methods on the benchmarks.

These results extend the promise of large-language-model-based generalized planning to environments with geometric, kinematic, and dynamic constraints. Through interaction, agents can investigate the physical behavior of an environment and develop effective strategies without being supplied with its symbolic models, skills, or samplers.

This ability to discover both how an environment works and how to solve its tasks makes coding agents an important baseline for future TAMP research.

Acknowledgments

The authors thank Pietro Ferrazzi for feedback on a draft of the paper. This work was partially supported by a Princeton SEAS Innovation Grant, an NVIDIA Academic Grant Program, and a Princeton AI Lab Grant.

Frequently Asked Questions

What is AgenticGenPlan? AgenticGenPlan is a coding-agent approach for synthesizing reusable programs for generalized task and motion planning.

How is performance evaluated? Performance is primarily measured by the probability that a program reaches its goal within the allowed horizon and a 60-second wall-clock limit.

How many evaluation instances are used per environment? Each method is evaluated on the same 100 instances per environment.

What are the main limitations of the study? The setup assumes fully observed object-centric states and simulator access during synthesis, so it does not establish performance under perception uncertainty.