---
title: 'EvoCurr: Self-Evolving Curriculum Framework'
url: https://www.emergentmind.com/topics/evocurr
type: topic
---

# EvoCurr: Self-Evolving Curriculum Framework

EvoCurr is a self-evolving curriculum framework designed for inference-time improvement of large language model (LLM) solvers on complex, long-horizon decision-making tasks. By orchestrating a dynamic interplay between a curriculum-generating LLM and a code-generating LLM, EvoCurr adaptively constructs a sequence of problem instances with ascending difficulty, enabling the solver to progressively acquire the required reasoning and control policies. This framework transparently integrates curriculum learning principles into LLM-driven code generation without requiring model retraining, manual curriculum engineering, or prior knowledge of domain decomposition [2508.09586].

## 1. Framework Motivation and Conceptual Architecture

Modern LLMs demonstrate proficiency in reasoning and code synthesis, yet exhibit degraded performance in high-complexity domains characterized by long-horizon dependencies and compounding errors when given a one-shot, unstructured task prompt. EvoCurr addresses this bottleneck by instantiating a "self-evolve" loop that emulates human curriculum learning: an adaptive, staged introduction of progressively harder tasks governed by solver performance. The core pipeline comprises the following components:

1. **Curriculum Designer LLM:** Proposes the next curriculum instance \(C_{i+1}\) by analyzing solver outcomes on \(C_{i}\) and the properties of the final task \(T_f\).
2. **Behavior Coder LLM:** Given the new curriculum \(C_{i+1}\) and the current decision tree policy \(B_{i}\), generates executable Python code representing the improved behavior tree \(B_{i+1}\).
3. **Environment/Simulator:** Executes \(B_{i+1}\) on \(C_{i+1}\), returning performance metrics \(P_{i+1}\) (e.g., win rates, error traces) to close the curriculum feedback loop.
4. **Iteration:** This cycle continues until the current curriculum matches the final task and the solver attains a target win rate.

This approach eliminates the need for model retraining and handcrafted curricula, operating entirely at inference-time with no access to gradient or model weights.

## 2. Curriculum Generation: Difficulty Quantification and Adaptation

EvoCurr endows the Curriculum Designer with an explicit performance-driven adaptation protocol. The curriculum's difficulty level, a scalar \(d_i \in \mathbb{R}\) associated with \(C_i\), is adjusted using the solver’s observed win rate \(r_i\) and auxiliary metrics \(m_i\):

\[
d_{i+1} = d_i + 
\begin{cases}
+\delta^+ & \text{if } r_i \geq \theta_{\mathrm{up}} \\
-\delta^- & \text{if } r_i \leq \theta_{\mathrm{down}} \\
0         & \text{otherwise}
\end{cases}
\]

where \(\theta_{\mathrm{up}} = \theta_{\mathrm{down}} = 0.67\) in the experiments, and \(\delta^{+}, \delta^{-}\) are step sizes inferred by LLM prompt context. The LLM leverages recent history and task specification to prompt new curricula, typically adjusting unit counts, enemy compositions, or scenario geometry. Difficulty increases if the win rate exceeds \(\theta_{\mathrm{up}}\) and is relaxed if the solver repeatedly fails.

Curriculum adaptation is operationalized through a pseudocode-driven prompting protocol:

```python
Extract r_i, m_i from Pi
Build prompt π ← [Tf, Ci, Pi, history]
If r_i > θ_up:
    Ci+1 ← CurriculumLLM(π, “increase difficulty”)
Else:
    Ci+1 ← CurriculumLLM(π, “reduce/adjust difficulty”)
Validate Ci+1 against task constraints.
```

## 3. Solver LLM: Code Generation via Planner–Coder–Critic Loop

Each curriculum is converted into a decision-tree policy by a three-stage LLM loop:

- **Planner:** Synthesizes a high-level strategy based on current and previous policy, feedback from simulation outcomes, and environment parameters.
- **Coder:** Converts the strategic outline into Python decision-tree code (e.g., for StarCraft II’s python-sc2 API), embedding explicit conditional logic for actions, thresholds, and abilities.
- **Critic:** Executes the code in the environment, parses runtime tracebacks, and provides corrective feedback if execution fails (due to syntax errors, deprecated API calls, or underperformance).

The process iterates until the code passes environment validation and achieves the curriculum win rate threshold. This loop allows efficient error recovery and policy refinement within each curriculum stage.

Example (early-stage Marine micro-management):

