cs.AISep 30, 2026

Code to Control: Synthesizing Parameterized Reactive Controllers

Authors: Zergham Ahmed, Joshua B. Tenenbaum, Chris Bates, Samuel J. Gershman

Organizations: Harvard University · Massachusetts Institute of Technology · Florida Institute for Human and Machine Cognition

Abstract

Recent LLM-based approaches to control either invoke a language model to select actions or synthesize world models that require planning at every decision, introducing latency that can limit real-time use. We introduce Code to Control, an approach that synthesizes Python controllers which execute directly as policies. Code to Control separates program structure from parameters. An LLM synthesizes the controller structure, while derivative-free search fits its parameters for continuous control using feedback from the environment. Once learned, the resulting controllers require neither LLM inference nor planning at decision time, enabling real-time gameplay and, under our timing protocol, faster action selection than a PPO policy. Across a suite of Atari games, Flappy Bird, and MuJoCo tasks, Code to Control outperforms planning-based program synthesis methods, remains competitive with deep reinforcement learning while using fewer environment interactions, transfers across substantial changes in environment dynamics, and scales to complex locomotion tasks.

Figures & tables

Explore similar work

CardsList
  1. RHO: Your Coding Agent is Secretly a Roboticist

    Jun 15, 2026Karim Elmaaroufi, Justin Svegliato, Sarunas Kalade +3Coding AgentsProduction Agentic Systems

  2. PonderPounce: A Pretrained MLLM as an Episode Context Engine for Robot Control

    Aug 25, 2026Suhwan Choi, Jaeyoon Jung, Sungkyung Kim +2Multimodal Large Language ModelsCognitive Science

  3. GPC: Large-Scale Generative Pretraining for Transferable Motor Control

    Jun 28, 2026Yi Shi, Yifeng Jiang, Chen Tessler +1Human Motion GenerationFull-Body Humanoid Control