Files
pokerfreak/lesen/vorflop/jamread_kipp.py
T
mmintelandClaude Opus 5.5 99c4b3bdf6 VORFLOP_POP jamread: Fold-Veto gegen Vorflop-Jams nach unverzerrter NL2-Jam-Range je Tiefe und 3-Bet-Read (Zwischenstand)
Lauf 22.11. #5/#11: Call gegen 3-Bet-Jam eines 3-%-3-Bettors (A2s 0,33 gg Preis 0,47) und gegen Jam ueber Squeeze
(AJo 0,32 gg 0,43). Read aus dem ungefilterten Spot (read_gate nimmt vorflop die Profile weg). Aus = bitgleich
(Zwilling Block 0/1), Kipp 0 Praemien, Pflicht 43/44 wie live, echtes Replay 3 Calls -> Fold. Zwilling laeuft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:26:55 +01:00

81 lines
3.8 KiB
Python

#!/usr/bin/env python3
"""Kipp-Liste `jamread`: zwei echte Lagen des 22.11. als Vorlage (#11 SB-Open, BB jammt 51 bb; #5 BTN flattet,
BB squeezt, UTG jammt 74 bb), Lochkarten ueber alle 169 Klassen, Jammer-Read ohne / 3 % / 8 % / 15 % (300 Haende),
Tiefe des Jams 30 / 51 / 100 bb (Lage #11). Live-Schalter gegen Live-Schalter + jamread.
python -I -X utf8 lesen/vorflop/jamread_kipp.py <kern.exe> <kern_schalter.txt> <vorlagen.json> <aus.json>
"""
import copy
import json
import os
import sys
_HIER = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(_HIER)), "werkzeuge"))
import kippliste as KL # noqa: E402
R = ["TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "JACK", "QUEEN", "KING", "ACE"]
N = "23456789TJQKA"
PRAEMIE = {"AA", "KK", "QQ", "AKs", "AKo"}
def klassen():
for i in range(13):
for j in range(13):
if i == j:
yield N[i] + N[i], [{"rank": R[i], "suit": "HEARTS"}, {"rank": R[i], "suit": "SPADES"}]
elif i > j:
yield N[i] + N[j] + "s", [{"rank": R[i], "suit": "HEARTS"}, {"rank": R[j], "suit": "HEARTS"}]
else:
yield N[j] + N[i] + "o", [{"rank": R[j], "suit": "HEARTS"}, {"rank": R[i], "suit": "SPADES"}]
def main():
kern, schalter, vorlagen, aus = sys.argv[1:5]
V = json.load(open(vorlagen, encoding="utf-8"))
live = KL.lies_schalter(schalter)
arm = dict(live, VORFLOP_POP=live["VORFLOP_POP"] + ",jamread")
spots = []
for name, req, jammer in (("#11 SB-Open, BB-Jam", V["h11"], 1), ("#5 Jam ueber Squeeze", V["h5"], V["h5_jammer"])):
tiefen = [None] if name.startswith("#5") else [30.0, 51.0, 100.0]
for tiefe in tiefen:
for read in (None, 0.03, 0.08, 0.15):
for kl, karten in klassen():
r = copy.deepcopy(req)
r["heroCards"] = karten
for v in r["villains"]:
v.pop("kennung", None)
if v["seat"] == jammer:
v["profile"] = None if read is None else {"vpip": 0.22, "pfr": 0.17, "threeBet": read, "hands": 300}
if tiefe is not None:
bb = r["bigBlind"]
jam = tiefe * bb
for h in r["history"]:
if h["seat"] == jammer and h["action"] == "ALL_IN":
alt = h["amount"]
h["amount"] = round(jam, 4)
r["pot"] = round(r["pot"] - alt + jam, 4)
r["toCall"] = round(jam - 0.05, 4)
r["heroStack"] = max(r["heroStack"], round(jam + 0.5, 4))
spots.append({"req": r, "lage": name, "tiefe": tiefe, "read": read, "klasse": kl})
a = KL.kern_lauf(kern, spots, live, prozesse=2)
b = KL.kern_lauf(kern, spots, arm, prozesse=2)
kipps, hart = {}, []
for s, x, y in zip(spots, a, b):
ax, ay = KL.art(x, s["req"]), KL.art(y, s["req"])
if ax == ay:
continue
key = "%s | %s bb | Read %s" % (s["lage"], s["tiefe"] or "74", "ohne" if s["read"] is None else "%.0f %%" % (100 * s["read"]))
kipps.setdefault(key, []).append("%s %s->%s" % (s["klasse"], ax[0], ay[0]))
if s["klasse"] in PRAEMIE and ay == "FOLD":
hart.append(key + " " + s["klasse"])
erg = {"spots": len(spots), "gekippt": sum(len(v) for v in kipps.values()), "praemie_neu_fold": hart, "je_lage": kipps}
json.dump(erg, open(aus, "w", encoding="utf-8", newline="\n"), ensure_ascii=False, indent=1)
print(erg["spots"], erg["gekippt"], "Praemie neu Fold:", hart)
for k, v in kipps.items():
print(k, len(v), " ".join(v))
if __name__ == "__main__":
main()