REvolve: Reward Evolution with Large Language Models for Autonomous Driving

Rishi Hazra, Alkis Sygkounas, Andreas Persson, Amy Loutfi, Pedro Zuidberg Dos Martires · DOI

Abstract

Designing effective reward functions for reinforcement learning (RL) remains a significant challenge, often requiring tedious manual tuning or resulting in "reward hacking." We present REvolve, an evolutionary framework that leverages Large Language Models (LLMs) as intelligent genetic operators to automate reward design. By integrating population-based evolution with pairwise human feedback, REvolve translates subjective human preferences into interpretable Python code. Our results across autonomous driving and robotic manipulation tasks demonstrate that REvolve outperforms both expert-crafted rewards and state-of-the-art automated baselines, achieving near-human performance in complex driving scenarios.

Introduction

In Reinforcement Learning, the reward function serves as the primary specification of desired behavior. However, translating high-level human intuition—such as "drive smoothly"—into a precise mathematical formula is notoriously difficult. Traditional approaches like Reinforcement Learning from Human Feedback (RLHF) typically produce opaque, "black-box" reward models. Recent LLM-based methods like Eureka offer improvements but often suffer from greedy search limitations, discarding potentially valuable reward components too early.

The REvolve Framework

REvolve addresses these limitations by treating reward design as an evolutionary search problem. The framework consists of several key components that bridge the gap between human intuition and executable code.

The REvolve system pipeline, integrating an abstracted environment, LLM-driven reward evolution, policy training, and a human feedback interface.

LLMs as Genetic Operators

Instead of traditional random mutations, REvolve utilizes GPT-4 to perform "intelligent" mutation and crossover operations. The LLM analyzes existing Python reward functions alongside performance data and natural language human feedback to generate improved iterations.

Island Model and Human-in-the-Loop

To maintain genetic diversity, REvolve employs an "Island Model," where multiple sub-populations evolve independently with periodic migration. Fitness is determined through a human-in-the-loop process: users compare pairs of agent rollouts and provide both a preference (converted to Elo ratings) and qualitative feedback (e.g., "the steering is too jerky"). This feedback directly informs the LLM's next generation of reward functions.

Experimental Evaluation

We evaluated REvolve in three challenging simulation environments:

  1. AirSim (Autonomous Driving): Navigating urban environments while maintaining speed and avoiding collisions.
  2. MuJoCo Humanoid: Bipedal locomotion requiring balance.
  3. MuJoCo Adroit Hand: Dexterous manipulation of a door latch.

The framework was also tested for generalization in unseen driving environments with varying traffic patterns and landscapes.

Results and Key Insights

REvolve consistently outperformed expert-designed rewards and the previous state-of-the-art, Eureka. In the AirSim driving task, REvolve achieved an Elo score of 1575, nearly matching a human expert driver (1586) and significantly exceeding the expert-designed baseline (1397).

Example of evolved reward functions produced by REvolve, showing interpretable Python code for speed and collision components.

Interpretable Alignment

A major advantage of REvolve is the production of executable Python code rather than a neural reward model. This transparency allows for human auditing and manual refinement, which is critical for safety-sensitive applications like autonomous driving.

Data Efficiency and Generalization

REvolve demonstrated remarkable data efficiency, achieving superior results with only 1,400 human-curated samples over seven generations. Furthermore, rewards evolved in one environment transferred successfully to unseen maps, indicating that the LLM captured the fundamental principles of the task rather than over-fitting to specific environmental features.

Conclusion

REvolve represents a significant step toward aligning RL agents with human values through interpretable code. By combining the "common sense" priors of LLMs with the robustness of evolutionary search and human feedback, the framework automates the most difficult aspect of RL. Future work will focus on reducing the computational cost of training policies for every candidate and exploring the transfer of evolved rewards to physical robotic hardware.

Summary updated

BibTeX
@inproceedings{hazra2025revolve,
  author = {Rishi Hazra and Alkis Sygkounas and Andreas Persson and Amy Loutfi and Pedro Zuidberg Dos Martires},
  title = {{REvolve: Reward Evolution with Large Language Models for Autonomous Driving}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=cJPUpL8mOw},
}
Figure