From 7e32da2eb6854a0ff3c1f1765b73a982d7ee2638 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 25 Nov 2026 12:56:51 +0100 Subject: [PATCH] Motor spielt auch Splash-Haende (gelernte splash.bin), MOTOR_SPLASH=0 schaltet ab Co-Authored-By: Claude Opus 5.5 --- entscheiden/schatten.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/entscheiden/schatten.py b/entscheiden/schatten.py index 127f685b..c4d07d40 100644 --- a/entscheiden/schatten.py +++ b/entscheiden/schatten.py @@ -3,7 +3,7 @@ Schalter in betrieb/kern_schalter.txt: MOTOR_SCHATTEN= Motor laden MOTOR_SPIELT=1 seine Antwort wird gespielt; der alte Kern nur, wo der Motor nicht zustaendig ist (keine - NLHE-Cash-Lage, Ante/Splash/Straddle), keine gueltige Antwort hat oder die Frist reisst. + NLHE-Cash-Lage, Ante/Straddle; Splash nur ohne gelernte splash.bin), keine gueltige Antwort hat oder die Frist reisst. Jede Antwort steht in archiv/lauf/schatten.jsonl (Feld `gespielt`: wer geklickt hat). Wirft nie. """ import json @@ -22,11 +22,17 @@ SCHLANGE_MAX = 64 # haengt der Motor, wird verworfen statt gestaut TODE_MAX = 5 +def splash_da(): + """Hat der Motor eigene Strategien fuer Splash-Toepfe? MOTOR_SPLASH=0 schaltet ab (dann der alte Kern).""" + w = getattr(_schatten, "befehl", None) + return bool(w and os.environ.get("MOTOR_SPLASH") != "0" and os.path.exists(os.path.join(w[3], "splash20.bin.ok"))) + + def zustaendig(q): - """NLHE, Cash, nur Blinds im Topf, Zuege bekannt.""" - posten = [h.get("action") for h in q.get("history") or [] if str(h.get("action")).startswith("POST")] + """NLHE, Cash, nur Blinds (und Splash) im Topf, Zuege bekannt.""" + posten = [h.get("action") for h in q.get("history") or [] if str(h.get("action")).startswith("POST") and not h.get("splash")] return bool(q.get("variant") == "NLHE" and not q.get("_turnier") and not q.get("tournament") - and q.get("legalActions") and not q.get("_splash") and all(x in ("POST_SB", "POST_BB") for x in posten)) + and q.get("legalActions") and (not q.get("_splash") or splash_da()) and all(x in ("POST_SB", "POST_BB") for x in posten)) def gueltig(q, r):