NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Habitats: A Framework for Open-Ended Evolution of Agent Objectives

Nicolas Bolouri, Gaya Mehenni, Daniel ToyamaarXiv 2026

TL;DR

Designing the perfect "reward" to train an AI is often harder than training the AI itself. Habitats is a new framework that uses Large Language Models (LLMs) to evolve a diverse library of "mini-games" (objectives), creating agents with a broad repertoire of skills that can be reused to solve new, unseen tasks faster than training from scratch.

What Problem Does This Paper Address?

In Reinforcement Learning (RL), we usually give an agent a "reward" (a numerical score) for doing what we want. If you want a robot to walk, you reward forward progress. But in complex or "open-ended" environments, defining these rewards is a nightmare. Humans are expensive to ask, hand-designed rewards often lead to "reward hacking" (where the agent finds a lazy shortcut), and AI-generated rewards often lack variety.

The authors tackle the bottleneck of objective discovery. How do we move beyond training an agent for one specific task and instead help it discover a whole "habitat" of diverse, learnable, and useful behaviors?

Methods

The core of Habitats is a two-stage evolutionary loop that separates the "what" from the "how."

  1. The Population: Habitats maintains a group of individuals, where each individual is a pair: an executable reward function (Python code) and the policy (the brain) trained to maximize it.
  2. The Cross-Fitness Matrix: This is the secret sauce. Every policy in the population is tested against every reward function. This creates a grid that reveals who is a specialist, who is a generalist, and—crucially—how different the behaviors actually are.
  3. The Planner (LLM 1): Acting like a high-level CEO, this LLM looks at the cross-fitness data. If it sees the population is getting "boring" (everyone doing the same thing), it issues a "mutation directive"—a natural language instruction like "Combine the jumping strategy of Agent A with the crawling of Agent B."
  4. The Mutator (LLM 2): This LLM acts like a programmer. it takes the Planner's directive and writes the actual Python code for a new reward function.
  5. Survivor Selection: Only agents that "master" their own niche and beat a random baseline survive to the next generation.
Figure 1: Habitats evolutionary lifecycle. At generation t, the population Pt contains executable reward–policy pairs. (1) Policies for newly synthesized rewards are trained from scratch, while inherited survivor policies remain fixed. (2) Every policy is evaluated under every population reward to construct the cross-fitness matrix Ft. (3) Normalized cross-fitness profiles are used to compute Specialist Quality (SQ), Behavioral Diversity (BD), and Grounded Behavioral Profile Coverage (GC). (4) Individuals whose policies dominate their own reward niches and outperform the random-policy baseline form the survivor set Vt. (5) The Planner determines the offspring count, selects parents, and proposes mutation directives, while the Mutator generates and validates executable reward programs. Valid offspring join the survivors to form Pt+1 = Vt ∪Ot; invalid candidates receive up to three replacement attempts before their offspring slot is discarded.

Datasets

The researchers evaluated Habitats across four distinct "playgrounds":

  • Card Sandbox: A custom discrete environment where agents manipulate cards. There is no built-in goal; all behavior must be "invented" by the framework.
  • MuJoCo Continuous Control: Three classic physics benchmarks—Cart-Pole (balancing), Hopper (one-legged hopping), and Cheetah (running).

In these environments, the "native" rewards (like "run forward") were discarded. The agents had to discover their own reasons to move.

Key Insights and Ideas

  • Separation of Concerns: By having one LLM plan the strategy and another write the code, Habitats avoids the "echo chamber" effect where an LLM just keeps refining the same mediocre idea.
  • Behavioral Grounding: Diversity isn't measured by how different the code looks, but by how differently the agents act. This ensures that "novelty" actually means "new skills."
  • Generalist Takeover & Recovery: The authors observed a fascinating cycle: a "generalist" policy would occasionally emerge that was good at everything, causing the population to shrink. The Planner would then detect this "stagnation" and intentionally push for new, radical niches to restore diversity.
  • Emergent Skills: Without being told to, the system discovered complex behaviors like "The Commando Crawl" (staying low to the ground) and "The Pogo Stick" (jumping as high as possible while staying stationary).

Key Results

Habitats significantly outperformed baselines that either generated rewards randomly or mutated them without a high-level plan.

  • Diversity: Habitats achieved 1.8x the behavioral diversity of direct mutation and 2.5x that of independent generation.
  • Reusability: The researchers took the "frozen" library of skills evolved by Habitats and used them to solve 10 new tasks. A "meta-policy" picking from these pre-learned skills reached parity with a task-specific agent (trained for 20,000 episodes) in just 5,000 episodes.
  • Superiority: At 10,000 episodes of adaptation, the Habitats library outperformed agents trained from scratch for twice as long.
Figure 2: Population quality, diversity, grounded coverage, and downstream adaptation. (A–B) SQ and BD are equal-weight macro-averages across environments, shown as their means across generations and their values in the final population. (C) GCAUC is reported separately for each environment on a logarithmic scale. (D) Downstream adaptation is measured by paired win rate against task-specific Scratch policies trained for 20,000 episodes. Meta-policies route among size- matched, frozen libraries produced by Habitats, Direct Mutation, or Independent Generation and are trained for 1,000, 2,000, 5,000, 10,000, or 20,000 episodes; the dashed line denotes parity. Error bars in (C–D) indicate ±1 standard deviation over three seeds.

Limitations and Future Work

  • Computational Cost: The cross-fitness matrix scales quadratically ($N^2$). As the population grows, evaluating every agent against every reward becomes very expensive.
  • Fixed Architectures: Currently, Habitats only evolves the objectives. The authors suggest that future work could jointly evolve the neural network architectures or the environments themselves.
  • Safety: Automating reward generation is powerful but risky. The authors emphasize that real-world applications would require strict sandboxing and human oversight to prevent agents from discovering "dangerous" objectives.

Summary updated

BibTeX
@misc{bolouri2026habitats,
  author = {Nicolas Bolouri and Gaya Mehenni and Daniel Toyama},
  title = {{Habitats: A Framework for Open-Ended Evolution of Agent Objectives}},
  year = {2026},
  eprint = {2611.31160},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31160},
}
Figure