"""Rust-MC: viele Seeds an drei Stellen, um den z=-4.25-Ausreisser (Flop, Seed 33) einzuordnen.""" import json, subprocess, statistics ex = json.load(open("exakt_equity.json")) EXE = "../../../target/release/pokerbench-fremd-eval.exe" stellen = [("AhKh vs 9c9d, Flop Qh7h2c", "Ah Kh", "Qh 7h 2c", ["9c 9d"]), ("AhKh vs 9c9d, Turn Qh7h2c3s", "Ah Kh", "Qh 7h 2c 3s", ["9c 9d"]), ("AhAs vs KdKc preflop", "Ah As", "-", ["Kd Kc"])] aus = {} for name, h, b, v in stellen: e = ex[name]["eigen"][0] zs = [] for sd in range(100, 140): r = subprocess.run([EXE, "equity", h, b, "40000000", str(sd)] + v, capture_output=True, text=True, check=True).stdout.split() zs.append((float(r[0]) - e) / float(r[1])) aus[name] = zs print(f"{name}: 40 Seeds x 40 Mio.: Mittel z {statistics.mean(zs):+.2f}, Streuung z {statistics.stdev(zs):.2f}, max |z| {max(abs(x) for x in zs):.2f}, Mittel-z-Fehler {1/len(zs)**.5:.2f}", flush=True) json.dump(aus, open("rust_seeds.json", "w"))