Cadet encounter in the game's real order
The solver treated the cadet encounter as one seven-way choice made at the first dragon, so the map put a diamond there with no matching choices. It is now a sequence, as in the game: at the scream, investigate or keep walking; in the clearing, help your squadmate or walk away; then the bullies' fate (after surviving the fight) or what to do for the wounded cadet. Each choice point sits at its own place on the map and opens only its own options; an option that stays in the same place (helping, in the clearing) appears as a clickable label there. Bot histories that only know the final resolution still resolve correctly; the bot advisor maps each step onto the screen text. Policy rebuilt; tests added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
99f60282ed
commit
e8c177fc15
+16
-1
@@ -100,7 +100,22 @@ test("routing to one encounter: Blue only at the meadow equals the Blue policy;
|
||||
assert.ok(meadow.attempts("meadow-Blue") > 100);
|
||||
});
|
||||
|
||||
test("the cadet encounter is asked in the game's order: scream, then clearing or wounded cadet, then the fate", () => {
|
||||
const adv = S.advisor(policy, "Blue", "thisAttempt");
|
||||
const base = { company: "Alone", direction: "Center", fs: "Red" };
|
||||
assert.strictEqual(adv.step(base).var, "scream");
|
||||
// the synthetic world has no one who kept walking, so that option is (correctly) not offered
|
||||
assert.deepStrictEqual(Object.keys(adv.step(base).options), ["Investigate the scream"]);
|
||||
assert.strictEqual(adv.step({ ...base, scream: "Investigate the scream" }).var, "clearing");
|
||||
const fate = adv.step({ ...base, scream: "Investigate the scream", clearing: "Help your squadmate" });
|
||||
assert.strictEqual(fate.var, "fate");
|
||||
assert.ok(fate.risk && fate.risk.label === "Killed in the fight");
|
||||
assert.strictEqual(adv.step({ ...base, scream: "Investigate the scream", clearing: "Walk away" }).var, "hour");
|
||||
// a bot history that only knows the final resolution still lands in the right place
|
||||
assert.strictEqual(adv.next({ ...base, cadet: "Killed the bullies yourself" }).decision, "post");
|
||||
});
|
||||
|
||||
test("solverHistory converts form variables", () => {
|
||||
const h = S.solverHistory({ company: "Alone", direction: "Center", first_sighting: "Red", resolution: "Tourniquet", hour: "Tree", branch: "Descend slowly: two Greens" });
|
||||
assert.deepStrictEqual(h, { company: "Alone", direction: "Center", fs: "Red", cadet: "Tourniquet", post: "(no fork)", hour: "Tree", descend: "Slowly (two Greens)", shadow: "no" });
|
||||
assert.deepStrictEqual(h, { company: "Alone", direction: "Center", fs: "Red", cadet: "Tourniquet", wounded: "Tourniquet", post: "(no fork)", hour: "Tree", descend: "Slowly (two Greens)", shadow: "no" });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user