Bully fight: add the first move and the dagger choice to the solver and the map

After helping your squadmate the game asks your first move (pause to assess, charge the
smaller cadet, or get between your squadmate and the bigger one) and, after pausing, what to
do about the smaller cadet's dagger. Both are now decisions in the solver, and the chance of
dying in the fight depends on them (about 3 in 10 riders who charged in died; almost none who
paused). With that split, helping now beats walking away.

On the map, several choices made at one place share one diamond, which opens a card listing
each choice in the game's order. Policy rebuilt; the policy build gets a larger heap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
ekcSchiano
2026-11-02 20:09:13 +00:00
co-authored by Claude Opus 5.5
parent 1646844fa6
commit 5f66b9647a
20 changed files with 548 additions and 291 deletions
+7 -2
View File
@@ -100,14 +100,19 @@ 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", () => {
test("the cadet encounter is asked in the game's order: scream, clearing or wounded cadet, the fight's moves, 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" });
const help = { ...base, scream: "Investigate the scream", clearing: "Help your squadmate" };
assert.strictEqual(adv.step(help).var, "fight");
assert.strictEqual(adv.step({ ...help, fight: "Pause to assess" }).var, "dagger");
// charging straight in skips the dagger choice
assert.strictEqual(adv.step({ ...help, fight: "Charge the smaller cadet" }).var, "fate");
const fate = adv.step({ ...help, fight: "Pause to assess", dagger: "Engage the smaller cadet" });
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");