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
+13
-3
@@ -126,9 +126,19 @@
|
||||
// END CROSSWALK
|
||||
|
||||
/** Map one bot trajectory onto the form's decision variables. Unmapped choices are listed, not guessed. */
|
||||
/**
|
||||
* The steps that were actually played. The bot logs a pick it then overrode (its own rules against the atlas's
|
||||
* advice) as a step whose `to` is not where the run went, followed by the pick it made on the same screen. Those
|
||||
* superseded picks are dropped. A step without `to` (a run in progress) is kept unless the next step is on the
|
||||
* same screen.
|
||||
*/
|
||||
function playedSteps(steps) {
|
||||
return (steps || []).filter((s, i) => !(i + 1 < steps.length && steps[i + 1].scene != null && steps[i + 1].scene === s.scene && s.to !== steps[i + 1].scene));
|
||||
}
|
||||
|
||||
function trajectoryVariables(traj) {
|
||||
const vars = {}, unmapped = [];
|
||||
for (const s of traj.steps) {
|
||||
for (const s of playedSteps(traj.steps)) {
|
||||
const t = norm(s.optionText);
|
||||
const hit = CROSSWALK.find(([re]) => re.test(t));
|
||||
if (hit) { if (!(hit[1] in vars)) vars[hit[1]] = hit[2]; }
|
||||
@@ -208,7 +218,7 @@
|
||||
for (const o of s.options) g[id].options[o.id] = { id: o.id, text: o.text, n: 0, to: {}, bySource: {}, intentionalBurns: 0 };
|
||||
}
|
||||
for (const t of trajs) {
|
||||
for (const s of t.steps) {
|
||||
for (const s of playedSteps(t.steps)) {
|
||||
const node = g[s.scene] || (g[s.scene] = { id: s.scene, stage: s.stage, tint: s.tint, label: s.stage, visits: 0, options: {} });
|
||||
node.visits++;
|
||||
const o = node.options[s.option] || (node.options[s.option] = { id: s.option, text: s.optionText, n: 0, to: {}, bySource: {}, intentionalBurns: 0 });
|
||||
@@ -231,5 +241,5 @@
|
||||
return g;
|
||||
}
|
||||
|
||||
return { betaPosterior, betaQuantile, ibeta, CROSSWALK, trajectoryVariables, formRunVariables, VAR_STAGES, buildVariableGraph, buildSceneGraph, norm };
|
||||
return { betaPosterior, betaQuantile, ibeta, CROSSWALK, trajectoryVariables, playedSteps, formRunVariables, VAR_STAGES, buildVariableGraph, buildSceneGraph, norm };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user