LIMEN: Co-Designing RL Observations and Rewards via LLM Evolution

Discovering Reinforcement Learning Interfaces with Large Language Models

Summary
Problem
Method
Results
Takeaways
Abstract

The paper introduces LIMEN (Learning Interfaces via MDP-guided EvolutioN), an evolutionary framework that utilizes Large Language Models (LLMs) to jointly discover reinforcement learning interfaces (comprising both observation mappings and reward functions) from raw simulator states. By evolving executable Python programs and refining them through policy training feedback, LIMEN achieves state-of-the-art results across gridworld and continuous control tasks (MuJoCo).

TL;DR

Researchers have released LIMEN, a framework that automates the "black art" of Reinforcement Learning (RL) interface design. Instead of human engineers spending weeks tuning reward functions and observation vectors, LIMEN uses LLMs (like Claude) and evolutionary algorithms to write Python code that defines exactly what an agent sees and how it is rewarded. The result? Superior performance across gridworlds and robotics, proving that the secret to better agents isn't just better algorithms, but better-defined problems.

Background: The Hidden Bottleneck of RL

In the typical RL workflow, we assume the environment gives us a useful state (e.g., coordinates) and a reward. However, the interface (Ï•, R) between the raw simulator and the agent is almost always hand-crafted.

  • Prior Work (like Eureka or Text2Reward) focused on evolving rewards but left observations fixed.
  • The Problem: If the observation space is a mess (e.g., a flattened 49-tile grid with no context), no amount of reward shaping can help the agent understand relational logic.

LIMEN posits that we must optimize both simultaneously.

Methodology: Evolution in Code Space

LIMEN treats it as a Bilevel Optimization problem:

  1. Outer Loop (Evolution): An LLM generates and mutates Python programs for get_observation() and compute_reward().
  2. Inner Loop (Learning): A PPO agent is trained from scratch using these programs to define its induced MDP.

The Framework

The system maintains a MAP-Elites archive, which ensures structural diversity. It doesn't just look for "high reward" interfaces; it looks for interfaces with different observation dimensions and code complexities.

LIMEN Architecture

Why it Works (The LLM Mutation)

The LLM acts as the "mutation operator." By providing the LLM with the task description, previous code attempts, and performance feedback (including error traces), the model iteratively discovers "Expert-level" strategies like:

  • Relative Coordinates: Calculating distances between entities rather than absolute positions.
  • Phase-Gated Rewards: Changing reward signals based on whether a robot is standing or has already picked up an object.

Experimental Battleground

The authors tested LIMEN on XLand-MiniGrid (reasoning) and MuJoCo (continuous control).

Key Results: The Necessity of Joint Search

The ablation results were a "wake-up call" for the community:

  • Observation-limited tasks: In gridworlds, reward-only optimization failed (19% success) because the agent couldn't "see" the relationships.
  • Reward-limited tasks: In robotics (Panda Tracking), observation-only search failed (0% success) because the task is too sparse for random exploration.
  • Joint Success: Only LIMEN (Joint) succeeded across all domains.

Performance Curves

Insights from the Archive

Interestingly, the evolved programs didn't just maximize scores; they rediscovered human-like engineering motifs:

  1. Normalization: The LLM learned to scale features to stable ranges automatically.
  2. Predictive Features: In MuJoCo tasks, the discovered observations included "projected future positions," allowing the policy to anticipate movement.
  3. Milestone Bonuses: Rewards were structured to lead the agent through a curriculum of sub-goals.

Critical Analysis & Future Outlook

Strengths:

  • Interpretability: Unlike neural encoders, LIMEN produces readable Python code that engineers can inspect or port.
  • Efficiency: Using JAX-based environments (XLand, MJX) allows evaluating 30 candidate interfaces in just a few GPU hours.

Limitations:

  • Simulator Access: It currently requires access to structured simulator state variables (privileged information).
  • Vision Tasks: It hasn't yet been tested on raw pixel inputs, which would require an additional perception layer.

Conclusion

LIMEN demonstrates that the "manual engineering" phase of RL is ripe for automation. By treating MDP design as a programmatic search problem, we can move closer to fully autonomous agents that not only solve tasks but also figure out the best way to interpret their own reality.


Takeaway: The co-design of observations and rewards is not just better—it's often the only way to prevent catastrophic learning failure in complex environments.

Find Similar Papers

Try Our Examples

  • Find recent papers exploring automated state representation or observation design in reinforcement learning using LLMs or evolutionary strategies.
  • What is the origin of the MAP-Elites algorithm, and how have subsequent works adapted Quality-Diversity search for program synthesis?
  • Search for research that applies joint optimization of reward and observation functions in multi-agent reinforcement learning (MARL) or high-dimensional vision-based tasks.
Contents
LIMEN: Co-Designing RL Observations and Rewards via LLM Evolution
1. TL;DR
2. Background: The Hidden Bottleneck of RL
3. Methodology: Evolution in Code Space
3.1. The Framework
3.2. Why it Works (The LLM Mutation)
4. Experimental Battleground
4.1. Key Results: The Necessity of Joint Search
5. Insights from the Archive
6. Critical Analysis & Future Outlook
7. Conclusion