Prompt optimisation · Complex floor · Section 6.5.4

Evolving a route without the validator

Positions and orders were allowed, yet no candidate named one; one rule forbids the only fight that keeps the boss winnable at turn 9.

Loop
(1+1) loop, 15 candidates
Task model
DeepSeek-V4-Flash
Teacher
DeepSeek-V4-Flash
Starting prompt
floor_basic.txt
Observation
full
Training floors
complex · 2 episodes each
Started
2026-10-04 22:39
Result file
gepa_result_evolved_route_complex_deepseek.json
Mean goal score on the training floors per candidate (click to open). Small dots: score per floor; dashed: best so far.seedmutation
0.000.250.500.751.00candidate 0 (seed): 0.168 — best so far0candidate 1 (mutation): 0.1401candidate 2 (mutation): 0.1542candidate 3 (mutation): 0.1403candidate 4 (mutation): 0.168 — best so far4candidate 5 (mutation): 0.1335candidate 6 (mutation): 0.1476candidate 7 (mutation): 0.1407candidate 8 (mutation): 0.1338candidate 9 (mutation): 0.1479candidate 10 (mutation): 0.16110candidate 11 (mutation): 0.175 — best so far11candidate 12 (mutation): 0.14712candidate 13 (mutation): 0.16113candidate 14 (mutation): 0.15414
Candidate 11mutationfrom candidate 4score 0.175returned as the best promptkept as parent
show2,682 characters
+279 words · −162 words
You play Magic Tower (MOTA): deterministic, turn-based, ONE floor. Goal: kill the boss alive with max HP. Engine lists actions with exact damage, hpAfter, lookahead, effCost, min-cost@maxStats, [FREE if DEF>=X], [OPTIONAL], [LETHAL]. Answer: FINAL_CHOICE: <number>. COMBAT: - You hit first. Your hit = ATK - monDEF. If <=0, cannot win. - Monster hit = monATK - DEF (or(magic-atk ignores DEF for magic-atk).DEF). If DEF >= monATK, fight free. - rounds = ceil(monHP / your hit); damage = rounds * monster hit. READING LIST:LIST (strict semantics): - damage/hpAfter exact for current stats. min-cost@maxStats = cost after allALL remaining stat gems (ATK/DEF/MDEF) collected. If thatmin-cost@maxStats is 0 or much lower, do NOTthe fight nowMUST —be collectdeferred until those gems first.are collected first, no matter what. - Treelookahead shows= whatvalue actionof unlocksstat (stats,gems keys,(ATK/DEF/MDEF) ONLY. Keys, doors, bosspotions path).are lookaheadNOT =progress. valueIf oflookahead=0 unlocks;or effCost=None, the fight unlocks NO stat gem — it is a DEAD END, even if marked non-optional, even if it leads to potions/keys. Never pay HP for it. - effCost = damage - lookahead. Negative effCost is strong. Positive effCost means you pay more than gem value — take only if gem is critical for boss access and no cheaper alternative exists. - [OPTIONAL] = enemy is NOTnot required for boss or stat gems. Never pay HP for optionalfight fights.optional. [LETHAL] = hpAfter <= 0.0 — never take. - Potions are recovery only,ONLY, NOTnot progress. DoFighting notto fightreach justa topotion reachstill potionscosts iffull theydamage are— optionalthe orpotion ifdoes youNOT losereduce morethe HPcost thanof theythe give. PRIORITIESfight. (hardOnly rules): 1.count Neverpotions AFTER deciding the fight anis optionalworthwhile enemyfor orstats/boss. HARD oneRULES (in strict order, no exceptions): 1. NEVER fight a monster with lookahead=0 (noor stateffCost=None gems/keys/doors— neededit foris boss).a Onlydead payend. HPSkip forit fightsregardless thatof unlockflags, statspotions, or thekeys bossbehind path.it. 2. NEVER fight any [OPTIONAL] monster. 3. Before any fight, check min-cost@maxStats. If the fight wouldit beis free0 or much cheaper after collectinglower remainingthan DEF/ATKcurrent gems,damage, doDO NOT take itfight now. Collect those stat gems first. 3.first, Amongeven via free doors or other required fights,fights choosethat theare onecheaper withnow. 4. lowestAmong effCost.remaining Ifrequired afights door(those that unlock stat gems or freethe actionboss givespath), pick the sameone accesswith asLOWEST aeffCost, fight,preferring takefights thethat door/freeare action.free now. 4.5. Never spend more than 40%>40% of current HP on a fight unless it isit's the only way to reach thea bossstat orgem arequired criticalfor statthe gem,boss, and evenno thenother onlyfight ifcan nobe cheapertaken alternativefirst. 6. isAlways take free actions (doors, potion pickups) before any fight, if available. 5. Re-evaluateIf aftera eachdoor stator gain.free Thepath ordergives matters:the cheapsame stataccess gemsas first,a thenfight, boss.take the door/free path. Think: WhatWhich stat gems remain? Which fights are truly required for the boss? Which fights become free after those gems? Which are dead ends? Maximize final HP.HP — wait for stat gems to make fights free or nearly free, not the reverse.
Starting prompt against the returned prompt (candidate 11)
+406 words · −387 words
You play Magic Tower (MOTA): a deterministic, turn-based dungeon game onturn-based, ONE floor. EachGoal: turnkill the engine lists every legalboss actionalive with exactmax numbers;HP. youEngine answerlists actions with oneexact actiondamage, number. COMBAThpAfter, (exact,lookahead, deterministic,effCost, turn-based): -min-cost@maxStats, You[FREE andif theDEF>=X], monster[OPTIONAL], trade[LETHAL]. hitsAnswer: inFINAL_CHOICE: rounds;<number>. COMBAT: - youYou strikehit first. - Your hit = heroATKATK - monDEF. If heroATK <= monDEF you deal no damage and<=0, cannot win. - Monster hit = monATK - heroDEF.DEF If(magic-atk heroDEFignores >=DEF). monATKIf theDEF fight>= costsmonATK, 0fight HP.free. - rounds = ceil(monHP / your hit); total costdamage = rounds x* monster hit. READING TheLIST list(strict showssemantics): - itdamage/hpAfter asexact damage=for andcurrent hpAfter=. -stats. Specialmin-cost@maxStats abilities:= [magic-atk]cost ignoresafter yourALL DEF;remaining [Nx-combo]stat multipliesgems the(ATK/DEF/MDEF) monster'scollected. hit;If [first-strike]min-cost@maxStats addsis one0 extraor monstermuch hit. READINGlower, THEthe ACTIONfight LIST: -MUST damagebe /deferred hpAfteruntil arethose exactgems forare yourcollected currentfirst, stats.no [FREEmatter ifwhat. - DEF>=X]lookahead tells= youvalue howof muchstat DEFgems makes(ATK/DEF/MDEF) thatONLY. fightKeys, free;doors, min-cost@maxStatspotions tellsare youNOT itsprogress. costIf afterlookahead=0 collectingor everyeffCost=None, remainingthe statfight item. -unlocks TheNO indentedstat treegem under— ait fightis ora doorDEAD showsEND, whateven itif unlocksmarked (items,non-optional, keys,even doors,if furtherit enemies).leads lookaheadto =potions/keys. valueNever ofpay whatHP itfor unlocks;it. - effCost = damage - lookahead. - TheNegative treeeffCost is thestrong. onlyPositive reliableeffCost map.means Doyou notpay infermore routesthan fromgem coordinatesvalue ("the— bosstake isonly aboveif me,gem sois Icritical mustfor goboss straightaccess up")and —no wallscheaper andalternative doorsexists. - make[OPTIONAL] that= wrong;not ifrequired anfor actionboss doesor notstat listgems. somethingNever infight itsoptional. tree,[LETHAL] that= actionhpAfter does<= not0 lead— there.never take. - [DEADPotions END]are doorsrecovery unlockONLY, nothingnot useful.progress. [OPTIONAL]Fighting enemiesto blockreach nothing.a [LETHAL]potion meansstill hpAftercosts <=full 0. PRIORITIES: 1.damage Stat— itemsthe first.potion Everydoes +1NOT DEFreduce lowersthe everycost futureof fight;the everyfight. +1Only ATKcount lowerspotions AFTER deciding the rounds.fight Reachis statworthwhile itemsfor beforestats/boss. HARD payingRULES for(in fightsstrict thatorder, getno cheaperexceptions): 1. afterwards;NEVER thefight ordera ofmonster fightswith decideslookahead=0 howor mucheffCost=None HP— youit keep.is a dead end. Skip it regardless of flags, potions, or keys behind it. 2. WhenNEVER severalfight fightsany all[OPTIONAL] makemonster. 3. progress,Before takeany thefight, onecheck withmin-cost@maxStats. theIf lowestit effCostis (it0 alreadyor accountsmuch forlower whatthan thecurrent fightdamage, unlocks);DO aNOT fight withnow. lookahead=0Collect thatthose unlocksstat nothinggems newfirst, iseven almostvia neverfree thedoors rightor firstother move. 3.required Neverfights fightthat aare monstercheaper thatnow. 4. costsAmong moreremaining thanrequired 40%fights of(those yourthat currentunlock HPstat unlessgems nothingor elsethe onboss thepath), floorpick canthe stillone makewith progress. 4.LOWEST HPeffCost, ispreferring thefights onlythat currencyare here.free now. 5. Never payspend >40% of current HP foron a fight thatunless unlocksit's nothingthe neededonly way to reach a stat gem required for the goal. 5.boss, Keysand areno scarce:other openfight acan doorbe onlytaken whenfirst. 6. whatAlways ittake unlocksfree isactions needed. GOAL:(doors, reachpotion thepickups) floor'sbefore objectiveany (killfight, theif bossavailable. ifIf therea isdoor one)or alivefree withpath asgives muchthe HPsame access as possible.a Thinkfight, abouttake the wholedoor/free floorpath. Think: beforeWhich eachstat move:gems whichremain? statWhich itemsfights are still outtruly there,required whatfor the bossboss? costsWhich nowfights versusbecome free after collectingthose them,gems? andWhich whichare fightsdead areends? trulyMaximize onfinal theHP way. Give— await shortfor reasoning,stat thengems endto with:make FINAL_CHOICE:fights <number> free or nearly free, not the reverse.

← all prompt-optimisation runs