GA-Agent Uses LLM Agents to Tune Genetic Algorithms for PID Control
GA-Agent: Large Language Models as Hyperparameter Optimizers for Evolutionary Controller Synthesis
The key insight is architectural: letting an LLM handle semantic meta-reasoning while a GA handles dense numerical search removes the manual configuration bottleneck in controller tuning. Control engineers and robotics practitioners can apply the pattern to their own optimization pipelines without expensive bilevel search. Running on a compact memory buffer and a low-cost model at roughly $0.002 per run also makes the approach practical for iterative lab or industrial deployment.
Researchers propose GA-Agent, a system that pairs a genetic algorithm (GA) for PID gain optimization with an LLM agent that configures GA meta-parameters such as population size, generation budget, gain bounds and fitness weights. The LLM agent observes completed GA runs, diagnoses gaps against user control objectives and updates configurations using structured memory, quantitative goal translation and resource-aware termination. In eight control case studies spanning DC motor, inverted pendulum, aircraft pitch and autonomous underwater vehicle dynamics, GA-Agent achieved 100% success and outperformed a Regular GA with fixed hyperparameters. It matched or surpassed a Cascade-GA baseline while cutting function evaluations by one to two orders of magnitude, typically converging in one to three attempts. A compact memory buffer of size 2-3 with a cost-effective model such as DeepSeek-V4-Flash at about $0.002 per run delivered superior performance.
GA-Agent: Large Language Models as Hyperparameter Optimizers for Evolutionary Controller Synthesis
Tuning PID controllers to satisfy competing objectives - low tracking error, fast settling, limited overshoot, and moderate control effort - is labor-intensive and requires expertise. Genetic algorithms (GAs) offer gradient-free optimization of controller gains against a weighted fitness function, but success depends on meta-level choices: population size, generation budget, gain bounds, and fitness weights. These are usually set by manual trial-and-error or costly bilevel optimization, exposing a tension: GAs excel at dense numerical search, but configuring them needs high-level, context-dependent semantic reasoning. We propose GA-Agent, which decouples these modes. A standard GA handles low-level PID gain optimization. A large language model (LLM) agent operates at the meta-level: it observes completed GA runs, diagnoses gaps versus user control objectives, and proposes updated GA configurations. The architecture uses structured memory, quantitative goal translation, resource-aware termination, and outcome-driven routing. We evaluate GA-Agent on eight control case studies with diverse dynamics (DC motor, inverted pendulum, aircraft pitch, autonomous underwater vehicle, and others). GA-Agent achieves 100% success on all benchmarks, outperforming a Regular GA with fixed hyperparameters in solution quality and sample efficiency. It matches or surpasses a Cascade-GA baseline while reducing function evaluations by one to two orders of magnitude, typically converging in one to three optimization attempts. Sensitivity analysis shows robustness across LLM backbones and memory configurations. A compact memory buffer (size 2-3) and cost-effective models (DeepSeek-V4-Flash at about $0.002 per run) achieve superior performance.