Step 4b of the Python-first core. - core/solver.js is now a 250-line advisor (was 900 lines): it reads the game (core/spec/game.yaml, published inside policy.json as model.game) and the count tables, and re-solves from any point in a run with the same interpreter as the Python model. Same API for the site and Ken's bot (advisor, recommendOption, solverHistory). The bot's on-screen text for each option moves to game.yaml (bot_text); the deadly rolls carry their risk labels there too. - tests/core/advisor.test.js: the advisor gives exactly the Python model's values and choices for every colour and goal (to 1e-12, every decision on every published route), walks a run in the game's order, and maps advice onto the bot's screen. - Removed core/engine.js and everything that only compared it with Python (tests/parity/run_engine, compare_runs, compare_results, compare_routes, compare_solver, compare_stats, analysis/stats/ analyze.py). In their place: tests/core/test_stats.py checks the statistics against known answers, test_solver.py checks the route model on a synthetic world (tests/fixtures/synthetic_policy.py). - analysis/network/build-graph.js reads the Python-coded runs; graph.json is byte-identical. - docs/BOT_INTEGRATION.md: what changed for the bot (history keys, new choices, re-sync all three files). Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
908 B
JSON
22 lines
908 B
JSON
{
|
|
"name": "threshing-atlas",
|
|
"private": true,
|
|
"description": "Route probabilities and path-finding for the Dragonkind threshing",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"build": "node site/build.js",
|
|
"dev": "node site/build.js && python3 -m http.server 8000 -d dist",
|
|
"test:py": "PYTHONPATH=core python3 -m atlas.coding && PYTHONPATH=core python3 -m unittest discover -s tests/core -p 'test_*.py'",
|
|
"test:unit": "node --test tests/core/graph.test.js tests/core/advisor.test.js",
|
|
"test": "npm run test:py && npm run test:unit",
|
|
"graph": "node analysis/network/build-graph.js",
|
|
"import-bot": "node collection/bot/import-bot.js",
|
|
"check-sources": "python3 collection/sources/update_sources.py",
|
|
"policy": "python3 planner/build_policy.py && python3 planner/policy_report.py",
|
|
"stats": "python3 analysis/stats/site_stats.py"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|