71 lines
3.5 KiB
Python
71 lines
3.5 KiB
Python
# Reine Basis gegen Live (23.11.): Arm-Definitionen. Live = Kern 19d8cfeb (Kopie pokerbench-basis-live.exe) mit der
|
|
# eingefrorenen Schalterdatei nach/kern_schalter_19d8cfeb.txt (= betrieb/kern_schalter.txt auf main df272bb1).
|
|
# Ein Arm nimmt Schalter-Gruppen heraus (Schluessel weg = aus, Code-Vorgabe) und setzt Ueberschreibungen.
|
|
# "profile" heisst: die Spots ohne Gegnerprofile (kein HUD, keine Reads, kein vw-Schluessel), wie gegen lauter Neue.
|
|
import os, sys
|
|
sys.dont_write_bytecode = True
|
|
NP = "D:/Projects/pokerfreak/.claude/worktrees/basis-rein-a64ddc/messung/sim-raus/nachpruefung"
|
|
sys.path.insert(0, NP)
|
|
GS = os.path.join(os.path.expanduser("~"), "pokerfreak-regulars", "gewinnerspots")
|
|
os.environ.setdefault("KERN_BIN", os.path.join(GS, "bin", "pokerbench-basis-live.exe"))
|
|
os.environ.setdefault("KERN_SCHALTER", os.path.join(GS, "nach", "kern_schalter_19d8cfeb.txt"))
|
|
import kern as KN # noqa: E402
|
|
_LIVE_UMGEBUNG = KN.umgebung # vor jedem Patch festgehalten (vor.py ersetzt KN.umgebung)
|
|
|
|
# Gruppen von Gegner-Annahmen (Begruendung je Schalter in messung/basis/BERICHT.md)
|
|
GRUPPEN = {
|
|
# Solver-Kern: Gegner an seinen kuenftigen Knoten auf Pool-Tabellen genagelt (BETTOR/WETT_KURVE/Pool-Fold, w=1)
|
|
# -> w=0 (Gegner frei per CFR = Gleichgewicht im Teilspiel); wl=1 haelt nur die schon GESPIELTEN Aktionen fest
|
|
# (beobachtete Tatsache, keine Annahme). Mehrweg: SOLVER3_POOL (Pool-Antwort auf Einsatz) aus.
|
|
"lock": dict(aus=["SOLVER3_POOL"], setze={"SOLVER_KERN": "+w=0+wl=1"}),
|
|
# Range-Modell aus Populations-Tabellen (Range zum Teilspiel-Beginn und Heuristik-Rueckfall)
|
|
"modell": dict(aus=["BETTOR", "BETTOR_GROSS", "BETTOR_GROSS_TURN", "VORFLOP_BAND", "POSTERIOR", "GEGNER_LINIEN",
|
|
"POOL_STUFE", "GEGEN_GROSS", "ALLIN_KURVE", "WETT_KURVE", "ALLIN_EINSATZ", "FORTSETZUNG",
|
|
"MDF_UNREAD"], setze={}),
|
|
# Postflop-Feldregeln und read-gesteuerte Ausnahmen
|
|
"regeln": dict(aus=["DROSSEL", "SPAET_FOLD", "UEBERWERT", "RERAISE_BLUFF", "TURN_RAISE_NUR", "TURN_RAISE_BLUFF",
|
|
"STATION_POSTFLOP", "PAAR_RAISE", "VORWISSEN", "VORWISSEN_ART", "VORWISSEN_OHNE",
|
|
"VORWISSEN_FOLD", "STEAL_BREITE"], setze={}),
|
|
# Vorflop nach Population / Gewinnern
|
|
"vorflop": dict(aus=["VORFLOP_POP", "VORFLOP_EINTRITT", "ALLIN_TIEFE"], setze={}),
|
|
}
|
|
# Arm -> (Gruppen, ohne Profile?)
|
|
ARME = {
|
|
"live": ([], False),
|
|
"rein": (list(GRUPPEN), True),
|
|
"profile": ([], True),
|
|
"lock": (["lock"], False),
|
|
"modell": (["modell"], False),
|
|
"regeln": (["regeln"], False),
|
|
"vorflop": (["vorflop"], False),
|
|
"vf_pop": ([], False), # nur fuer Vorflop-Zerlegung, siehe EINZEL
|
|
"vf_eintritt": ([], False),
|
|
"vf_tiefe": ([], False),
|
|
}
|
|
EINZEL = {"vf_pop": ["VORFLOP_POP"], "vf_eintritt": ["VORFLOP_EINTRITT"], "vf_tiefe": ["ALLIN_TIEFE"]}
|
|
|
|
|
|
def umgebung(arm):
|
|
env = _LIVE_UMGEBUNG("-")
|
|
gr, _ = ARME[arm]
|
|
for g in gr:
|
|
for k in GRUPPEN[g]["aus"]:
|
|
if k not in env:
|
|
raise SystemExit("Schalter %s ist live nicht gesetzt" % k)
|
|
env.pop(k)
|
|
for k, v in GRUPPEN[g]["setze"].items():
|
|
env[k] = env[k] + v if v.startswith("+") else v
|
|
for k in EINZEL.get(arm, []):
|
|
env.pop(k)
|
|
return env
|
|
|
|
|
|
def ohne_profile(arm):
|
|
return ARME[arm][1]
|
|
|
|
|
|
if __name__ == "__main__":
|
|
for a in sys.argv[1:] or ARME:
|
|
e, l = umgebung(a), _LIVE_UMGEBUNG("-")
|
|
print(a, "ohne Profile" if ohne_profile(a) else "", {k: e.get(k) for k in set(e) ^ set(l) | {k for k in e if e[k] != l.get(k)}})
|