- packages/core/src/solver.js: decision tree with perfect recall over the community form's choices; chance events (first dragon, deaths, shadow, meadow dragon, encounter outcome) depend on earlier choices through hierarchical Dirichlet back-off with empirical-Bayes concentration per event; backward induction for P(colour this attempt) and Dinkelbach for P(colour) / (P(colour) + P(other colour)); 200 posterior draws for credible intervals and "still best" rates; cross-fitted held-out check. - Only genuine attempts inform encounter outcomes (goal / Malek intent). - data/public/policy.json (all runs and a low-bias sample) and the readable docs/POLICY.md; published on Pages with solver.js for the bot. - Bot advisor: re-solves from any history, maps advice onto screen text, reports margins so ties can be randomised. docs/BOT_INTEGRATION.md. - Tests on a synthetic world with known answers; daily source update now rebuilds the policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
// Assemble the static Atlas site into dist/ (no dependencies).
|
|
// node scripts/build-site.js [outDir]
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
const root = path.resolve(__dirname, "..");
|
|
const out = path.resolve(root, process.argv[2] || "dist");
|
|
|
|
const copy = (from, to) => {
|
|
fs.mkdirSync(path.dirname(path.join(out, to)), { recursive: true });
|
|
fs.copyFileSync(path.join(root, from), path.join(out, to));
|
|
};
|
|
|
|
fs.rmSync(out, { recursive: true, force: true });
|
|
for (const f of fs.readdirSync(path.join(root, "apps/atlas"))) copy(`apps/atlas/${f}`, f);
|
|
copy("packages/core/src/engine.js", "engine.js");
|
|
copy("packages/core/src/graph.js", "graph.js");
|
|
copy("packages/core/src/solver.js", "solver.js");
|
|
for (const f of ["form_responses.json", "register.json", "graph.json", "policy.json"]) copy(`data/public/${f}`, `data/${f}`);
|
|
// Source files shown in the page's "view the code" panel
|
|
for (const f of ["analyze.py", "clean.py", "stats_core.py"]) copy(`research/python/${f}`, `python/${f}`);
|
|
copy("README.md", "README.md");
|
|
fs.writeFileSync(path.join(out, ".nojekyll"), "");
|
|
console.log(`Site built in ${path.relative(root, out) || "."}`);
|