Route planner: the solver's options and odds drawn on the valley map

- New "Route Planner" tab: pick a dragon colour, a goal (only this dragon /
  best odds this run) and a data sample. The solver runs in the browser from
  policy.json and walks the valley: every decision shows each option's
  chance of bonding the colour (with the best play afterwards) and of
  reaching an encounter alive; every roll shows its probabilities; deaths
  show where they happen; "stays best in N% of re-runs" and "no clear
  winner" flag noisy recommendations. Click any option on the map or in the
  list to explore another branch.
- solver.js: values now carry P(reaching an encounter alive); advisor.step()
  gives the planner the next decision, roll or outcome at any history.
- valley.js shares its painting with the planner.
- Fix: route-map target chips no longer capture clicks on other chip rows.
- Pages build gets a doctype and charset.

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-01 22:50:23 +00:00
co-authored by Claude Opus 5.5
parent d2ffb84b5e
commit bdf66afabc
7 changed files with 435 additions and 12 deletions
+8
View File
@@ -12,6 +12,14 @@ const copy = (from, to) => {
fs.rmSync(out, { recursive: true, force: true });
for (const f of fs.readdirSync(path.join(root, "apps/atlas"))) copy(`apps/atlas/${f}`, f);
// The page is written as an Artifact body (the artifact host adds the document skeleton). For GitHub Pages and
// local serving, give it its own doctype, charset and viewport.
{
const p = path.join(out, "index.html");
const html = fs.readFileSync(p, "utf8");
if (!/^\s*<!doctype/i.test(html))
fs.writeFileSync(p, `<!doctype html>\n<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n${html}`);
}
copy("packages/core/src/engine.js", "engine.js");
copy("packages/core/src/graph.js", "graph.js");
copy("packages/core/src/solver.js", "solver.js");