```python
async def marine_micro(self):
    marines = self.units(UnitTypeId.MARINE)
    zealots = self.enemy_units(UnitTypeId.ZEALOT)
    if not marines.exists or not zealots.exists:
        return
    for m in marines:
        if m.tag not in self.stim_used and AbilityId.EFFECT_STIM_MARINE in await self.get_available_abilities(m):
            m(AbilityId.EFFECT_STIM_MARINE); self.stim_used.add(m.tag)
    target = min(zealots, key=lambda z: z.health + z.shield)
    for m in marines:
        dist = m.distance_to(target)
        if dist < 1:
            m.move(m.position.towards(target.position, -3))
        elif dist <= 5:
            m.attack(target)
        else:
            m.move(target.position)
```

## 4. Self-Evolving Training Loop: Hyperparameters and Control Flow

The overall EvoCurr iteration (Algorithm 1) can be summarized as follows:

```python
Input: final task Tf, initial tree B0, win-rate threshold θ, max rounds N
C0 ← Simplify(Tf)
B ← B0
for i in 0…N−1:
    Pi    ← Evaluate(B, Ci)
    Ci+1  ← CurriculumDesigner(Ci, Pi, Tf)
    Bi+1  ← BehaviorCoder(Ci+1, B, Pi)
    B     ← Bi+1
    if Ci+1 == Tf and Pi.win_rate ≥ θ:
        break
return B
```

Key hyperparameters include:

- \(\theta\): win rate threshold per curriculum (67%)
- \(N\): maximum curriculum stages (typically \(N ≈ 10\))
- \(M\): code generation attempts per curriculum (\(M = 5\))
- \(\delta^+, \delta^-\): difficulty adjustment increments

Decision criteria:

- Advance curriculum if \(r_i \geq \theta\)
- Relax difficulty if \(r_i < \theta\) after \(M\) attempts
- Any code error triggers Critic feedback

## 5. Experimental Results and Empirical Insights

EvoCurr was evaluated on the StarCraft II micro-management benchmark, where the final curriculum included complex multi-unit Terran vs Protoss engagements with extensive action dependencies, as detailed in the task specification table (cf. Table 1 in the source):

| Unit Type (Terran) | Quantity | Tech/Abilities           |
|--------------------|----------|--------------------------|
| Marine             | 20       | Stimpack                 |
| Marauder           | 12       | Stimpack                 |
| Ghost              | 3        | Personal Cloak           |
| Medivac            | 3        | —                        |
| Siege Tank         | 2        | Siege Mode               |
| Viking Fighter     | 4        | —                        |
| Liberator          | 2        | —                        |

Enemy units comprised Zealot (Charge), Stalker (Blink), High Templar (PsiStorm), Colossus (ExtLance), and Disruptor variants.

Benchmark outcomes:

- EvoCurr succeeded in 1/5 (20%) runs at mastering the final task (reaching a 100% win rate after 6 curricula). The average curriculum depth was approximately 5.6 (range: 4–7).
- The one-shot direct-generation baseline failed in all runs, typically producing code that never surpassed the 67% threshold or suffered from runtime errors.
- Ablations reveal that omitting the Curriculum Designer eliminates success, and removing the Critic loop increases code failures and decreases win rates.

## 6. Strengths, Limitations, and Applications

**Strengths:**

- Adaptive difficulty maintains the agent's performance within the "zone of proximal development," precluding trivialization or overwhelming failures.
- Code and decision-branch reuse from prior curricula enhances transfer to more complex challenges.
- Critic-driven feedback robustly prevents code hallucinations and API incompatibilities.

**Limitations:**

- Tendency for the Behavior Coder to focus on advanced micro-management in a subset of units, with coarse handling of others, attributed to token budget and input context constraints.
- Occasional misestimation of appropriate curriculum scaling. This suggests further optimization of prompt engineering and threshold selection.
- Absence of a formal, quantitative notion of "difficulty"; the system relies on implicitly learned LLM semantic priors.

**Applications:**

- Real-time strategy game AI for multi-agent coordination (e.g., Dota 2, fighting games)
- Robotics, where hierarchical curricula scaffold skill acquisition under physical and environmental uncertainty
- Structured decision tree synthesis in logistics, scheduling, and autonomous driving domains, especially where verifiable logic is preferable to end-to-end models

EvoCurr demonstrates that a coupled LLM system, synthesizing both task curricula and executable control code, can achieve significantly higher rates of success than non-curricular one-shot baselines in complex domains. The architecture provides a modular template for LLM-driven curriculum learning in automated reasoning and policy induction, with generalization potential beyond the tested domain [2508.09586].

Source: https://www.emergentmind.com/topics/evocurr