Code to Control: Synthesizing Parameterized Reactive Controllers
cs.AI, cs.LG
Submitted: 2026-09-30
Updated: 2026-09-30
Comments: 17 pages. Code: https://github.com/ZerghamAhmed/code-to-control
Code: https://github.com/ZerghamAhmed/code-to-control
Project page: https://zerghamahmed.github.io/code-to-control
License: http://creativecommons.org/licenses/by/4.0/
The gist: 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
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.
Sources
- Learning Abstractions for Hierarchical Planning in Program-Synthesis Agents
- Evolution Strategies as a Scalable Alternative to Reinforcement Learning
- Proximal Policy Optimization Algorithms
- Voyager: An Open-Ended Embodied Agent with Large Language Models
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems