Explore · Section 6.5 (RQ2)

Prompt optimisation

A hosted model can only be changed through its input. These runs evolve the system prompt from task outcomes, in the style of GEPA: play, let a teacher read the traces, rewrite, keep what scores at least as well. Every candidate, diagnosis and training episode is here.

The loop

  1. 1EvaluateThe current prompt plays one episode on each of three training floors (the simple floor, gen01, gen02) at temperature 0; fitness is the mean goal score.
  2. 2Build the requestScope, a description of the observation, the rules a prompt must follow, the current prompt, one trace per episode and up to two worse rewrites.
  3. 3ReflectThe teacher writes a short diagnosis and one complete revised prompt.
  4. 4ValidateA fixed check rejects coordinates, monster names, routes, lists of allowed fights and numbers of 100 or more; one retry with the reasons.
  5. 5SelectThe candidate plays the same floors; it becomes the parent if it scores at least as well as the best so far.

This is a (1+1) evolutionary loop. The Pareto loop of the second study keeps every valid candidate, draws parents from those that are best on at least one floor, and merges the two best once (Section 5.7, Table 5.2).

Study 1: does evolution add anything once the observation is annotated?

Two weaker models, three prompts (rules-only, evolved from it, hand-written single-floor prompt), each under the full and the bare observation, evaluated on thirteen held-out generated floors with one episode each. Hypotheses were stated before the runs.

ModelObservationRules-onlyEvolvedHand-writtenRun
Llama-3.1-8Bfull8/13 · 0.55610/13 · 0.646 ᵃ9/13 · 0.660candidates
Llama-3.1-8Bbare5/13 · 0.4624/13 · 0.3996/13 · 0.484candidates
DeepSeek-V4-Flashfull10/13 · 0.82111/13 · 0.84611/13 · 0.850candidates
DeepSeek-V4-Flashbare–– ᵃ–candidates

Held-out kills / 13 · mean goal score (Table 6.6). ᵃ The optimiser returned its seed, so the evolved arm is the rules-only prompt played again: the difference is the noise floor.

≤ 0.132difference between two held-out evaluations of the same prompt; differences between candidates inside a run were 0.01 to 0.24
30/39 vs 24/39paired test of the one accepted rewrite (bare observation, DeepSeek-V4-Flash) against the rules-only prompt; p = 0.035, carried by two floors and including the four trial floors it was selected on; on the nine other floors 3 : 1, p = 0.31the rewrite

What the evolved prompts contain

How often the candidates of both studies state each rule of the hand-written prompts, all written from the rules-only prompt by a teacher given no example rules (Table 6.7, counted by keyword patterns).

RuleStudy 1Study 2, (1+1)Study 2, ParetoIn the full observation as
collect stat items before the fights they make cheaper ᵇ37/407/77/7net stat-route line, fight-order line, cost at maximum stats
take the cheapest progress first (lowest effective cost)26/406/74/7effective cost, fight-order line
never pay HP for a fight that unlocks nothing needed30/407/76/7OPTIONAL tag, alternative-route tag
open doors only when what lies behind is needed14/407/76/7DEAD END tag, key line
no fight above 40 % of current HP3/402/70/7—
keys are scarce0/400/71/7key budget
added by evolution: trust the engine's annotations32/402/73/7—
added by evolution: fight the boss only when winnable and after the stats18/404/71/7boss line, WINNABLE tag
added by evolution: make the reasoning and the chosen action agree8/400/70/7—

ᵇ The rules-only prompt already contains a sentence that the pattern matches, so this row overstates rediscovery.

All runs