TL;DR
This paper introduces DemoEvolve, a method that uses human demonstrations to guide the evolution of agent harnesses in complex, long-horizon games. By leveraging expert examples, DemoEvolve overcomes the limitations of sparse feedback and noisy self-generated data, leading to more effective and auditable harness improvements for frozen language models.
What Problem Does This Paper Address?
Large language models (LLMs) are increasingly being used as agents in interactive environments, but their performance is heavily influenced by "harnesses" – the external structures that define how they perceive the world, process information, and take actions. Harness evolution aims to improve agent performance by modifying these harnesses, rather than retraining the LLM itself. However, in complex, long-horizon, and stochastic environments (like many games), self-generated experience (rollouts) can be misleading. Sparse rewards and high variance in outcomes make it difficult to attribute failures to specific harness decisions, leading to noisy search and potentially selecting ineffective or even inert harness edits. This paper addresses the challenge of making harness evolution more robust and effective in these difficult settings by incorporating human demonstrations.
Methods
The core of the paper is DemoEvolve, a demonstration-bootstrapped approach to harness evolution. It builds upon existing "self-rollout" harness evolution methods by augmenting the training data with competent human trajectories.
Here's a breakdown of the key components:
- Frozen LLM Agent: The base language model's weights are kept fixed throughout the process.
- Harness Evolution: The system iteratively modifies an "executable harness" – essentially a set of rules, prompts, and logic that surrounds the LLM to guide its behavior. This harness dictates how observations are processed, which actions are available, and how LLM outputs are interpreted.
- Coding Proposer: A separate agent that inspects past harness performance (scores, rollouts, execution traces) and proposes new harness edits.
- Information Regimes: The paper compares three ways the coding proposer receives information:
- Meta-Harness (Self-Rollout): Only uses the archive of prior harness code, scores, and self-generated rollouts.
- OpenResearch (Text-Guided): Adds external textual information like rules or tutorials to the self-rollout archive.
- DemoEvolve (Demonstration-Guided): Adds competent human trajectories to the self-rollout archive. These trajectories are not used for direct supervised learning but serve as behavioral exemplars and diagnostic references.
- Diagnostic Credit Assignment: A key challenge is inferring which harness edits caused improvements. DemoEvolve aims to improve this by providing concrete state-action examples from humans, helping to localize failures and identify effective interventions.
Datasets
The paper uses two games as testbeds:
- TextArena Liar's Dice: A short-horizon, interactive game with stochasticity and hidden information. It serves as a "positive control" to show that self-rollout evolution can work when feedback is attributable.
- Balatro: A long-horizon, stochastic roguelike deck-building game. This is the primary testbed for demonstrating the challenges of sparse feedback and the benefits of DemoEvolve. The paper uses a fixed-seed setup from BalatroBench for reproducibility.
Key Insights and Ideas
- Sparse Feedback is a Major Hurdle: In long-horizon, stochastic environments like Balatro, self-rollout evolution can be easily misled by noisy scores, leading to the selection of ineffective or even inactive harness edits.
- Human Demonstrations Provide Crucial Context: Competent human trajectories offer concrete state-action evidence that helps the coding proposer understand why certain actions are good and when they should be taken, bridging the gap between observed outcomes and effective harness design.
- DemoEvolve Improves Diagnosability and Localizability: By providing human examples, DemoEvolve makes it easier to pinpoint where a harness edit is needed and to verify that the proposed change is actually active and model-facing, not just an inert code modification.
- Harness Evolution Can Create Hybrid Systems: In harder settings, DemoEvolve doesn't just replace the LLM's reasoning but creates a hybrid system where symbolic code handles explicit rules, probabilities, and safety constraints, while the LLM handles residual strategic judgment.
Key Results
- Liar's Dice: Self-rollout harness evolution successfully improved performance, finding compact heuristics that translated into executable structures.
- Balatro:
- Meta-Harness (self-rollout) showed an apparent gain on in-distribution seeds but failed to transfer to out-of-distribution seeds, with audits revealing inactive edits.
- OpenResearch (text-guided) also failed to improve performance.
- DemoEvolve significantly outperformed all other methods, improving both in-distribution and out-of-distribution performance. It achieved a completion rate of 12/15 rollouts compared to 5/15 for the base BalatroLLM and 6/15 for Meta-Harness.
- Behavioral analysis showed DemoEvolve transferred a strategy-level pattern of competent play (economy management) more effectively than other methods.
- A localization analysis demonstrated that human trajectories enabled more accurate identification of state-conditioned edits.
Limitations and Future Work
- Task Coverage: The primary evaluation was on Balatro, with TextArena serving as a simpler case. The authors acknowledge that future work should test DemoEvolve on a broader range of interactive settings, including other games, tool-use agents, terminal tasks, web agents, and embodied environments.
Summary updated