Route model: every logged choice; map keeps your choices on every route

Solver: adds leaving your squadmates, your reaction to the first dragon (options offered per
dragon, from the form's categories) and, below the tree, jumping onto the Red or letting it pass
to the two Greens. Bot crosswalk and option patterns map the game's text for each.

Map: a choice you make now holds for every route to that dragon, together with the earlier steps
of the path you were looking at, so a later choice never sends the route back through another
place. Routes your choices rule out are hidden; choosing an option closes its card.

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:50:59 +00:00
co-authored by Claude Opus 5.5
parent c2dcaee16f
commit 83bc19521e
19 changed files with 471 additions and 323 deletions
+2 -1
View File
@@ -672,10 +672,11 @@ adjusted OR = exp(βⱼ), 95% CI = exp(βⱼ ± 1.96·SEⱼ)</div>
</div>
<div class="mpanel method" role="tabpanel" id="mt-5-panel" aria-labelledby="mt-5" hidden>
<h3>6. Best routes, the valley map and The Odds</h3>
<p>The valley map and The Odds come from a solver (<code>solver.js</code>) that treats a run as a decision tree. Your choices are decisions (company, direction, the cadet encounter in the game's order — investigate the scream or keep walking, help your squadmate or walk away, your first move in the fight (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, then the bullies' fate or what to do for the wounded cadet — the fork, tree or valley, how to climb down, whether to face the valley Red, and at every bonding encounter whether to attempt the bond or die on purpose). The game's rolls are chance events: which dragon appears first, whether you die at the sighting, in the fight or before the hour, whether the shadow appears and which dragon it is, which dragon waits in the meadow, and how the bonding encounter ends.</p>
<p>The valley map and The Odds come from a solver (<code>solver.js</code>) that treats a run as a decision tree. Your choices are decisions (company and, with squadmates, whether you later leave them; direction; how you react when the first dragon appears; the cadet encounter in the game's order — investigate the scream or keep walking, help your squadmate or walk away, your first move in the fight (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, then the bullies' fate or what to do for the wounded cadet — the fork, tree or valley, how to climb down, whether to jump onto the Red below the tree or let it pass and go on to the two Greens, whether to face the valley Red, and at every bonding encounter whether to attempt the bond or die on purpose). The game's rolls are chance events: which dragon appears first, whether you die at the sighting, in the fight or before the hour, whether the shadow appears and which dragon it is, which dragon waits in the meadow, and how the bonding encounter ends.</p>
<p>Each roll's probability may depend on the choices before it. It is estimated with <b>hierarchical <a href="https://en.wikipedia.org/wiki/Dirichlet-multinomial_distribution" target="_blank" rel="noopener">Dirichlet</a> back-off</b>: the estimate for a full history is pulled toward the estimate for a shorter history, which is pulled toward the overall rate. How strongly is chosen from the data for each roll (<a href="https://en.wikipedia.org/wiki/Empirical_Bayes_method" target="_blank" rel="noopener">empirical Bayes</a>), so the solver does not chase noise in small groups. The best route is then found by <b><a href="https://en.wikipedia.org/wiki/Backward_induction" target="_blank" rel="noopener">backward induction</a></b>, for two goals: the chance of bonding the dragon on this attempt, and, for riders who die on purpose whenever a run goes wrong, the chance that the account eventually ends on that dragon rather than another (maximised by <a href="https://en.wikipedia.org/wiki/Fractional_programming" target="_blank" rel="noopener">Dinkelbach iteration</a>). Ranges come from 200 posterior draws; "stays best in N%" is how often the recommended choice is still best across those draws.</p>
<p>Encounter outcomes use only <b>genuine attempts</b>: runs where the rider wanted that colour, any dragon, or said they would not seek Malek. The two summary cards on The Odds use the same rule in reverse: runs where the rider died on purpose at an encounter they did not want are left out, so they describe cadets who went into the valley and either bonded or died. The "low-bias" numbers use only bulk logs and form runs from riders who were not chasing a rare dragon.</p>
<p><b>Starting from a place.</b> Clicking a place on the map before choosing a dragon shows your chance of each dragon <i>from there on</i>. Choices before that place are the ones that lead to it (or the solver's best, where several do); rolls before it are averaged over the outcomes that can still reach it, weighted by how often they happen and by survival. From the place onward the solver plays the best route for each dragon. A dragon is "not reachable from here" when no logged run went from that place to it. Clicking the bully fight means you stepped in to help: the chances assume your best first move and include the risk of dying in the fight. The move matters: about 3 in 10 riders who charged straight in were killed, against almost none who paused to assess. Several choices made at one place (as at the bully fight) share one diamond on the map, which opens a small card with each choice in order. For Orange and Brown, the Greens rescue is used only when their own meadow is out of reach.</p>
<p><b>Choices that are not modelled yet.</b> The answers you give at the bonding encounters themselves (for example which way to turn for the two Greens, or when to jump onto the Red) are not recorded by the community form, so every encounter uses its average bond chance. Ken's bot records every option it picks, so these can be added once enough bot runs come in. Letting the Red pass is rarely logged on its own; its chance is taken from the two Greens' encounter, which has plenty of data. Reactions to the first dragon use the form's categories, and only those logged at least 20 times for that dragon are offered. On the map, a choice you make holds for every route to that dragon, and routes it rules out are hidden.</p>
</div>
<div class="mpanel method" role="tabpanel" id="mt-6-panel" aria-labelledby="mt-6" hidden>
<h3>Missing answers</h3>