Polish: full-width text, links and bold, methods tabs, readable map choices
- Prose no longer stops at ~70 characters; it uses its column's full width. - Sources linked (responses sheet, route PDF, register, megathreads, Reddit users, Dragonkind, the repo) and statistical methods linked to their references; key terms and numbers in bold. - Data & Methods: the seven method sections are now tabs (arrow keys work). - Valley map: when a choice point is opened, each option's chance sits under its own labelled place and overlapping labels are pushed apart; small choice points can label above themselves. Checked: no overlapping text for any dragon and any opened choice. - Register cards: the age sits inside the arch; all-caps names shown normally. 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
7366af2f7d
commit
99f60282ed
+32
-5
@@ -190,8 +190,11 @@
|
|||||||
};
|
};
|
||||||
// label text is always dark ink (light dragon colours like Orange are unreadable as text on paper);
|
// label text is always dark ink (light dragon colours like Orange are unreadable as text on paper);
|
||||||
// the dragon's colour goes on the border instead
|
// the dragon's colour goes on the border instead
|
||||||
function pill(g, x, y, text, { ink = PAPER.ink, edge = null, strong = false, bg = PAPER.halo } = {}) {
|
let pills = []; // every label drawn this render, so overlapping ones can be pushed apart afterwards
|
||||||
|
function pill(g0, x, y, text, { ink = PAPER.ink, edge = null, strong = false, bg = PAPER.halo } = {}) {
|
||||||
const w = 10 + text.length * (strong ? 7.2 : 6.4), h = strong ? 20 : 17;
|
const w = 10 + text.length * (strong ? 7.2 : 6.4), h = strong ? 20 : 17;
|
||||||
|
const g = el("g", {}, g0);
|
||||||
|
pills.push({ g, x, y, w, h, dy: 0 });
|
||||||
el("rect", { x: x - w / 2, y: y - h / 2, width: w, height: h, rx: h / 2, fill: bg, "fill-opacity": 0.95, stroke: edge || ink, "stroke-opacity": edge ? 0.95 : 0.4, "stroke-width": edge ? 2 : 1 }, g);
|
el("rect", { x: x - w / 2, y: y - h / 2, width: w, height: h, rx: h / 2, fill: bg, "fill-opacity": 0.95, stroke: edge || ink, "stroke-opacity": edge ? 0.95 : 0.4, "stroke-width": edge ? 2 : 1 }, g);
|
||||||
el("text", { x, y: y + (strong ? 4.5 : 4), "text-anchor": "middle", "font-size": strong ? 12.5 : 11, "font-weight": strong ? 700 : 500, fill: ink, "font-family": "var(--font-data)" }, g).textContent = text;
|
el("text", { x, y: y + (strong ? 4.5 : 4), "text-anchor": "middle", "font-size": strong ? 12.5 : 11, "font-weight": strong ? 700 : 500, fill: ink, "font-family": "var(--font-data)" }, g).textContent = text;
|
||||||
}
|
}
|
||||||
@@ -272,8 +275,9 @@
|
|||||||
if (!P || P.kind === "dragon") return;
|
if (!P || P.kind === "dragon") return;
|
||||||
const strong = onRoute.has(id);
|
const strong = onRoute.has(id);
|
||||||
el("circle", { cx: P.x, cy: P.y, r: strong ? 6 : 4.5, fill: PAPER.ink, "fill-opacity": strong ? 0.95 : 0.7, stroke: PAPER.halo, "stroke-width": 2 }, g);
|
el("circle", { cx: P.x, cy: P.y, r: strong ? 6 : 4.5, fill: PAPER.ink, "fill-opacity": strong ? 0.95 : 0.7, stroke: PAPER.halo, "stroke-width": 2 }, g);
|
||||||
const right = (P.lab || "right") !== "left";
|
// small choice points sit close together, so they honour "above" as well as left/right
|
||||||
const t = el("text", { x: P.x + (right ? 10 : -10), y: P.y + 4, "text-anchor": right ? "start" : "end", "font-family": "var(--font-display)", "font-size": strong ? 14 : 13,
|
const pos = P.kind === "small" && P.lab === "above" ? "above" : (P.lab || "right") === "left" ? "left" : "right";
|
||||||
|
const t = el("text", { x: P.x + (pos === "right" ? 10 : pos === "left" ? -10 : 0), y: P.y + (pos === "above" ? -10 : 4), "text-anchor": pos === "right" ? "start" : pos === "left" ? "end" : "middle", "font-family": "var(--font-display)", "font-size": strong ? 14 : 13,
|
||||||
fill: PAPER.ink, "fill-opacity": strong ? 1 : 0.8, "paint-order": "stroke", stroke: PAPER.halo, "stroke-width": 3.5, "stroke-linejoin": "round" }, g);
|
fill: PAPER.ink, "fill-opacity": strong ? 1 : 0.8, "paint-order": "stroke", stroke: PAPER.halo, "stroke-width": 3.5, "stroke-linejoin": "round" }, g);
|
||||||
t.textContent = LANDMARK_NAME[id] || P.name;
|
t.textContent = LANDMARK_NAME[id] || P.name;
|
||||||
});
|
});
|
||||||
@@ -345,8 +349,9 @@
|
|||||||
if (!pid || !L[pid] || v === m.s.taken) return;
|
if (!pid || !L[pid] || v === m.s.taken) return;
|
||||||
const B = L[pid], rel2 = val.pX / best2;
|
const B = L[pid], rel2 = val.pX / best2;
|
||||||
const p = el("path", { d: curve(P, B, 0.1), fill: "none", stroke: tc, "stroke-width": 2 + 4 * rel2, "stroke-opacity": 0.35 + 0.5 * rel2, "stroke-dasharray": "6 6", "stroke-linecap": "round", class: "ex-alt", tabindex: 0, role: "button", "aria-label": `${v}: ${pct(val.pX)}. Take this instead.` }, gLab);
|
const p = el("path", { d: curve(P, B, 0.1), fill: "none", stroke: tc, "stroke-width": 2 + 4 * rel2, "stroke-opacity": 0.35 + 0.5 * rel2, "stroke-dasharray": "6 6", "stroke-linecap": "round", class: "ex-alt", tabindex: 0, role: "button", "aria-label": `${v}: ${pct(val.pX)}. Take this instead.` }, gLab);
|
||||||
const m2 = mid(P, B, 0.72, 0.1);
|
// the option's own place is labelled on the map, so its chance sits just under that place
|
||||||
pill(gLab, m2.x, m2.y, `${v.length > 18 ? v.slice(0, 17) + "…" : v} ${pct(val.pX)}`);
|
onRoute.add(pid);
|
||||||
|
pill(gLab, B.x, B.y + 17, pct(val.pX));
|
||||||
const pick = () => choose(m.s.var, v);
|
const pick = () => choose(m.s.var, v);
|
||||||
p.addEventListener("click", pick);
|
p.addEventListener("click", pick);
|
||||||
p.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); pick(); } });
|
p.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); pick(); } });
|
||||||
@@ -357,6 +362,26 @@
|
|||||||
return onRoute;
|
return onRoute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Push overlapping labels apart vertically (a few relaxation passes), so no two chances sit on top of each other. */
|
||||||
|
function spreadPills() {
|
||||||
|
const gap = 3;
|
||||||
|
for (let pass = 0; pass < 30; pass++) {
|
||||||
|
let moved = false;
|
||||||
|
for (let i = 0; i < pills.length; i++) for (let j = i + 1; j < pills.length; j++) {
|
||||||
|
const a = pills[i], b = pills[j];
|
||||||
|
const ox = Math.min(a.x + a.w / 2, b.x + b.w / 2) - Math.max(a.x - a.w / 2, b.x - b.w / 2);
|
||||||
|
const ay = a.y + a.dy, by = b.y + b.dy;
|
||||||
|
const oy = Math.min(ay + a.h / 2, by + b.h / 2) - Math.max(ay - a.h / 2, by - b.h / 2);
|
||||||
|
if (ox > 0 && oy > -gap) {
|
||||||
|
const push = (oy + gap) / 2, down = by >= ay ? 1 : -1;
|
||||||
|
a.dy -= push * down; b.dy += push * down; moved = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!moved) break;
|
||||||
|
}
|
||||||
|
pills.forEach((p) => { if (p.dy) p.g.setAttribute("transform", `translate(0 ${p.dy.toFixed(1)})`); });
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------- tooltip ---------- */
|
/* ---------- tooltip ---------- */
|
||||||
function showTip(e, html) { const t = $("#ex-tip"); t.innerHTML = html; t.hidden = false; moveTip(e); }
|
function showTip(e, html) { const t = $("#ex-tip"); t.innerHTML = html; t.hidden = false; moveTip(e); }
|
||||||
function moveTip(e) {
|
function moveTip(e) {
|
||||||
@@ -500,7 +525,9 @@
|
|||||||
return r;
|
return r;
|
||||||
}).sort((a, b) => b.value.x - a.value.x);
|
}).sort((a, b) => b.value.x - a.value.x);
|
||||||
if (!st.focus || !routes.some((r) => r.enc === st.focus)) st.focus = routes[0].enc;
|
if (!st.focus || !routes.some((r) => r.enc === st.focus)) st.focus = routes[0].enc;
|
||||||
|
pills = [];
|
||||||
onRoute = drawRoutes(gRoute, gLab, routes);
|
onRoute = drawRoutes(gRoute, gLab, routes);
|
||||||
|
spreadPills();
|
||||||
}
|
}
|
||||||
drawLandmarks(gLand, onRoute);
|
drawLandmarks(gLand, onRoute);
|
||||||
drawScenery(gScene, onRoute);
|
drawScenery(gScene, onRoute);
|
||||||
|
|||||||
+39
-17
@@ -229,7 +229,7 @@ section h2 { font-family: var(--font-crest); letter-spacing: 0.03em; }
|
|||||||
.dcard svg { width: 64px; height: 64px; }
|
.dcard svg { width: 64px; height: 64px; }
|
||||||
.dcard .nm { font-family: var(--font-crest); font-weight: 700; font-size: 1rem; letter-spacing: 0.03em; overflow-wrap: anywhere; }
|
.dcard .nm { font-family: var(--font-crest); font-weight: 700; font-size: 1rem; letter-spacing: 0.03em; overflow-wrap: anywhere; }
|
||||||
.dcard .meta { font-size: 12px; color: var(--muted); line-height: 1.35; }
|
.dcard .meta { font-size: 12px; color: var(--muted); line-height: 1.35; }
|
||||||
.dcard .age { position: absolute; top: 8px; right: 10px; font-family: var(--font-data); font-size: 11px; color: var(--muted); }
|
.dcard .age { position: absolute; top: 34px; right: 16px; font-family: var(--font-data); font-size: 11px; color: var(--muted); }
|
||||||
.viewtoggle { display: inline-flex; }
|
.viewtoggle { display: inline-flex; }
|
||||||
|
|
||||||
/* ---------- dusk & gold theme layer ---------- */
|
/* ---------- dusk & gold theme layer ---------- */
|
||||||
@@ -387,6 +387,18 @@ footer { border-top-color: var(--line); }
|
|||||||
.ladder li i { display: block; height: 10px; border-radius: 4px; width: var(--w); background: var(--c); }
|
.ladder li i { display: block; height: 10px; border-radius: 4px; width: var(--w); background: var(--c); }
|
||||||
.ladder li b { font-family: var(--font-data); text-align: right; }
|
.ladder li b { font-family: var(--font-data); text-align: right; }
|
||||||
.combo { grid-template-columns: minmax(0, 1fr); }
|
.combo { grid-template-columns: minmax(0, 1fr); }
|
||||||
|
|
||||||
|
/* prose uses the full width of its column (it looked cramped on wide screens) */
|
||||||
|
p, .lede, .lore, .method p, .method li { max-width: none; }
|
||||||
|
footer p + p { margin-top: 8px; }
|
||||||
|
a { color: var(--accent); text-underline-offset: 2px; }
|
||||||
|
/* methods as tabs */
|
||||||
|
.mtabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
|
||||||
|
.mtab { border-radius: 999px; padding: 7px 14px; font-size: .7rem; background: transparent; }
|
||||||
|
.mtab[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 22%, var(--raised)); border-color: var(--accent); color: var(--ink); }
|
||||||
|
.mpanel { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
|
||||||
|
.mpanel[hidden] { display: none; }
|
||||||
|
.mpanel h3 { margin: 0; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<header class="hero">
|
<header class="hero">
|
||||||
@@ -434,7 +446,7 @@ footer { border-top-color: var(--line); }
|
|||||||
<h2 id="h-journey">How a run unfolds</h2>
|
<h2 id="h-journey">How a run unfolds</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="journey" id="journey"></div>
|
<div class="journey" id="journey"></div>
|
||||||
<p class="lore">In the books, first-years who survive to Threshing walk into a valley of unbonded dragons, and the dragons do the choosing. The Dragonkind site recreates that: every choice can end with you incinerated, and the author has said there is a 10% chance of that no matter what you pick.</p>
|
<p class="lore">In the books, first-years who survive to Threshing walk into a valley of unbonded dragons, and the dragons do the choosing. The <a href="https://dragonkind.com" target="_blank" rel="noopener">Dragonkind</a> site recreates that: every choice can end with you incinerated, and the author has said there is a 10% chance of that no matter what you pick.</p>
|
||||||
<div class="cta"><button type="button" class="primary" data-go="valley">Walk the valley map</button><button type="button" data-go="deep">Dig into the statistics</button><button type="button" data-go="dragons">Meet the bonded dragons</button></div>
|
<div class="cta"><button type="button" class="primary" data-go="valley">Walk the valley map</button><button type="button" data-go="deep">Dig into the statistics</button><button type="button" data-go="dragons">Meet the bonded dragons</button></div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@@ -596,10 +608,10 @@ footer { border-top-color: var(--line); }
|
|||||||
</section>
|
</section>
|
||||||
<section id="methods" aria-labelledby="h-methods" class="method">
|
<section id="methods" aria-labelledby="h-methods" class="method">
|
||||||
<div class="section-head"><span class="eyebrow">How every number is made</span><h2 id="h-methods">Methods</h2></div>
|
<div class="section-head"><span class="eyebrow">How every number is made</span><h2 id="h-methods">Methods</h2></div>
|
||||||
<div class="grid2">
|
<div class="mtabs" role="tablist" aria-label="Methods"><button type="button" role="tab" class="mtab" id="mt-0" aria-controls="mt-0-panel" aria-selected="true" tabindex="0">1. Runs</button><button type="button" role="tab" class="mtab" id="mt-1" aria-controls="mt-1-panel" aria-selected="false" tabindex="-1">2. Rates</button><button type="button" role="tab" class="mtab" id="mt-2" aria-controls="mt-2-panel" aria-selected="false" tabindex="-1">3. Comparisons</button><button type="button" role="tab" class="mtab" id="mt-3" aria-controls="mt-3-panel" aria-selected="false" tabindex="-1">4. Reporting bias</button><button type="button" role="tab" class="mtab" id="mt-4" aria-controls="mt-4-panel" aria-selected="false" tabindex="-1">5. Limits</button><button type="button" role="tab" class="mtab" id="mt-5" aria-controls="mt-5-panel" aria-selected="false" tabindex="-1">6. Best routes</button><button type="button" role="tab" class="mtab" id="mt-6" aria-controls="mt-6-panel" aria-selected="false" tabindex="-1">Missing answers</button></div>
|
||||||
<div class="method">
|
<div class="mpanel method" role="tabpanel" id="mt-0-panel" aria-labelledby="mt-0">
|
||||||
<h3>1. From form answers to runs</h3>
|
<h3>1. From form answers to runs</h3>
|
||||||
<p>Each row of the "Threshing Routes" form (and each row pasted in from players' own logs) is one threshing run. The page reads the raw export and codes every row with the same fixed rules, which are visible in <code>engine.js</code>:</p>
|
<p>Each row of the <a href="https://docs.google.com/spreadsheets/d/1gnw1AdRg1XT4JsOfRM6QTA0jSaS3n9ZF-rPWnYewzv0" target="_blank" rel="noopener">"Threshing Routes" form</a> (and each row pasted in from players' own logs) is one threshing run. The page reads the raw export and codes every row with the same fixed rules, which are visible in <code>engine.js</code>:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Source.</b> Rows with a real timestamp are form submissions. Rows labelled "Data Import", "Manual Upload" or "Historical import" were bulk-pasted from players' own run logs and are called <i>bulk logs</i> here.</li>
|
<li><b>Source.</b> Rows with a real timestamp are form submissions. Rows labelled "Data Import", "Manual Upload" or "Historical import" were bulk-pasted from players' own run logs and are called <i>bulk logs</i> here.</li>
|
||||||
<li><b>Cadet encounter.</b> Split into the scream choice (help, investigate and leave, or ignore) and its resolution (killed the bullies, squadmate's revenge, left them to the dragons, tourniquet, left the cadet, took their weapons). The fork in the road only exists after helping, so other branches are coded "(no fork)".</li>
|
<li><b>Cadet encounter.</b> Split into the scream choice (help, investigate and leave, or ignore) and its resolution (killed the bullies, squadmate's revenge, left them to the dragons, tourniquet, left the cadet, took their weapons). The fork in the road only exists after helping, so other branches are coded "(no fork)".</li>
|
||||||
@@ -607,15 +619,17 @@ footer { border-top-color: var(--line); }
|
|||||||
<li><b>Outcome.</b> Bonded to the one dragon marked "Bonded!". Otherwise incinerated by the last dragon marked "Incinerated" in encounter order, or died before the hour. "Saved by another" on the Greens plus a bonded Orange or Brown counts as a rescue bond.</li>
|
<li><b>Outcome.</b> Bonded to the one dragon marked "Bonded!". Otherwise incinerated by the last dragon marked "Incinerated" in encounter order, or died before the hour. "Saved by another" on the Greens plus a bonded Orange or Brown counts as a rescue bond.</li>
|
||||||
<li><b>Flags.</b> Rows are flagged, not deleted, when answers contradict each other: several directions or wings, Greens in the valley, two bonds, or a first sighting outside the documented pool. You can drop flagged rows with the checkbox on Deep Dive's route map.</li>
|
<li><b>Flags.</b> Rows are flagged, not deleted, when answers contradict each other: several directions or wings, Greens in the valley, two bonds, or a first sighting outside the documented pool. You can drop flagged rows with the checkbox on Deep Dive's route map.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="mpanel method" role="tabpanel" id="mt-1-panel" aria-labelledby="mt-1" hidden>
|
||||||
<h3>2. Rates and their uncertainty</h3>
|
<h3>2. Rates and their uncertainty</h3>
|
||||||
<p>A rate is k events out of n runs that could have had that event. The denominator matters. The meadow Blue rate divides by runs that reached the meadow, not by all runs. Intervals are 95% Wilson score intervals, which behave well for small n and for rates near 0%:</p>
|
<p>A rate is k events out of n runs that could have had that event. The denominator matters. The meadow Blue rate divides by runs that reached the meadow, not by all runs. Intervals are <b>95% <a href="https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval" target="_blank" rel="noopener">Wilson score intervals</a></b>, which behave well for small n and for rates near 0%:</p>
|
||||||
<div class="formula">p̂ = k / n, z = 1.96
|
<div class="formula">p̂ = k / n, z = 1.96
|
||||||
centre = (p̂ + z²/2n) / (1 + z²/n)
|
centre = (p̂ + z²/2n) / (1 + z²/n)
|
||||||
half = z·√(p̂(1−p̂)/n + z²/4n²) / (1 + z²/n)
|
half = z·√(p̂(1−p̂)/n + z²/4n²) / (1 + z²/n)
|
||||||
CI = centre ± half</div>
|
CI = centre ± half</div>
|
||||||
<p>With 0 events in n runs, the upper end is still informative. For example, 0 shadows in a few hundred bulk-log tree climbs still gives an upper bound near 1%.</p>
|
<p>With 0 events in n runs, the upper end is still informative. For example, 0 shadows in a few hundred bulk-log tree climbs still gives an upper bound near 1%.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="method">
|
<div class="mpanel method" role="tabpanel" id="mt-2-panel" aria-labelledby="mt-2" hidden>
|
||||||
<h3>3. Comparing choices</h3>
|
<h3>3. Comparing choices</h3>
|
||||||
<p>For one answer against the rest, the 2×2 table is [a b; c d] = [event, no event] × [this answer, other answers].</p>
|
<p>For one answer against the rest, the 2×2 table is [a b; c d] = [event, no event] × [this answer, other answers].</p>
|
||||||
<div class="formula">OR = (a·d) / (b·c)
|
<div class="formula">OR = (a·d) / (b·c)
|
||||||
@@ -623,34 +637,42 @@ CI = centre ± half</div>
|
|||||||
(0.5 is added to every cell when any cell is 0)
|
(0.5 is added to every cell when any cell is 0)
|
||||||
p = Fisher's exact test, two-sided
|
p = Fisher's exact test, two-sided
|
||||||
q = Benjamini–Hochberg: sort p, q(i) = min over j≥i of p(j)·m/j</div>
|
q = Benjamini–Hochberg: sort p, q(i) = min over j≥i of p(j)·m/j</div>
|
||||||
<p>An odds ratio of 2 means the odds of the outcome are twice as high with that answer. q-values control the false-discovery rate. With dozens of comparisons, some p < 0.05 results are expected by chance, so a "real" difference needs q < 0.05.</p>
|
<p>Comparisons use the <b><a href="https://en.wikipedia.org/wiki/Odds_ratio" target="_blank" rel="noopener">odds ratio</a></b>, <b><a href="https://en.wikipedia.org/wiki/Fisher%27s_exact_test" target="_blank" rel="noopener">Fisher's exact test</a></b> and <b><a href="https://en.wikipedia.org/wiki/False_discovery_rate#Benjamini%E2%80%93Hochberg_procedure" target="_blank" rel="noopener">Benjamini–Hochberg q-values</a></b>. An odds ratio of 2 means the odds of the outcome are twice as high with that answer. q-values control the false-discovery rate. With dozens of comparisons, some p < 0.05 results are expected by chance, so a "real" difference needs q < 0.05.</p>
|
||||||
|
</div>
|
||||||
|
<div class="mpanel method" role="tabpanel" id="mt-3-panel" aria-labelledby="mt-3" hidden>
|
||||||
<h3>4. Adjusting for who reports what</h3>
|
<h3>4. Adjusting for who reports what</h3>
|
||||||
<p>Players chasing a Blue log runs where they saw a Blue far more often than other players do. Bulk loggers record every run, including dull ones. To separate route effects from reporting effects, the page fits a logistic regression with every route choice plus data source and chase goal:</p>
|
<p>Players chasing a rare dragon log runs where they saw a Blue far more often than other players do. Bulk loggers record every run, including dull ones. To separate route effects from reporting effects, the page fits a <b><a href="https://en.wikipedia.org/wiki/Logistic_regression" target="_blank" rel="noopener">logistic regression</a></b> with every route choice plus data source and chase goal:</p>
|
||||||
<div class="formula">logit P(event) = β₀ + Σ βⱼ·xⱼ (x = 0/1 indicators; reference = most common answer)
|
<div class="formula">logit P(event) = β₀ + Σ βⱼ·xⱼ (x = 0/1 indicators; reference = most common answer)
|
||||||
fitted by Newton–Raphson with a small ridge penalty λ = 1 on the slopes
|
fitted by Newton–Raphson with a small ridge penalty λ = 1 on the slopes
|
||||||
adjusted OR = exp(βⱼ), 95% CI = exp(βⱼ ± 1.96·SEⱼ)</div>
|
adjusted OR = exp(βⱼ), 95% CI = exp(βⱼ ± 1.96·SEⱼ)</div>
|
||||||
<p>The ridge penalty keeps estimates finite when an answer has 0 events. It shrinks extreme odds ratios slightly toward 1, which makes the model more cautious. Route rankings use the Mantel–Haenszel odds ratio across strata of data source and chase goal (bulk logs; form runs chasing Blue, Black, or "Blue or Black" on the newer form; everything else) for the same reason.</p>
|
<p>The <a href="https://en.wikipedia.org/wiki/Ridge_regression" target="_blank" rel="noopener">ridge penalty</a> keeps estimates finite when an answer has 0 events. It shrinks extreme odds ratios slightly toward 1, which makes the model more cautious. Route rankings use the <b><a href="https://en.wikipedia.org/wiki/Cochran%E2%80%93Mantel%E2%80%93Haenszel_statistics" target="_blank" rel="noopener">Mantel–Haenszel odds ratio</a></b> across strata of data source and chase goal (bulk logs; form runs chasing Blue, Black, or "Blue or Black" on the newer form; everything else) for the same reason.</p>
|
||||||
|
</div>
|
||||||
|
<div class="mpanel method" role="tabpanel" id="mt-4-panel" aria-labelledby="mt-4" hidden>
|
||||||
<h3>5. What this data cannot tell you</h3>
|
<h3>5. What this data cannot tell you</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>It is self-reported and self-selected. Runs worth bragging about are over-represented, and that inflates every rare-dragon rate. Bulk logs are the least selected rows.</li>
|
<li>It is self-reported and self-selected. Runs worth bragging about are over-represented, and that inflates every rare-dragon rate. Bulk logs are the least selected rows.</li>
|
||||||
<li>Runs are not independent. One player may log dozens of runs, and the form has no player ID, so intervals are somewhat too narrow.</li>
|
<li>Runs are not independent. One player may log dozens of runs, and the form has no player ID, so intervals are somewhat too narrow.</li>
|
||||||
<li>The form records mostly stage-level choices. The newer form asks how you reacted to the first dragon, but most riders answer "unsure", and it does not record the answers given inside a bonding encounter, so route claims that depend on those cannot be tested here.</li>
|
<li>The form records mostly stage-level choices. The newer form asks how you reacted to the first dragon, but most riders answer "unsure", and it does not record the answers given inside a bonding encounter, so route claims that depend on those cannot be tested here.</li>
|
||||||
<li>The form records dragons you <i>attempted</i>. A player who saw the Blue but chose the Orange would not record the Blue, so Blue sightings are slightly undercounted.</li>
|
<li>The form records dragons you <i>attempted</i>. A player who saw the Blue but chose the Orange would not record the Blue, so Blue sightings are slightly undercounted.</li>
|
||||||
<li>Step-by-step survival inside an encounter comes from the community PDF, which coded the free-text answers by hand. It is shown as published and cannot be recomputed here.</li>
|
<li>Step-by-step survival inside an encounter comes from the <a href="https://drive.google.com/file/d/17o72ehHsSPW4UdsKF-sXTxMLEuinWeEg/view" target="_blank" rel="noopener">community PDF</a>, which coded the free-text answers by hand. It is shown as published and cannot be recomputed here.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
<h3>6. Best routes, the valley map and The Odds</h3>
|
||||||
<p class="small">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, 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, direction, the cadet encounter, 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 class="small">Each roll's probability may depend on the choices before it. It is estimated with hierarchical Dirichlet back-off: 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 (empirical Bayes), so the solver does not chase noise in small groups. The best route is then found by backward induction, 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 Dinkelbach iteration). Ranges come from 200 posterior draws; "stays best in N%" is how often the recommended choice is still best across those draws.</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 class="small">Encounter outcomes use only genuine attempts: 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>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>
|
||||||
|
</div>
|
||||||
|
<div class="mpanel method" role="tabpanel" id="mt-6-panel" aria-labelledby="mt-6" hidden>
|
||||||
<h3>Missing answers</h3>
|
<h3>Missing answers</h3>
|
||||||
<p class="small">"Unsure", blank answers, conflicting answers and questions an older version of the form did not ask are treated as missing information, never as a choice. Each comparison uses the runs that answered that question; models use runs that answered every question in them (complete cases). "I've lost count" counts as a later attempt. The only exception is the chase goal used to adjust for reporting bias: runs from before that question existed stay in the models as their own adjustment group, but that group is not shown as a finding. The solver and the valley map ignore missing steps in the same way.</p>
|
<p>"Unsure", blank answers, conflicting answers and questions an older version of the form did not ask are treated as <b>missing information, never as a choice</b>. Each comparison uses the runs that answered that question; models use runs that answered every question in them (<a href="https://en.wikipedia.org/wiki/Listwise_deletion" target="_blank" rel="noopener">complete cases</a>). "I've lost count" counts as a later attempt. The only exception is the chase goal used to adjust for reporting bias: runs from before that question existed stay in the models as their own adjustment group, but that group is not shown as a finding. The solver and the valley map ignore missing steps in the same way.</p>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<footer><div class="wrap"><p>Data: the community "Threshing Routes" Google Form and spreadsheet compiled by u/ClumsyBadger, with percentages in the route PDF by u/ClumsyBadger, u/Old_Regular3018 and u/Smart_Trifle_2099. This is an unofficial fan analysis, not affiliated with the Dragonkind site or its authors. A 10% "chaos" chance of incineration on any choice has been described by the author, so no route guarantees a bond.</p></div></footer>
|
<footer><div class="wrap"><p><b>Data:</b> the community <a href="https://docs.google.com/spreadsheets/d/1gnw1AdRg1XT4JsOfRM6QTA0jSaS3n9ZF-rPWnYewzv0" target="_blank" rel="noopener">"Threshing Routes" responses</a> compiled by <a href="https://www.reddit.com/user/ClumsyBadger/" target="_blank" rel="noopener">u/ClumsyBadger</a>, with percentages in the <a href="https://drive.google.com/file/d/17o72ehHsSPW4UdsKF-sXTxMLEuinWeEg/view" target="_blank" rel="noopener">route PDF</a> by <a href="https://www.reddit.com/user/ClumsyBadger/" target="_blank" rel="noopener">u/ClumsyBadger</a>, <a href="https://www.reddit.com/user/Old_Regular3018/" target="_blank" rel="noopener">u/Old_Regular3018</a> and <a href="https://www.reddit.com/user/Smart_Trifle_2099/" target="_blank" rel="noopener">u/Smart_Trifle_2099</a>; the <a href="https://docs.google.com/spreadsheets/d/1KMiE9sec0l597Pzue1OhGYf07NF4howtQ_lPeqx7jXQ" target="_blank" rel="noopener">Unofficial Dragon Register</a>; and the r/fourthwing bonding megathreads (<a href="https://www.reddit.com/r/fourthwing/comments/1wvwfp9/" target="_blank" rel="noopener">Part 3</a>, <a href="https://www.reddit.com/r/fourthwing/comments/1wz5cnj/" target="_blank" rel="noopener">Part 4</a>). Code and data: <a href="https://github.com/ekcSchiano/threshing-atlas" target="_blank" rel="noopener">github.com/ekcSchiano/threshing-atlas</a> (MIT, data CC BY 4.0).</p>
|
||||||
|
<p><b>Unofficial fan analysis,</b> not affiliated with <a href="https://dragonkind.com" target="_blank" rel="noopener">Dragonkind</a> or its authors. A 10% "chaos" chance of incineration on any choice has been described by the author, so <b>no route guarantees a bond</b>.</p></div></footer>
|
||||||
<div id="tip" hidden></div>
|
<div id="tip" hidden></div>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
||||||
<script src="engine.js"></script>
|
<script src="engine.js"></script>
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
const items = raw.rows.map((r, i) => ({
|
const items = raw.rows.map((r, i) => ({
|
||||||
source: "Register form", source_url: null, submitted: str(r[C.timestamp]),
|
source: "Register form", source_url: null, submitted: str(r[C.timestamp]),
|
||||||
cadet: str(r[C.cadet]), wing: str(r[C.wing]), section: str(r[C.section]), squad: str(r[C.squad]),
|
cadet: str(r[C.cadet]), wing: str(r[C.wing]), section: str(r[C.section]), squad: str(r[C.squad]),
|
||||||
name: str(r[C.name]), lineage_raw: str(r[C.lineage]), colour: title(str(r[C.colour])), tail: tailOf(r[C.tail]),
|
// names typed in capitals ("RAERNUAL") are shown as names ("Raernual")
|
||||||
|
name: ((n) => (n && n.length > 1 && n === n.toUpperCase() ? n[0] + n.slice(1).toLowerCase() : n))(str(r[C.name])), lineage_raw: str(r[C.lineage]), colour: title(str(r[C.colour])), tail: tailOf(r[C.tail]),
|
||||||
sex: title(str(r[C.sex])), age: parseInt(r[C.age], 10), flags: [],
|
sex: title(str(r[C.sex])), age: parseInt(r[C.age], 10), flags: [],
|
||||||
}));
|
}));
|
||||||
(raw.extra || []).forEach((e) => items.push({
|
(raw.extra || []).forEach((e) => items.push({
|
||||||
|
|||||||
+16
-1
@@ -77,6 +77,21 @@
|
|||||||
const initial = tabOf(location.hash);
|
const initial = tabOf(location.hash);
|
||||||
showTab(initial || "valley", false, initial === "valley");
|
showTab(initial || "valley", false, initial === "valley");
|
||||||
|
|
||||||
|
// ------------------------------------------------------------ methods tabs (arrow keys move between them)
|
||||||
|
const mtabs = $$(".mtab");
|
||||||
|
const showM = (b, focus) => {
|
||||||
|
mtabs.forEach((t) => { const on = t === b; t.setAttribute("aria-selected", on); t.tabIndex = on ? 0 : -1; $("#" + t.getAttribute("aria-controls")).hidden = !on; });
|
||||||
|
if (focus) b.focus();
|
||||||
|
};
|
||||||
|
mtabs.forEach((b, i) => {
|
||||||
|
b.addEventListener("click", () => showM(b));
|
||||||
|
b.addEventListener("keydown", (e) => {
|
||||||
|
if (e.key !== "ArrowRight" && e.key !== "ArrowLeft") return;
|
||||||
|
e.preventDefault();
|
||||||
|
showM(mtabs[(i + (e.key === "ArrowRight" ? 1 : mtabs.length - 1)) % mtabs.length], true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// ------------------------------------------------------------ hero art (original, generic silhouettes)
|
// ------------------------------------------------------------ hero art (original, generic silhouettes)
|
||||||
function drawHero() {
|
function drawHero() {
|
||||||
const svg = $("#hero-art");
|
const svg = $("#hero-art");
|
||||||
@@ -149,7 +164,7 @@
|
|||||||
return `<a class="odd odd-colour" href="#valley/${c.toLowerCase()}" style="--c: var(${DV[c]})">${art(c)}
|
return `<a class="odd odd-colour" href="#valley/${c.toLowerCase()}" style="--c: var(${DV[c]})">${art(c)}
|
||||||
<span class="big">${p >= 0.5 ? pct(p) : `1 in ${oneIn(p)}`}</span><span class="what">${p >= 0.5 ? "of runs" : "runs"} end bonded to ${/^[AEIOU]/.test(c) ? "an" : "a"} ${c}, on the best route</span>
|
<span class="big">${p >= 0.5 ? pct(p) : `1 in ${oneIn(p)}`}</span><span class="what">${p >= 0.5 ? "of runs" : "runs"} end bonded to ${/^[AEIOU]/.test(c) ? "an" : "a"} ${c}, on the best route</span>
|
||||||
${dots(Math.round(p * 1000), 1000, cssVar(DV[c]))}
|
${dots(Math.round(p * 1000), 1000, cssVar(DV[c]))}
|
||||||
<span class="how">${pct(p, p < 0.1 ? 1 : 0)} per attempt (95% ${pct(lo, 1)}–${pct(hi, 1)}), from riders who logged every run${Math.abs(pAll - p) / p > 0.25 ? `; all form posts suggest ${pct(pAll, 1)}` : ""}. At ${ENC_LABEL[ENC_OF[c]]}, ${e.k} of ${e.n} genuine attempts bonded.</span>
|
<span class="how"><b>${pct(p, p < 0.1 ? 1 : 0)}</b> per attempt (95% ${pct(lo, 1)}–${pct(hi, 1)}), from riders who logged every run${Math.abs(pAll - p) / p > 0.25 ? `; all form posts suggest ${pct(pAll, 1)}` : ""}. At ${ENC_LABEL[ENC_OF[c]]}, <b>${e.k} of ${e.n}</b> genuine attempts bonded.</span>
|
||||||
<span class="go">See the route →</span></a>`;
|
<span class="go">See the route →</span></a>`;
|
||||||
}).join("");
|
}).join("");
|
||||||
const meadowAlpha = all.model.alphas.meadow, shadowAlpha = all.model.alphas.shadow;
|
const meadowAlpha = all.model.alphas.meadow, shadowAlpha = all.model.alphas.shadow;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
"res:Left bullies to the dragons": { x: 404, y: 410, name: "Dragons decide", kind: "small", lab: "right", desc: "Leave the bullies to the dragons." },
|
"res:Left bullies to the dragons": { x: 404, y: 410, name: "Dragons decide", kind: "small", lab: "right", desc: "Leave the bullies to the dragons." },
|
||||||
away: { x: 500, y: 440, name: "Walked away", kind: "small", lab: "right", desc: "Investigated the scream, then left them to it." },
|
away: { x: 500, y: 440, name: "Walked away", kind: "small", lab: "right", desc: "Investigated the scream, then left them to it." },
|
||||||
wounded: { x: 684, y: 462, name: "The wounded cadet", kind: "way", lab: "right", desc: "Ignore the scream and you trip over a cadet missing a leg." },
|
wounded: { x: 684, y: 462, name: "The wounded cadet", kind: "way", lab: "right", desc: "Ignore the scream and you trip over a cadet missing a leg." },
|
||||||
"res:Tourniquet": { x: 600, y: 410, name: "Tourniquet", kind: "small", lab: "left", desc: "Use their belt as a tourniquet." },
|
"res:Tourniquet": { x: 616, y: 410, name: "Tourniquet", kind: "small", lab: "left", desc: "Use their belt as a tourniquet." },
|
||||||
"res:Left injured cadet": { x: 690, y: 398, name: "Leave them", kind: "small", lab: "above", desc: "Leave them to die." },
|
"res:Left injured cadet": { x: 690, y: 398, name: "Leave them", kind: "small", lab: "above", desc: "Leave them to die." },
|
||||||
"res:Took their weapons": { x: 780, y: 410, name: "Take their weapons", kind: "small", lab: "right", desc: "Take their weapons and go." },
|
"res:Took their weapons": { x: 780, y: 410, name: "Take their weapons", kind: "small", lab: "right", desc: "Take their weapons and go." },
|
||||||
"fork:West": { x: 196, y: 336, name: "West fork", kind: "way", lab: "left", desc: "After the fight, the path splits: west." },
|
"fork:West": { x: 196, y: 336, name: "West fork", kind: "way", lab: "left", desc: "After the fight, the path splits: west." },
|
||||||
|
|||||||
Reference in New Issue
Block a user