[Paper Review] Evolving LLM-Derived Control Policies for Residential EV Charging and Vehicle-to-Grid Energy Optimization
The paper presents a six-stage evolutionary pipeline where an LLM writes executable Python policies for residential EV charging/V2G, evaluated in EV2Gym-Residential, to balance profit, comfort, and safety with transparent, auditable code.
This research presents a novel application of Evolutionary Computation to the domain of residential electric vehicle (EV) energy management. While reinforcement learning (RL) achieves high performance in vehicle-to-grid (V2G) optimization, it typically produces opaque "black-box" neural networks that are difficult for consumers and regulators to audit. Addressing this interpretability gap, we propose a program search framework that leverages Large Language Models (LLMs) as intelligent mutation operators within an iterative prompt-evaluation-repair loop. Utilizing the high-fidelity EV2Gym simulation environment as a fitness function, the system undergoes successive refinement cycles to synthesize executable Python policies that balance profit maximization, user comfort, and physical safety constraints. We benchmark four prompting strategies: Imitation, Reasoning, Hybrid and Runtime, evaluating their ability to discover adaptive control logic. Results demonstrate that the Hybrid strategy produces concise, human-readable heuristics that achieve 118% of the baseline profit, effectively discovering complex behaviors like anticipatory arbitrage and hysteresis without explicit programming. This work establishes LLM-driven Evolutionary Computation as a practical approach for generating EV charging control policies that are transparent, inspectable, and suitable for real residential deployment.
Motivation & Objective
- Address interpretability gaps in RL-based V2G control by producing explicit, auditable control policies.
- Develop a six-stage pipeline where an LLM generates Python decision functions evaluated in a high-fidelity simulator.
- Benchmark prompting strategies (Reasoning, Imitation, Hybrid, Runtime) against a baseline heuristic.
- Demonstrate that LLM-derived policies can achieve competitive profit with interpretable code.
- Evaluate regulatory and practical deployment considerations for code-as-policies in residential energy systems.
Proposed method
- Create a compact input dataset of state–action examples and 24h price forecasts from ledgers.
- Instruct the LLM with guardrails to generate a Python function decide_power(...).
- Execute the generated policy in EV2Gym-Residential for multi-day rollouts.
- Collect quantitative rewards and counterexamples to guide iterative repair loops.
- Compare policies via profit, fidelity to baseline, and safety constraints.
- Analyze four prompting strategies (Imitation, Reasoning, Hybrid, Runtime) for effectiveness.
Experimental results
Research questions
- RQ1Can a Large Language Model generate and iteratively improve an explicit, interpretable control policy for residential V2G that adapts to dynamic conditions while respecting physical and user constraints?
- RQ2Do LLM-driven evolutionary policy synthesis approaches yield transparent, auditable solutions that match or exceed baseline heuristic performance in a high-fidelity V2G simulator?
Key findings
- Hybrid strategy achieved 118% of the baseline profit with concise, human-readable heuristics.
- Hybrid Iterative policy discovered anticipatory arbitrage using 24h price forecasts, improving profit beyond the baseline by 18%.
- Pure Reasoning struggled with calibration and missed arbitrage opportunities (29.9% deficit).
- Pure Imitation matched baseline behavior but showed limited innovation (76.6% of potential reward).
- Runtime LLM policy achieved the highest relative performance (190% of baseline) but with higher API cost.
- Evolved policies remained interpretable, with evolved code often being concise (e.g., 15 lines).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.