# The threshing as a game tree: every choice a rider makes (decisions), every roll of the dice (chance events), # and every bonding encounter, in the game's own order. # # This file is the single source of truth for the route model. core/atlas/solver.py builds the decision tree from # it, and the route advisor used by the site and Ken's bot reads the same file (published as game.json). # Adding a choice to the game means adding it here (plus, if the form records it, how in core/atlas/model.py). version: 1 # Colours in the order the route model reports them colours: [Red, Orange, Brown, Green, Blue, Black] # ---------------------------------------------------------------- givens: what a run starts with # Known before the first choice; neither decided nor rolled. A roll can depend on a given by naming it in its # context. The route model solves the game once per value; `default` is the one used when nothing is said. givens: attempt: label: Attempt # from the run's attempt number (attempt_group in data/public/runs_clean.csv) values: [First attempt, Later attempt] default: Later attempt # ---------------------------------------------------------------- decisions: the rider's choices # options: every option the game offers, in a fixed order (ties go to the first). Options seen fewer than # min_support times in the data are not recommended, except where `always_offered` says so. decisions: company: { label: Company, options: [Alone, 1 Squadmate, 2 Squadmates] } leave: { label: Your squadmates, options: [Stay together, Leave them] } direction: { label: First direction, options: [East, West, Center] } react: label: Facing the first dragon # the form's categories; which ones each dragon offers is learned per first dragon (support key react:) options: [Hold still, Respect / face it, Retreat / run, Hide, Weapon, Meet its gaze, Protect squadmate] support_by: fs scream: { label: The scream, options: [Investigate the scream, Keep walking] } clearing: { label: The clearing (your squadmate vs two bullies), options: [Help your squadmate, Walk away] } fight: { label: "The fight: your first move", options: [Pause to assess, Charge the smaller cadet, Charge between the bigger cadet and your squadmate] } dagger: { label: The smaller cadet's dagger, options: [Engage the smaller cadet, Charge the bigger cadet anyway] } fate: { label: The bullies' fate, options: [Killed the bullies yourself, Squadmate's revenge, Left bullies to the dragons] } wounded: { label: The wounded cadet, options: [Tourniquet, Left injured cadet, Took their weapons] } post: { label: Fork in the road, options: [Forest, West, East] } hour: { label: After an hour, options: [Tree, Valley] } descend: { label: Climb down, options: [Quickly (Red), Slowly (two Greens)] } red: label: The Red below the tree options: [Jump onto the Red, Let it pass (two Greens)] # rarely logged on its own, but letting it pass leads to the two Greens' encounter, which has plenty of data always_offered: true valley: { label: Valley centre, options: [Face the Red, Pass the Red (meadow)] } encounter: { label: Bonding encounter, options: [Attempt the bond, Die on purpose], always_offered: true } # the whole cadet encounter as one answer (how the community form records it) cadet: label: Cadet encounter options: [Killed the bullies yourself, Squadmate's revenge, Left bullies to the dragons, Tourniquet, Left injured cadet, Took their weapons, Left them to it] summary_only: true min_support: 20 # ---------------------------------------------------------------- chance events: the game's rolls # outcomes: in a fixed order. context: the earlier steps the odds may depend on, most important first; the # estimate for a full context is shrunk toward the estimate for a shorter one (hierarchical Dirichlet back-off, # strength learned from the data). distinct: the first N context steps are not pooled at all: each of their values # is its own roll (only a token prior of one run ties it to the rest). requires: earlier choices without which the # roll always comes out as `otherwise` (a gate); runs that did not make them say nothing about the roll and are # not counted. chance: fs: { label: First dragon, outcomes: [Red, Brown, Green, Orange], context: [direction, company, left] } # rolls that can kill you: risk_label names the danger when the advisor reports it dieSight: { label: Survive the first dragon, outcomes: [die, live], context: [fs, direction, company, left, react], risk_label: Killed at the first sighting } dieCombat: { label: Survive the fight, outcomes: [die, live], context: [fight, dagger, fs, direction], risk_label: Killed in the fight } dieHour: { label: Survive the hour, outcomes: [die, live], context: [cadet, post], risk_label: Killed before the hour } shadow: label: Shadow at the tree outcomes: ["yes", "no"] # The shadow is close to a first-attempt event (November 2026, form submissions, gated tree runs: 69 shadows in # 748 first attempts, 7 in 1,995 later ones, the same in every week), so first and later attempts are two # different rolls. Routes are then pooled within each. context: [attempt, cadet, post, fs, direction, company] distinct: 1 # the "Black Dragon Gates" of the community route PDF (November 2026). The runs agree: in the spreadsheet, # 78 shadows in 4199 tree runs that investigated and helped, 2 (both form submissions) in 646 that did not. requires: { scream: Investigate the scream, clearing: Help your squadmate } otherwise: "no" shadowColour: { label: Shadow dragon, outcomes: [Black, Blue], context: [] } meadow: { label: Meadow dragon, outcomes: [Orange, Brown, Blue], context: [cadet, post, fs, direction, company] } # Bonding encounters: where each colour can be bonded. A run can only bond the encounter's own colour, except at # the two Greens, where an Orange or a Brown can swoop in (`also`). A recorded bond with any other colour is a # data-entry error and is not counted. encounters: valley-Red: { label: The valley Red, colour: Red } tree-Red: { label: The Red below the tree, colour: Red } tree-Greens: { label: The two Greens, colour: Green, also: [Orange, Brown] } meadow-Orange: { label: The meadow Orange, colour: Orange } meadow-Brown: { label: The meadow Brown, colour: Brown } meadow-Blue: { label: The meadow Blue, colour: Blue } shadow-Blue: { label: The Blue at the redwood, colour: Blue } shadow-Black: { label: The Black (the shadow), colour: Black } encounter_outcomes: [burn, Red, Orange, Brown, Green, Blue, Black] by_colour: Red: [valley-Red, tree-Red] Orange: [meadow-Orange, tree-Greens] Brown: [meadow-Brown, tree-Greens] Green: [tree-Greens] Blue: [meadow-Blue, shadow-Blue] Black: [shadow-Black] # ---------------------------------------------------------------- the flow of a run # Each step is a decision, a chance event or an encounter, keyed by the history so far (the "state"). # After an option or outcome, `then` says what happens: `set` adds to the state ($ = the option or outcome just # taken), `keep` / `drop` remove steps nothing later depends on, `go` names the next step, `end` finishes the run # (with a death, the value is zero). `default` covers every option without its own entry. start: company steps: company: decision: company then: Alone: { set: { company: $, left: (alone) }, go: direction } default: { set: { company: $ }, go: leave } leave: decision: leave then: { default: { set: { left: $ }, go: direction } } direction: decision: direction then: { default: { set: { direction: $ }, go: first_dragon } } first_dragon: chance: fs then: { default: { set: { fs: $ }, go: react } } react: decision: react then: { default: { set: { react: $ }, go: survive_sighting } } survive_sighting: chance: dieSight then: die: { end: incinerated at the first sighting } # leaving your squadmates and your reaction only matter at the first dragon live: { keep: [company, direction, fs], go: scream } scream: decision: scream then: Keep walking: { set: { scream: $ }, go: wounded } Investigate the scream: { set: { scream: $ }, go: clearing } wounded: decision: wounded then: { default: { set: { cadet: $, post: (no fork) }, go: survive_hour } } clearing: decision: clearing then: Walk away: { set: { clearing: $, cadet: Left them to it, post: (no fork) }, go: survive_hour } Help your squadmate: { set: { clearing: $ }, go: fight } fight: decision: fight then: Pause to assess: { set: { fight: $ }, go: dagger } default: { set: { fight: $, dagger: (no dagger choice) }, go: survive_fight } dagger: decision: dagger then: { default: { set: { dagger: $ }, go: survive_fight } } survive_fight: chance: dieCombat then: die: { end: killed in the fight } live: { go: fate } fate: decision: fate # the fight's moves only matter for surviving it then: { default: { drop: [fight, dagger], set: { cadet: $ }, go: post } } post: decision: post then: { default: { set: { post: $ }, go: survive_hour } } survive_hour: chance: dieHour then: die: { end: incinerated } live: { go: hour } hour: decision: hour then: Tree: { set: { hour: $ }, go: shadow } Valley: { set: { hour: $ }, go: valley } shadow: chance: shadow then: "yes": { go: shadow_colour } "no": { set: { shadow: "no" }, go: descend } shadow_colour: chance: shadowColour then: { default: { set: { shadow: "yes" }, encounter: "shadow-$" } } descend: decision: descend then: Quickly (Red): { set: { descend: $ }, go: red } Slowly (two Greens): { set: { descend: $ }, encounter: tree-Greens } red: decision: red then: Jump onto the Red: { set: { red: $ }, encounter: tree-Red } Let it pass (two Greens): { set: { red: $ }, encounter: tree-Greens } valley: decision: valley then: Face the Red: { set: { valley: $ }, encounter: valley-Red } Pass the Red (meadow): { set: { valley: $ }, go: meadow } meadow: chance: meadow then: { default: { set: { meadow: $ }, encounter: "meadow-$" } } # ---------------------------------------------------------------- how the community form's answers map onto the game # (used to count how often each option was taken and how each roll came out; see core/atlas/model.py) from_form: fight: "Assess the situation": Pause to assess "Even the numbers (smaller cadet)": Charge the smaller cadet "Put yourself in the middle (bigger cadet)": Charge between the bigger cadet and your squadmate dagger: "Engage the smaller cadet": Engage the smaller cadet "Daggers or not (protect squadmate)": Charge the bigger cadet anyway # cadet resolutions on each side of the scream helped: [Killed the bullies yourself, Squadmate's revenge, Left bullies to the dragons] ignored: [Tourniquet, Left injured cadet, Took their weapons] # a rider's stated goal that means "chasing a rare dragon" rare_goals: [Blue, Black, Blue or Black] # ---------------------------------------------------------------- the bot: which on-screen text is which option # Regular expressions over the option text, lower-cased with punctuation removed (see core/graph.js norm()). # recommendOption() in core/solver.js uses these to point the bot at the recommended option on its screen. bot_text: company: { Alone: "^enter the valley alone", "1 Squadmate": "^enter the valley with one", "2 Squadmates": "^enter the valley with two" } direction: { East: "^head east", West: "^head west", Center: "^head toward the center of the forest" } react: { Hold still: "hold still", Respect / face it: "in respect|turn to face it", Retreat / run: "^run and hope", Hide: "^hide", Meet its gaze: "meeting its gaze" } scream: { Investigate the scream: "^investigate the scream", Keep walking: "^keep walking" } clearing: { Help your squadmate: "^help your squadmate", Walk away: "^play it safe and leave them" } fight: { Pause to assess: "^pause to assess", Charge the smaller cadet: "^charge the other cadet", Charge between the bigger cadet and your squadmate: "^unsheathe your weapon" } dagger: { Engage the smaller cadet: "^engage the smaller cadet", Charge the bigger cadet anyway: "^daggers or not" } fate: { Killed the bullies yourself: "^end the lives of the bullies", Squadmate's revenge: "^allow your squadmate to exact", Left bullies to the dragons: "^leave the bullies alive" } wounded: { Tourniquet: "tourniquet", Left injured cadet: "leave (them|him|her) to die", Took their weapons: "take (their|his|her) weapons?" } post: { East: "^walk toward the east", West: "^walk toward the west", Forest: "^walk farther into the forest" } hour: { Valley: "^continue toward the center of the valley", Tree: "^find the tallest tree" } descend: { Quickly (Red): "^descend quickly", Slowly (two Greens): "^climb down slowly" } red: { Jump onto the Red: "^jump", Let it pass (two Greens): "^reds are too hot tempered" }