Screen tree, register rows in the master list, and bot runs coded from the picks that were played
CI / test (pull_request) Canceled after 0s
CI / test (pull_request) Canceled after 0s
- analysis/tree/build_tree.py -> data/public/tree.json, analysis/reports/TREE.md: every screen the bot has seen, every option, where each led (fixed or dice, with ranges), best known picks per colour chosen cautiously, where any picks end, and the untested options. solver.js screenPick(): least-tried and Thompson picks from the tree. - The bot logs a pick it then overrode as a step: 37 runs were coded with choices they never made. Importer and graph.js now use the played steps only. - runs_clean.csv: the Unofficial Dragon Register's 288 bonded dragons are in the master list as outcome-only rows, flagged (no analysis uses them). - Cycle, refresh and the bot kit rebuild and carry the tree; tests check every generated report is current. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014jqCC2LZ4x1WHQ1V57nTsv
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
d01ec46fcc
commit
f8e4f575f4
@@ -23,6 +23,7 @@ from pathlib import Path
|
||||
from .common import ROOT, path
|
||||
|
||||
KIT = {"policy.json": "data/public/policy.json", "experiments.json": "data/public/experiments.json",
|
||||
"tree.json": "data/public/tree.json",
|
||||
"solver.js": "core/solver.js", "graph.js": "core/graph.js"}
|
||||
|
||||
README = """Threshing Atlas files for the DragonKind bot
|
||||
@@ -31,12 +32,13 @@ README = """Threshing Atlas files for the DragonKind bot
|
||||
Policy id: {policy}
|
||||
Made: {made}
|
||||
|
||||
Unzip these four files into the bot's vendor/threshing-atlas/ folder, replacing the old ones, and keep them
|
||||
Unzip these five files into the bot's vendor/threshing-atlas/ folder, replacing the old ones, and keep them
|
||||
together: solver.js reads the game from this policy.json.
|
||||
|
||||
policy.json the route model (the game, the counts behind every roll, the best routes per colour)
|
||||
experiments.json the experiment plan: what each attempt of each account is for (read it with assign())
|
||||
solver.js the advisor: advisor(), recommendOption(), solverHistory(), assign()
|
||||
tree.json the screen tree: every screen, every option, where each led (read it with screenPick())
|
||||
solver.js the advisor: advisor(), recommendOption(), solverHistory(), assign(), screenPick()
|
||||
graph.js trajectoryVariables(): the bot's steps -> the community form's variables
|
||||
|
||||
How the bot uses them: docs/BOT_INTEGRATION.md in the atlas repo. Log the policy id above as policyId on each run,
|
||||
@@ -86,6 +88,7 @@ def refresh(update_main, bots=()):
|
||||
_step("route model (about 2 minutes)", [py, "planner/build_policy.py"])
|
||||
_step("experiment plan", [py, "planner/build_experiments.py"])
|
||||
_step("what the runs show about the Black", [py, "analysis/black/evidence.py"])
|
||||
_step("screen tree", [py, "analysis/tree/build_tree.py"])
|
||||
_step("statistics", [py, "analysis/stats/site_stats.py"])
|
||||
_step("runs, generated files and metadata", [py, "-m", "collection", "build"])
|
||||
print(f"\nDone. What changed: exports/last-report.md. Send the bot its files with: {py} -m collection export-bot-kit")
|
||||
@@ -97,7 +100,7 @@ def refresh(update_main, bots=()):
|
||||
def _fingerprint():
|
||||
"""What the route model and the plan are built from: the coded runs and the bot's anonymised files."""
|
||||
h = hashlib.sha256()
|
||||
for p in [path("data/public/runs_clean.csv"), *sorted(path("data/bot").glob("*.json*")),
|
||||
for p in [path("data/public/runs_clean.csv"), *sorted(path("data/bot").glob("*.json*")), path("planner/knowledge.yaml"),
|
||||
path("planner/policy.yaml"), path("planner/experiments.yaml"), path("core/spec/game.yaml")]:
|
||||
if p.exists():
|
||||
h.update(p.name.encode())
|
||||
@@ -171,6 +174,7 @@ def cycle(update_main, bots, deliver_to=None, community=False, force=False):
|
||||
_step("route model (a few minutes)", [py, "planner/build_policy.py"])
|
||||
_step("experiment plan", [py, "planner/build_experiments.py"])
|
||||
_step("what the runs show about the Black", [py, "analysis/black/evidence.py"])
|
||||
_step("screen tree", [py, "analysis/tree/build_tree.py"])
|
||||
try:
|
||||
import scipy # noqa: F401
|
||||
_step("statistics", [py, "analysis/stats/site_stats.py"])
|
||||
|
||||
Reference in New Issue
Block a user