11,3 Mio. CoinPoker-NL2-Haende (nur Aggregate), Spieler-Holdout, EV ueber gemessene Fortsetzungen. Schalter (aus = bitgleich, in BEKANNTE_SCHALTER): Blind-3-Bet gegen EP/MP 3x, gegen CO/BTN 4x das Open (bisher 1,5-2,4x: 3 x to_call ohne eigenen Blind), Iso in Position 5 bb + 1 je weiteren Limper (bisher 2,5 bb). VORFLOP_BAND, Iso aus den Blinds, HU unveraendert. Tor: Eigen-Replay 1130 Spots 0 Aktionen anders (nur Groessen), Pflichtfaelle 35/43 wie live, Mehrweg-LBR -16,65 +-32,05 (nicht schlechter), 6-max-Leiter +16,87 +-3,28 ohne schlechtere Position. Nicht live geschaltet. Bericht messung/vorflop_population/BERICHT.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
79 lines
2.7 KiB
Python
79 lines
2.7 KiB
Python
#!/usr/bin/env python3
|
|
"""Unsere echten NL2-Vorflop-Entscheidungen (zuege.jsonl des Live-Worktrees) nach Lage, Position und Handklasse.
|
|
|
|
python -X utf8 lesen/vorflop_population/eigene.py <zuege.jsonl> <aus.json> [--ab 2026-11-16]
|
|
"""
|
|
import collections
|
|
import json
|
|
import re
|
|
import sys
|
|
|
|
RAENGE = "23456789TJQKA"
|
|
|
|
|
|
def klasse(hole):
|
|
a, b = hole
|
|
ra, rb = RAENGE.index(a[0]), RAENGE.index(b[0])
|
|
if ra < rb:
|
|
ra, rb, a, b = rb, ra, b, a
|
|
if ra == rb:
|
|
return RAENGE[ra] * 2
|
|
return RAENGE[ra] + RAENGE[rb] + ("s" if a[1] == b[1] else "o")
|
|
|
|
|
|
def lage(grund):
|
|
g = grund or ""
|
|
m = re.match(r"^(EP|MP|CO|BTN/SB|BTN|SB|BB) (open|vs open|vs limp|vs \d-bet\+)", g)
|
|
if not m:
|
|
return None, None
|
|
pos = m.group(1)
|
|
if pos == "BTN/SB":
|
|
pos = "SB"
|
|
s = m.group(2)
|
|
if s.startswith("vs ") and "bet" in s:
|
|
s = "vs 3bet+"
|
|
return pos, s
|
|
|
|
|
|
def main():
|
|
quelle, aus = sys.argv[1:3]
|
|
ab = sys.argv[sys.argv.index("--ab") + 1] if "--ab" in sys.argv else ""
|
|
Z = collections.defaultdict(lambda: collections.Counter())
|
|
groessen = collections.defaultdict(list)
|
|
je_klasse = collections.defaultdict(lambda: collections.Counter())
|
|
rest = collections.Counter()
|
|
for z in open(quelle, encoding="utf-8"):
|
|
d = json.loads(z)
|
|
if d.get("bb") != 0.02 or d.get("street") != "PREFLOP" or (d.get("zeit") or "") < ab:
|
|
continue
|
|
pos, s = lage(d.get("grund"))
|
|
if pos is None:
|
|
rest[(d.get("grund") or "")[:40]] += 1
|
|
continue
|
|
if s == "open" and pos == "BB":
|
|
s = "vs limp" # BB 'open' = alle gelimpt
|
|
a = d["aktion"]
|
|
a = {"CHECK": "CALL", "ALL_IN": "RAISE", "BET": "RAISE"}.get(a, a)
|
|
Z[(pos, s)][a] += 1
|
|
je_klasse[(pos, s, klasse(d["hole"]))][a] += 1
|
|
if a == "RAISE" and d.get("groesse"):
|
|
groessen[(pos, s)].append(round(d["groesse"] / 0.02, 2))
|
|
out = {"ab": ab, "lagen": {}, "rest": dict(rest.most_common(20))}
|
|
for (pos, s), c in sorted(Z.items()):
|
|
n = sum(c.values())
|
|
g = sorted(groessen[(pos, s)])
|
|
out["lagen"][f"{pos}|{s}"] = {
|
|
"n": n, **{k: round(v / n, 3) for k, v in c.items()},
|
|
"groesse_median_bb": g[len(g) // 2] if g else None,
|
|
"groessen": dict(collections.Counter(g).most_common(6)),
|
|
}
|
|
out["je_klasse"] = {"|".join(k): dict(v) for k, v in sorted(je_klasse.items())}
|
|
json.dump(out, open(aus, "w", encoding="utf-8"), ensure_ascii=False, indent=1)
|
|
for k, v in out["lagen"].items():
|
|
print(k, {kk: vv for kk, vv in v.items() if kk != "groessen"}, v["groessen"])
|
|
print("rest", out["rest"])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|