← all repositories
eureka-research/Eureka

LLM-generated reward code beats human experts at robot training

Eureka exists to automate the tedious work of RL reward engineering by using GPT-4 to generate and evolve Python reward code that often surpasses human designs.

Eureka
Not currently ranked — collecting fresh signals.
star history

What it does

Eureka is a research framework that treats reward-function design as a coding problem for large language models. Given a reinforcement-learning environment, it prompts an LLM—typically GPT-4—to generate Python reward functions, evaluates them through RL training, and feeds the results back to the model for in-context improvement across multiple evolutionary iterations. The resulting rewards train policies for complex low-level manipulation tasks, such as dexterous pen spinning with a simulated Shadow Hand.

The interesting bit

The twist is that Eureka needs no task-specific prompt engineering or pre-defined reward templates; the LLM writes raw reward code from scratch and iteratively mutates it based on execution feedback, creating a gradient-free optimization loop over code. The authors report that this automated approach outperforms expert human-engineered rewards on 83% of 29 tested tasks, averaging a 52% normalized improvement—suggesting that LLMs may be better incentive designers than we are for certain robotics problems.

Key highlights

  • Outperforms human expert reward design on 83% of 29 diverse RL environments spanning 10 robot morphologies, per the README.
  • Demonstrates simulated five-finger Shadow Hand performing pen-spinning tricks at human speed using curriculum learning with generated rewards.
  • Supports a gradient-free approach to RLHF, allowing human oversight to steer reward quality and safety without retraining the underlying LLM.
  • Built on top of IsaacGym and rl_games; outputs are standard Python reward functions compatible with existing RL pipelines.
  • Requires an OpenAI API key and is strictly for research purposes, not an official NVIDIA product.

Caveats

  • Tightly coupled to the IsaacGym ecosystem; adapting it to other simulators requires manual environment setup and pruning scripts.
  • Currently hard-dependent on the OpenAI API for LLM queries, with no apparent support for local or alternative model backends.
  • The released pen-spinning demo uses the default Isaac Gym renderer, which differs from the Omniverse rendering shown in the paper videos.

Verdict

Robotics and RL researchers who dread hand-tuning reward functions should take a look; practitioners seeking a plug-and-play, simulator-agnostic training tool will likely find the IsaacGym lock-in and OpenAI API dependency limiting.

Frequently asked

What is eureka-research/Eureka?
Eureka exists to automate the tedious work of RL reward engineering by using GPT-4 to generate and evolve Python reward code that often surpasses human designs.
Is Eureka open source?
Yes — eureka-research/Eureka is open source, released under the MIT license.
What language is Eureka written in?
eureka-research/Eureka is primarily written in Jupyter Notebook.
How popular is Eureka?
eureka-research/Eureka has 3.2k stars on GitHub.
Where can I find Eureka?
eureka-research/Eureka is on GitHub at https://github.com/eureka-research/Eureka.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.