The Black on the page: a first-attempt range marked low evidence; the Black panels load again
CI / test (pull_request) Successful in 40s
CI / test (pull_request) Successful in 40s
- The odds card for the Black: "Low evidence", "about 1 in N" first attempts, the 95% range written as "between 1 in X and 1 in Y", later attempts effectively never, why it is uncertain (every logged shadow is a rider who chose to post), and the steps (shadow -> reached the Black -> bonded). Dashed border. - Valley map: the Black's routes are solved for a first attempt (they showed ~0% per attempt), labelled "on a first attempt", and "Why this route?" gives the same range and caveat. - "The Black is not dice" panel: why the odds are uncertain, and what replaces the assumption (fresh-account bot runs to the tree). - analysis/black/evidence.py wrote "odds_ratio": Infinity (no later-attempt shadow at all), which is not JSON: the page's two Black panels showed "could not be loaded". Now null, and the report says "unbounded". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
@@ -141,7 +141,8 @@ def build():
|
||||
c[i + 1] += 1
|
||||
orr, obs, exp, z = mantel_haenszel(by.values())
|
||||
facts["same_route"] = {"routes": len(by), "first_shadows": round(obs), "expected": round(exp, 1),
|
||||
"odds_ratio": round(orr, 1), "z": round(z, 1)}
|
||||
"odds_ratio": round(orr, 1) if math.isfinite(orr) else None, # JSON has no Infinity
|
||||
"z": round(z, 1)}
|
||||
facts["form_first"] = [sum(c[0] for c in by.values()), sum(c[1] for c in by.values())]
|
||||
facts["form_later"] = [sum(c[2] for c in by.values()), sum(c[3] for c in by.values())]
|
||||
L += ["## 2. The same route on a first attempt and on a later one", "",
|
||||
@@ -153,7 +154,7 @@ def build():
|
||||
L.append(f"| {' / '.join(key)} | {frac(y1, n1)} | {frac(y0, n0)} |")
|
||||
L += ["", f"Across all {len(by)} recorded routes, comparing first and later attempts on the same route: "
|
||||
f"{obs:.0f} first-attempt shadows where {exp:.1f} would be expected if the attempt did not matter "
|
||||
f"(odds ratio {orr:.1f}, z = {z:.1f}). First and later attempts choose almost the same routes, so the "
|
||||
f"(odds ratio {f'{orr:.1f}' if math.isfinite(orr) else 'unbounded: no later-attempt shadow at all'}, z = {z:.1f}). First and later attempts choose almost the same routes, so the "
|
||||
"difference is not in the recorded choices: it is something about the account, or a choice the form does "
|
||||
"not record.", ""]
|
||||
|
||||
@@ -266,7 +267,7 @@ def main(argv=None):
|
||||
ap.add_argument("--check", action="store_true")
|
||||
a = ap.parse_args(argv)
|
||||
text, facts = build()
|
||||
data = json.dumps(facts, ensure_ascii=False, indent=1) + "\n"
|
||||
data = json.dumps(facts, ensure_ascii=False, indent=1, allow_nan=False) + "\n"
|
||||
if a.check:
|
||||
for path, want in ((OUT, text), (OUT_JSON, data)):
|
||||
if not path.exists() or path.read_text(encoding="utf-8") != want:
|
||||
|
||||
Reference in New Issue
Block a user