Prompt optimisation · Study 1, second configuration · Section 6.5.2

DeepSeek-V4-Flash, bare observation

The one accepted rewrite of the second configuration, taken to the paired test: 30/39 against 24/39 for the rules-only prompt (p = 0.035). The test includes the four trial floors on which it was selected (4 : 0); on the nine other floors 3 : 1, p = 0.31.

Loop
(1+1) loop, 6 candidates
Task model
DeepSeek-V4-Flash
Teacher
DeepSeek-V4-Flash
Starting prompt
core_rules.txt
Observation
bare
Training floors
simple, gen01, gen02 · 1 episode each
Started
2026-09-28 19:01
Result file
gepa_result_gs2_dsv4flash_bare.json

Evaluation after the run

FloorsPromptKillsMean goal score
held-outEvolved9/130.690
trainingEvolved2/30.521

From gs2_dsv4flash_bare.json; its episodes are listed on the episodes page.

Mean goal score on the training floors per candidate (click to open). Small dots: score per floor; dashed: best so far.seedmutationre-evaluation
0.000.250.500.751.00simple: 0.325gen01: 0.515gen02: 0.321candidate 0 (seed): 0.387 — best so far0simple: 0.325gen01: 0.762gen02: 0.763candidate 1 (mutation): 0.617 — best so far1simple: 0.325gen01: 0.762gen02: 0.784candidate 2 (mutation): 0.624 — best so far2simple: 0.325gen01: 0.762gen02: 0.774candidate 3 (re-evaluation): 0.6203simple: 0.325gen01: 0.762gen02: 0.774candidate 4 (mutation): 0.6204simple: 0.325gen01: 0.762gen02: 0.703candidate 5 (mutation): 0.5975
Candidate 2mutationfrom candidate 1score 0.624returned as the best promptkept as parent
show3,152 characters
+443 words · −263 words
You play Magic Tower, a turn-based dungeon game on a single floor. Each turn you receive your hero state and a numbered list of all legal actions (fights, door opens, and sometimes auto-collects are shown in the trace).opens). You answer with one action number. GAME RULES:COMBAT: - A fight is turn-based;You youalways hit first. Your damage to a monster = your ATK - its DEF. IfDEF; yourif ATK <= its≤ DEF,DEF you deal 0 damage and cannot win.win The(the monster'saction will say "you cannot win"). - Monster damage to you = its ATK - your DEFDEF. (ifIf your DEF >=≥ its ATK, it deals 0).0. - TheMagic attacks ignore your DEF: the displayed damage is fixed (given as [magic-atk]). - A fight continuesgoes until one side reaches 0 HP. If you reach 0, you lose. - Magiclose attacksthe ignoregame. - yourHP DEF:never theregenerates; displayedevery damageHP isspent fixedreduces (givenyour infinal thescore. ITEMS action& description).DOORS: - Doors requireGems apermanently keyraise ofATK theor matchingDEF; color;potions eachrestore keyHP; openskeys exactlyopen one door each and isare consumed. - Opening a door costs no HP butand may lead to a dead enditems withor nodead items—doends. notOnly open doors unlessthat theygive leadaccess to a collectiblean itemuncollected (gem/potion/key)gem/potion/key or to the boss. - Items: gems permanently raise ATKCollecting oran DEF,item potionsis restoreautomatic HP,when keysyou openstep doors.on Collectingit items(shown isas automaticengine whenaction). steppingYou onnever them. -need HPto doesspend nota regenerateturn betweento fights."collect". STRATEGY: - Your only goalYOUR isONLY toGOAL: kill the boss and end with as much HP as possible. CORE DoDECISION notRULE: - A fight monstersis **necessary** ONLY if that aremonster notcurrently blockingblocks ayour path to aan collectibleuncollected itemgem/potion/key, or to the boss. - A door is **worth opening** ONLY if it gives access to an uncollected gem/potion/key or to the boss. - Every other fight or door open is pure waste: it costs HP;HP avoidor unnecessarya fights.key and gains nothing. Do NOT take it. - Before choosing any action, check each listed option: does it lead (immediately or after that monster/door) to a fight,remaining verifyuseful initem or the boss? If not, skip it. WHEN MULTIPLE ACTIONS ARE OFFERED: - If any action descriptionleads theto exactan damageuncollected andgem/potion/key HP-after.at Onlylow takeHP acost fightand ifenables itfuture issurvival, necessaryprefer tothe reachone anthat itemunlocks (gem/potion/keys)the ormost items for the boss,least andHP. - ifIf the HP-afterboss is clearlythe positiveonly withremaining goal AND the boss fight shows a marginpositive forHP-after, subsequenttake requiredthe fights.boss immediately — do not waste HP on any other monster first. - If anthe actionboss is "openlisted door","you onlycannot win", you must improve ATK (or DEF) via remaining gems first. - NEVER take ita iffight "because you have to pick something." If every offered fight is unnecessary, the doorleast-bad choice is onthe aone pathwith tothe smallest HP loss, but only as a remaininglast itemresort or— never when the boss;boss manyis doorswinnable areor deada endsgem andis wastereachable. - If offered a keyfight that blocks nothing and a turn. -door Collectthat allleads beneficialnowhere, itemsstill (gems,avoid potions)both; beforepick fightingthe option with the boss,least unlessHP waitingcost costsonly moreif HP.forced. PLANNING: - GemsCheck arewhat items remain on the mostfloor valuable—prioritize(the ATKsystem toprompt belists abletheir topositions). damageBefore fighting, verify the boss.<br>-monster Ifis on the bossonly fightpath isto listedone asof "youthem; cannotmany win",monsters doguard notnothing. - takeTrack it;your continueATK tovs gatherboss itemsDEF: orif clearyour theATK path.<br>-≤ Alwaysboss preferDEF theyou actiondeal that0 improves— youryou statsMUST (gems)find orATK restoresgems before attempting the boss, even if it costs HP (potions)to overreach athem. - fightAfter thatyou giveshave nothing,collected unlessall gems/potions that fightare isreachable without excessive HP loss, the boss becomes the only waygoal. toFight reachit suchas items. Endsoon as you can survive with positive HP — every extra fight before the boss reduces your answerscore. OUTPUT: - with:Give a short reasoning (2-4 sentences) then a single line: FINAL_CHOICE: <number>
Starting prompt against the returned prompt (candidate 2)
+515 words · −86 words
You play Magic Tower, a turn-based dungeon game on onea single floor. Each turn you getreceive your hero state and a numbered list of thelegal actions you can(fights, takedoor now;opens). youYou answer with one action number. GAME RULES:COMBAT: - A fight is a sequence of rounds;You youalways hit first. Your hitdamage to a monster = your ATK - the monster's DEF.its IfDEF; yourif ATK <= the monster's≤ DEF you deal 0 and cannot damagewin it(the ataction all.will say "you cannot win"). - TheMonster monster'sdamage hitto you = its ATK - your DEF;DEF. ifIf your DEF >=≥ its ATKATK, it cannotdeals hurt0. - you.Magic Theattacks ignore your DEF: the displayed damage is fixed (given as [magic-atk]). - A fight endsgoes whenuntil one side reaches 0 HP. If you reach 0 HP0, you lose the game. - AHP doornever needsregenerates; aevery keyHP ofspent thereduces sameyour colour;final eachscore. ITEMS key& opensDOORS: - exactlyGems permanently raise ATK or DEF; potions restore HP; keys open one door each and are consumed. - Opening a door costs no HP and may lead to items or dead ends. Only open doors that give access to an uncollected gem/potion/key or to the boss. - Collecting an item is usedautomatic up.when you step on it (shown as engine action). You never need to spend a turn to "collect". YOUR ONLY GOAL: kill the boss and end with as much HP as possible. CORE DECISION RULE: - WalkingA ontofight is **necessary** ONLY if that monster currently blocks your path to an itemuncollected collectsgem/potion/key, it:or gemsto raisethe ATKboss. - A door is **worth opening** ONLY if it gives access to an uncollected gem/potion/key or DEFto permanently,the potionsboss. - restoreEvery HP,other keysfight or door open doors.is pure waste: it costs HP or a key and gains nothing. Do NOT take it. - Before choosing any action, check each listed option: does it lead (immediately or after that monster/door) to a remaining useful item or the boss? If not, skip it. WHEN MULTIPLE ACTIONS ARE OFFERED: - If any action leads to an uncollected gem/potion/key at low HP cost and enables future survival, prefer the one that unlocks the most items for the least HP. - If the boss is the only remaining goal AND the boss fight shows a positive HP-after, take the boss immediately — do not restoredwaste betweenHP fights. GOAL:on killany other monster first. - If the boss is listed "you cannot win", you must improve ATK (or DEF) via remaining gems first. - NEVER take a fight "because you have to pick something." If every offered fight is unnecessary, the least-bad choice is the one with the smallest HP loss, but only as a last resort — never when the boss is winnable or a gem is reachable. - If offered a fight that blocks nothing and staya alive.door that leads nowhere, still avoid both; pick the option with the least HP cost only if forced. EndPLANNING: - Check what items remain on the floor (the system prompt lists their positions). Before fighting, verify the monster is on the only path to one of them; many monsters guard nothing. - Track your answerATK with:vs boss DEF: if your ATK ≤ boss DEF you deal 0 — you MUST find ATK gems before attempting the boss, even if it costs HP to reach them. - After you have collected all gems/potions that are reachable without excessive HP loss, the boss becomes the only goal. Fight it as soon as you can survive with positive HP — every extra fight before the boss reduces your score. OUTPUT: - Give a short reasoning (2-4 sentences) then a single line: FINAL_CHOICE: <number>

← all prompt-optimisation runs