Files
pokerfreak/messung/stackoff/nach_gross_call.py
T
mmintelandClaude Opus 5.5 7a011c63a8 Stack-off: GEGEN_GROSS-Zusaetze river, ab:<r>, allin (River-All-in-Range nur stark); Messung Population, Holdout, GROSS_CALL verworfen
Kandidat GEGEN_GROSS=0.2,river,ab:0.75,allin, aus = bitgleich. Holdout River: Jams +9886 bb [+5607, +14177],
grosse Einsaetze ohne All-in +1317, Raises +44; eigene Haende +0,37 bb/100. Ohne allin verliert der Schalter
an grossen Nicht-All-in-Einsaetzen (-11766). Nicht live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:06:46 +01:00

39 lines
1.2 KiB
Python

#!/usr/bin/env python3
"""Spots, an denen der Setzer auf einer frueheren Strasse einen grossen Einsatz (>= ab Topf) des Callers gecallt hat.
python -I -X utf8 messung/stackoff/nach_gross_call.py <spots.jsonl> <aus.jsonl> [--ab 0.75]
"""
import json
import sys
SO = {"FLOP": 1, "TURN": 2, "RIVER": 3}
def gecallt(sp, ab):
r = sp.get("req") or {}
hs = r.get("heroSeat")
topf, st_cur, quote = 0.0, None, None
for x in r.get("history") or []:
st = x["street"]
if st != st_cur:
st_cur, quote = st, None
a, b = x["action"], x.get("amount") or 0
if st in SO and a in ("BET", "RAISE", "ALL_IN"):
quote = b / max(topf, 1e-9) if x["seat"] == hs else None
elif st in SO and a == "CALL" and x["seat"] != hs and quote is not None and quote >= ab and SO[st] < sp["strasse"]:
return True
topf += b
return False
if __name__ == "__main__":
a = sys.argv[1:]
ab = float(a[a.index("--ab") + 1]) if "--ab" in a else 0.75
n = 0
with open(a[1], "w", encoding="utf-8", newline="\n") as o:
for z in open(a[0], encoding="utf-8"):
if gecallt(json.loads(z), ab):
o.write(z)
n += 1
print(n)