Stack-off-Bepreisung: Raise gegen Call (GEGENCALL), auch fuer SHARINGAN rein und Splash-Tische, Spur im Grund
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@ BEKANNTE_SCHALTER = ("FAUSTREGEL", "DROSSEL", "MDF_UNREAD", "RAISE_DRAWS", "RAIS
|
||||
"MOTOR_STRASSEN", "MOTOR_FLOPBLUFF", "MOTOR_LUFT", "MOTOR_NACH_BREIT", "MOTOR_NACH_BREIT_FRIST", "MOTOR_NACH_BREIT_ZIEL", "MOTOR_NACH_BREIT_MAL", "MOTOR_NACH_BREIT_HEBE", "MOTOR_NACH_BREIT_RU", "MOTOR_NACH_BREIT_SCHAETZ",
|
||||
"MOTOR_SUCHE_BODEN_VR", "MOTOR_SUCHE_RIVER_JAM", "MOTOR_BAHN_STAU", "MOTOR_VORRECHNEN_STRASSE", "MOTOR_VORRECHNEN_FAEDEN", "MOTOR_SPIEL_FAEDEN", "MOTOR_VORRECHNEN_SCHEIBE", "MOTOR_VORRECHNEN_MERK", "MOTOR_BRETTQ", "MOTOR_FLOP_ECHTGROESSE", "MOTOR_FLOP_ECHTGROESSE_TOL", "MOTOR_FLOP_ECHTGROESSE_FRIST", "MOTOR_FLOP_ECHTGROESSE_ITER", "MOTOR_FLOP_ECHTGROESSE_GB", "MOTOR_FLOP_ECHTGROESSE_BAUM", "MOTOR_FLOP_ECHTGROESSE_PUFFER", "MOTOR_FLOP_ECHTGROESSE_GUT", "MOTOR_FLOP_ECHTGROESSE_NOT", "MOTOR_RNR", "MOTOR_RNR_P", "MOTOR_RNR_MODELL", "MOTOR_RNR_GEGEN", "MOTOR_RNR_REGEL", "MOTOR_RNR_TURN", "MOTOR_RNR_RUNDEN_TURN",
|
||||
# Hybrid (29.11. abends, Standard aus): Vorflop/Flop von SHARINGAN, entscheiden/motor/src/sharingan.rs
|
||||
"MOTOR_VORFLOP_FLOP_QUELLE", "MOTOR_HYB_UEBERSETZUNG", "MOTOR_HYB_FLOP_SUCHE", "MOTOR_HYB_ZELLE", "MOTOR_HYB_RAKE", "MOTOR_PREIS_STRAFF", "MOTOR_STACKOFF", "MOTOR_STACKOFF_TAFEL", "MOTOR_BLUFFPREIS", "MOTOR_VORFLOP_STACKOFF", "MOTOR_VORFLOP_TAFEL", "MOTOR_VORFLOP_SPLASH", "MOTOR_VORFLOP_SPLASH_TAFEL",
|
||||
"MOTOR_VORFLOP_FLOP_QUELLE", "MOTOR_HYB_UEBERSETZUNG", "MOTOR_HYB_FLOP_SUCHE", "MOTOR_HYB_ZELLE", "MOTOR_HYB_RAKE", "MOTOR_PREIS_STRAFF", "MOTOR_STACKOFF", "MOTOR_REIN_STACKOFF", "MOTOR_STACKOFF_SPLASH", "MOTOR_STACKOFF_GEGENCALL", "MOTOR_STACKOFF_TAFEL", "MOTOR_BLUFFPREIS", "MOTOR_VORFLOP_STACKOFF", "MOTOR_VORFLOP_TAFEL", "MOTOR_VORFLOP_SPLASH", "MOTOR_VORFLOP_SPLASH_TAFEL",
|
||||
"MOTOR_SHARINGAN_WARTEN", "MOTOR_SHARINGAN_FRIST_MS", "MOTOR_SHARINGAN_FAEDEN", "MOTOR_SHARINGAN_ADRESSE", "MOTOR_SHARINGAN_EXE",
|
||||
# SHARINGAN-Suche (29.11. spaet, Standard aus): Turn/River und Flop aus seiner Echtzeit-Suche, entscheiden/motor/src/sharingan.rs
|
||||
"MOTOR_SUCHE_QUELLE", "MOTOR_SHARINGAN_REIN", "MOTOR_SUCHE_FLOP", "MOTOR_SUCHE_ITERS", "MOTOR_SUCHE_FAEDEN", "MOTOR_SUCHE_DECKEL", "MOTOR_SUCHE_PUFFER", "MOTOR_SUCHE_ADRESSE", "MOTOR_SUCHE_EXE",
|
||||
@@ -94,7 +94,7 @@ LAEUFER_SCHALTER = ("AUSWAHL_FREI", "RUECKKEHR_STACK", "LEER_HOECHST", "NEUSTART
|
||||
"MOTOR_STRASSEN", "MOTOR_FLOPBLUFF", "MOTOR_LUFT", "MOTOR_NACH_BREIT", "MOTOR_NACH_BREIT_FRIST", "MOTOR_NACH_BREIT_ZIEL", "MOTOR_NACH_BREIT_MAL", "MOTOR_NACH_BREIT_HEBE", "MOTOR_NACH_BREIT_RU", "MOTOR_NACH_BREIT_SCHAETZ",
|
||||
"MOTOR_SUCHE_BODEN_VR", "MOTOR_SUCHE_RIVER_JAM", "MOTOR_BAHN_STAU", "MOTOR_VORRECHNEN_STRASSE", "MOTOR_VORRECHNEN_FAEDEN", "MOTOR_SPIEL_FAEDEN", "MOTOR_VORRECHNEN_SCHEIBE", "MOTOR_VORRECHNEN_MERK", "MOTOR_BRETTQ", "MOTOR_FLOP_ECHTGROESSE", "MOTOR_FLOP_ECHTGROESSE_TOL", "MOTOR_FLOP_ECHTGROESSE_FRIST", "MOTOR_FLOP_ECHTGROESSE_ITER", "MOTOR_FLOP_ECHTGROESSE_GB", "MOTOR_FLOP_ECHTGROESSE_BAUM", "MOTOR_FLOP_ECHTGROESSE_PUFFER", "MOTOR_FLOP_ECHTGROESSE_GUT", "MOTOR_FLOP_ECHTGROESSE_NOT", "MOTOR_RNR", "MOTOR_RNR_P", "MOTOR_RNR_MODELL", "MOTOR_RNR_GEGEN", "MOTOR_RNR_REGEL", "MOTOR_RNR_TURN", "MOTOR_RNR_RUNDEN_TURN",
|
||||
# Hybrid (29.11. abends, Standard aus): Vorflop/Flop von SHARINGAN, entscheiden/motor/src/sharingan.rs
|
||||
"MOTOR_VORFLOP_FLOP_QUELLE", "MOTOR_HYB_UEBERSETZUNG", "MOTOR_HYB_FLOP_SUCHE", "MOTOR_HYB_ZELLE", "MOTOR_HYB_RAKE", "MOTOR_PREIS_STRAFF", "MOTOR_STACKOFF", "MOTOR_STACKOFF_TAFEL", "MOTOR_BLUFFPREIS", "MOTOR_VORFLOP_STACKOFF", "MOTOR_VORFLOP_TAFEL", "MOTOR_VORFLOP_SPLASH", "MOTOR_VORFLOP_SPLASH_TAFEL",
|
||||
"MOTOR_VORFLOP_FLOP_QUELLE", "MOTOR_HYB_UEBERSETZUNG", "MOTOR_HYB_FLOP_SUCHE", "MOTOR_HYB_ZELLE", "MOTOR_HYB_RAKE", "MOTOR_PREIS_STRAFF", "MOTOR_STACKOFF", "MOTOR_REIN_STACKOFF", "MOTOR_STACKOFF_SPLASH", "MOTOR_STACKOFF_GEGENCALL", "MOTOR_STACKOFF_TAFEL", "MOTOR_BLUFFPREIS", "MOTOR_VORFLOP_STACKOFF", "MOTOR_VORFLOP_TAFEL", "MOTOR_VORFLOP_SPLASH", "MOTOR_VORFLOP_SPLASH_TAFEL",
|
||||
"MOTOR_SHARINGAN_WARTEN", "MOTOR_SHARINGAN_FRIST_MS", "MOTOR_SHARINGAN_FAEDEN", "MOTOR_SHARINGAN_ADRESSE", "MOTOR_SHARINGAN_EXE",
|
||||
# SHARINGAN-Suche (29.11. spaet, Standard aus): Turn/River und Flop aus seiner Echtzeit-Suche, entscheiden/motor/src/sharingan.rs
|
||||
"MOTOR_SUCHE_QUELLE", "MOTOR_SHARINGAN_REIN", "MOTOR_SUCHE_FLOP", "MOTOR_SUCHE_ITERS", "MOTOR_SUCHE_FAEDEN", "MOTOR_SUCHE_DECKEL", "MOTOR_SUCHE_PUFFER", "MOTOR_SUCHE_ADRESSE", "MOTOR_SUCHE_EXE",
|
||||
|
||||
@@ -489,6 +489,11 @@ impl Motor {
|
||||
if let Ok(a) = &r {
|
||||
if a["reason"].as_str().is_some_and(|x| x.starts_with("sharingan")) {
|
||||
crate::gedaechtnis::beobachte(q);
|
||||
// MOTOR_REIN_STACKOFF=1 (01.12.): seine bindenden Raises und Stack-Calls dieselbe NL2-Bepreisung wie unsere
|
||||
// (A4 auf A55: Check-Raise all-in 8x Topf, bezahlt nur von Besseren); sonst unveraendert
|
||||
if crate::nl2::rein_stackoff_an() {
|
||||
return Self::stackoff_stufe(q, a.clone());
|
||||
}
|
||||
return a.clone();
|
||||
}
|
||||
}
|
||||
@@ -529,8 +534,32 @@ impl Motor {
|
||||
}
|
||||
}
|
||||
|
||||
/// Nur die Stack-off-Bepreisung (nl2::stackoff) auf Flop/Turn/River, ohne die uebrigen NL2-Regeln; "vor" = Zug davor.
|
||||
fn stackoff_stufe(q: &Value, a: Value) -> Value {
|
||||
if !(crate::nl2::stackoff_an() || crate::nl2::bluffpreis_an()) || q["street"] == "PREFLOP" {
|
||||
return a;
|
||||
}
|
||||
let hand: Vec<u8> = q["heroCards"].as_array().into_iter().flatten().filter_map(karte).collect();
|
||||
let brett: Vec<u8> = ["FLOP", "TURN", "RIVER"].iter().flat_map(|s| q["board"][*s].as_array().into_iter().flatten().filter_map(karte)).collect();
|
||||
if hand.len() != 2 {
|
||||
return a;
|
||||
}
|
||||
let davor = (a["action"].clone(), a["size"].clone());
|
||||
let mut b = crate::nl2::stackoff(q, a, (hand[0], hand[1]), &brett);
|
||||
if davor != (b["action"].clone(), b["size"].clone()) {
|
||||
b["vor"] = json!([davor.0, davor.1]);
|
||||
}
|
||||
b
|
||||
}
|
||||
|
||||
fn nl2(&self, q: &Value, a: Value) -> Value {
|
||||
if self.s.turnier || self.s.n == 2 || self.s.splash > 0 || self.s.art == crate::spiel::Art::PushFold || q.get("eigen").is_some() || q.get("probeHand").is_some() || q["nackt"] == true || q["vorrechnen"] == true || q["vorrechnen_strasse"] == true {
|
||||
// MOTOR_STACKOFF_SPLASH=1 (01.12.): an Splash-Tischen sonst keine NL2-Schicht, also auch keine Stack-off-Bepreisung
|
||||
// (99 auf J83-4: Turn-Raise 85 bb in einer Splash-Hand, nie bepreist). Nur die Bepreisung, nicht die uebrigen Regeln.
|
||||
if self.s.splash > 0 && !self.s.turnier && self.s.n > 2 && self.s.art != crate::spiel::Art::PushFold && crate::nl2::stackoff_splash_an()
|
||||
&& q.get("eigen").is_none() && q.get("probeHand").is_none() && q["nackt"] != true && q["vorrechnen"] != true && q["vorrechnen_strasse"] != true {
|
||||
return Self::stackoff_stufe(q, a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
let hand: Vec<u8> = q["heroCards"].as_array().into_iter().flatten().filter_map(karte).collect();
|
||||
|
||||
@@ -191,6 +191,24 @@ pub fn stackoff_an() -> bool {
|
||||
*AN.get_or_init(|| std::env::var("MOTOR_STACKOFF").is_ok_and(|x| x == "1"))
|
||||
}
|
||||
|
||||
/// MOTOR_REIN_STACKOFF=1 (01.12.): die Stack-off-Bepreisung auch fuer SHARINGANs Zuege mit MOTOR_SHARINGAN_REIN (braucht MOTOR_STACKOFF=1)
|
||||
pub fn rein_stackoff_an() -> bool {
|
||||
static AN: OnceLock<bool> = OnceLock::new();
|
||||
*AN.get_or_init(|| std::env::var("MOTOR_REIN_STACKOFF").is_ok_and(|x| x == "1"))
|
||||
}
|
||||
|
||||
/// MOTOR_STACKOFF_GEGENCALL=1 (01.12.): bindender Raise gegen einen Einsatz muss den Call schlagen (in `stackoff`)
|
||||
pub fn stackoff_gegencall_an() -> bool {
|
||||
static AN: OnceLock<bool> = OnceLock::new();
|
||||
*AN.get_or_init(|| std::env::var("MOTOR_STACKOFF_GEGENCALL").is_ok_and(|x| x == "1"))
|
||||
}
|
||||
|
||||
/// MOTOR_STACKOFF_SPLASH=1 (01.12.): die Stack-off-Bepreisung auch an Splash-Tischen (dort laeuft sonst keine NL2-Schicht)
|
||||
pub fn stackoff_splash_an() -> bool {
|
||||
static AN: OnceLock<bool> = OnceLock::new();
|
||||
*AN.get_or_init(|| std::env::var("MOTOR_STACKOFF_SPLASH").is_ok_and(|x| x == "1"))
|
||||
}
|
||||
|
||||
/// MOTOR_BLUFFPREIS=1: nicht bindende Einsaetze/Raises gegen echte NL2-Foldraten bepreisen (Tafel F/G, in `stackoff`)
|
||||
pub fn bluffpreis_an() -> bool {
|
||||
static AN: OnceLock<bool> = OnceLock::new();
|
||||
@@ -1583,7 +1601,26 @@ pub fn stackoff(q: &Value, mut a: Value, hand: (u8, u8), brett: &[u8]) -> Value
|
||||
let eq = gegen_faecher(&e, &j.2);
|
||||
let w = fo * netto(pot) + (1.0 - fo) * (eq * netto(end) - alles);
|
||||
// nur wenn der bindende Zug gegen Aufgeben klar verliert; die Call-Schaetzung waehlt nur zwischen CALL und FOLD
|
||||
// MOTOR_STACKOFF_GEGENCALL=1 (01.12.): gegen einen Einsatz muss der bindende Raise den Call schlagen, nicht nur das Aufgeben
|
||||
// (A4 auf A55: Jam -3.3 bb gegen Fold blieb, der Call auf 1/3 Topf war besser; 99 auf J83-4 Turn-Raise +1.6 gegen Fold).
|
||||
// Call-Wert wie unten: Chance gegen seine Einsatz-Range (Tafel B) gegen den Preis, nur diese Strasse; Abstand 3 % des Topfs danach.
|
||||
if bindend && tc > 0.0 && k == 1 && w >= -0.03 * nach && stackoff_gegencall_an() && legal("CALL") {
|
||||
if let Some(b) = stapel_zeile('B', st, lvl.saturating_sub(1), 9, 200.0) {
|
||||
let eb = gegen_faecher(&e, &b.2);
|
||||
let c = eb * netto(pot + tc) - tc;
|
||||
if c > w + 0.03 * nach {
|
||||
a["action"] = json!("CALL");
|
||||
a["size"] = Value::Null;
|
||||
a["reason"] = json!(format!("NL2-Stackoff {akt}->CALL (Raise {w:+.1} bb: alle folden {:.0}%, bezahlt gewinnen wir {:.0}%, n {:.0}; Call {c:+.1} bb, gewinnt {:.0}% gegen seine Einsatz-Range{}); {alt}", fo * 100.0, eq * 100.0, j.0, eb * 100.0, if vor { ", er raiste schon" } else { "" }));
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
if w >= -0.03 * nach {
|
||||
// Spur (01.12.): bindend geprueft und behalten, damit sichtbar ist, dass die Bepreisung lief (Aktion unveraendert)
|
||||
if bindend {
|
||||
a["reason"] = json!(format!("{alt} [NL2-Stackoff geprueft {w:+.1} bb: alle folden {:.0}%, bezahlt gewinnen wir {:.0}%]", fo * 100.0, eq * 100.0));
|
||||
}
|
||||
return a;
|
||||
}
|
||||
let (neu, grund) = if tc <= 0.0 {
|
||||
|
||||
+4
-1
@@ -5,6 +5,7 @@ Entscheidungen, ohne dass es jemand sah; dieser Bericht gehoert nach jeden Lauf)
|
||||
Quelle je gespieltem Zug (Feld `grund` in archiv/lauf/zuege.jsonl):
|
||||
S-Suche "sharingan search ..."
|
||||
S-Blueprint "sharingan blueprint ..." / sonstige "sharingan ..."
|
||||
S+Preis "NL2-Stackoff ...; sharingan ..." (MOTOR_REIN_STACKOFF: sein Zug, von der Stack-off-Bepreisung geaendert)
|
||||
Rein-Ausfall "[rein-ausfall: ...]" (MOTOR_SHARINGAN_REIN: SHARINGAN-Hand, doch unser Motor; Grund steht dabei)
|
||||
Motor alles andere
|
||||
Arm einer Hand: der erste Zug mit `ab.arm` A oder B (die Muenze haengt an der Hand). Ohne AB_SPOT steht alles unter "-".
|
||||
@@ -25,6 +26,8 @@ def quelle(grund):
|
||||
g = str(grund or "")
|
||||
if g.startswith("[rein-ausfall"):
|
||||
return "Rein-Ausfall"
|
||||
if g.startswith("NL2-Stackoff") and "; sharingan" in g:
|
||||
return "S+Preis"
|
||||
if g.startswith("sharingan search"):
|
||||
return "S-Suche"
|
||||
if g.startswith("sharingan"):
|
||||
@@ -77,7 +80,7 @@ def bericht(haende):
|
||||
gemischt["B"] += 1
|
||||
arme = collections.Counter(h["arm"] or "-" for h in haende.values())
|
||||
z.append(f"Haende je Arm: {dict(arme)}; Arm-B-Haende gemischt (nicht gezogen oder Rein-Ausfall): {gemischt['B']}")
|
||||
quellen = ("S-Suche", "S-Blueprint", "Motor", "Rein-Ausfall")
|
||||
quellen = ("S-Suche", "S-Blueprint", "S+Preis", "Motor", "Rein-Ausfall")
|
||||
z.append(f"{'Arm':4s} {'Strasse':8s} {'Zuege':>7s} " + " ".join(f"{q:>13s}" for q in quellen))
|
||||
for (arm, st) in sorted(je, key=lambda k: (k[0], ("PREFLOP", "FLOP", "TURN", "RIVER", "alle").index(k[1]) if k[1] in ("PREFLOP", "FLOP", "TURN", "RIVER", "alle") else 9)):
|
||||
c = je[(arm, st)]
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# raise_preis — eigene bindende Raises gegen den Call bepreisen, auch fuer SHARINGAN (Arm B) und an Splash-Tischen
|
||||
|
||||
- status: live
|
||||
- track: motor
|
||||
- frage: 01.12. 00:34-00:37 vier Haende -286 bb; zwei klare Fehler mit demselben Muster: mittlere Hand raist den Stack rein,
|
||||
bezahlt nur von Besseren (A4 auf A55 Check-Raise all-in 8x Topf = SHARINGAN Arm B; 99 auf J83-4 Turn-Raise = Motor, Splash-Hand).
|
||||
- befund: die Stack-off-Bepreisung (MOTOR_STACKOFF) prueft eigene bindende Raises schon, aber (1) nicht in Arm B (Rein-Weg reicht
|
||||
SHARINGAN unveraendert durch), (2) nicht an Splash-Tischen (nl2() steigt bei splash>0 aus), (3) nur gegen Aufgeben, nicht gegen Call
|
||||
(A4: Raise -3,3 bb blieb, Call +4,8; 99: Raise +1,6 blieb, Call +16,3). Geprueft und behalten war unsichtbar.
|
||||
- loesung: MOTOR_REIN_STACKOFF=1 (Arm B), MOTOR_STACKOFF_SPLASH=1, MOTOR_STACKOFF_GEGENCALL=1 (Raise muss den Call um 3 % des Topfs
|
||||
schlagen); Spur "[NL2-Stackoff geprueft ...]" im Grund. Exe ab4f21dc.
|
||||
- aus-pruefung: pruefung.txt, 786/786 gleich gegen die Live-Exe 80ee0d53 (400 zufaellig + 386 Splash nach dem Flop).
|
||||
- wirkung (alle 407 grossen Nachflop-Raises >= 40 bb seit 24.11., gespielte Antwort durch die Bepreisung): 64 geaendert
|
||||
(15 CHECK, 27 CALL, 22 FOLD), diese Haende wie gespielt -896 bb gluecksbereinigt; die behaltenen 343 +2428. Splash: 6/386 geaendert, +8,7.
|
||||
- tor: Live im A/B SHARINGAN_REIN (beide Arme mit Bepreisung). Nach jeder Sitzung: geaenderte Zuege ("NL2-Stackoff RAISE->") mit
|
||||
Kartenausgang zaehlen; Notbremse wie die Karte sharingan_rein.
|
||||
- decke: die Verlustzellen ~ -900 bb / 39.000 Haende ≈ 2,3 bb/100.
|
||||
- abbruch: Sitzungsende.
|
||||
- starter: Laeufer
|
||||
@@ -0,0 +1,76 @@
|
||||
"""Raise-Bepreisung (01.12.): MOTOR_REIN_STACKOFF / MOTOR_STACKOFF_SPLASH. Echte Anfragen seit 24.11. (Schattenlog des Live-Baums).
|
||||
|
||||
1. Aus: neue Exe ohne die neuen Schalter gegen die Live-Exe, 400 zufaellige und alle Splash-Nachflop-Anfragen: Aktion und Groesse gleich.
|
||||
2. Splash an: alle Splash-Nachflop-Anfragen mit MOTOR_STACKOFF_SPLASH=1 gegen ohne; jede Aenderung mit Karten und Ergebnis der
|
||||
Hand wie gespielt (glücksbereinigt). Schreibt pruefung.txt (Zaehlungen und Summen; Einzelfaelle nur mit PRUEF_FAELLE=<datei> ausserhalb).
|
||||
|
||||
python -I -X utf8 pruefung.py <live.exe> <neu.exe>
|
||||
"""
|
||||
import collections
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "stackoff_preis"))
|
||||
from aus_pruefung import LIVE, lauf # noqa: E402
|
||||
|
||||
HIER = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def main():
|
||||
alt, neu = sys.argv[1:3]
|
||||
gb = {}
|
||||
for z in open(LIVE + "/archiv/lauf/haende.jsonl", encoding="utf-8"):
|
||||
if '"zeit": "2026-11-2' not in z and '"zeit": "2026-11-30' not in z and '"zeit": "2026-12' not in z:
|
||||
continue
|
||||
h = json.loads(z)
|
||||
if h.get("bb"):
|
||||
gb[str(h["hand"])] = h["netto"] / h["bb"] - sum((h.get("aivat") or {}).values())
|
||||
F, SP = [], []
|
||||
for z in open(LIVE + "/archiv/lauf/schatten.jsonl", "rb"):
|
||||
if b'"q"' not in z:
|
||||
continue
|
||||
try:
|
||||
r = json.loads(z)
|
||||
except ValueError:
|
||||
continue
|
||||
if not (r.get("q") and r.get("motor")) or str(r.get("zeit", "")) < "2026-11-24":
|
||||
continue
|
||||
F.append(r)
|
||||
if str(r["motor"].get("reason", "")).startswith("Splash") and r["q"]["street"] != "PREFLOP":
|
||||
SP.append(r)
|
||||
random.seed(17)
|
||||
aus = random.sample(F, min(400, len(F))) + SP
|
||||
rund = lambda x: None if x is None else round(x, 6) # noqa: E731
|
||||
gleich = lambda x, y: (x.get("action"), rund(x.get("size"))) == (y.get("action"), rund(y.get("size"))) # noqa: E731
|
||||
a, b = lauf(alt, aus, {}), lauf(neu, aus, {})
|
||||
z = [f"Aus (neue Schalter nicht gesetzt) gegen {os.path.basename(alt)}: {sum(gleich(x, y) for x, y in zip(a, b))}/{len(aus)} gleich "
|
||||
f"(400 zufaellig + {len(SP)} Splash nach dem Flop)"]
|
||||
c = lauf(neu, SP, {"MOTOR_STACKOFF_SPLASH": "1"})
|
||||
d = b[400:]
|
||||
arten = collections.Counter()
|
||||
summe = 0.0
|
||||
faelle = []
|
||||
for r, x, y in zip(SP, d, c):
|
||||
if gleich(x, y):
|
||||
continue
|
||||
k = f"{r['q']['street']} {x.get('action')}->{y.get('action')}"
|
||||
arten[k] += 1
|
||||
g = gb.get(str(r.get("hand")))
|
||||
summe += g or 0.0
|
||||
faelle.append({"zeit": r.get("zeit"), "hand": r.get("hand"), "art": k, "gb": g, "grund": str(y.get("reason"))[:300]})
|
||||
z.append(f"Splash an (MOTOR_STACKOFF_SPLASH=1): {sum(arten.values())}/{len(SP)} Splash-Nachflop-Zuege geaendert {dict(arten)}; "
|
||||
f"diese Haende wie gespielt {summe:+.1f} bb gluecksbereinigt")
|
||||
spur = sum("NL2-Stackoff geprueft" in str(y.get("reason")) for y in c)
|
||||
z.append(f" davon mit Spur 'geprueft und behalten': {spur}")
|
||||
if os.environ.get("PRUEF_FAELLE"):
|
||||
with open(os.environ["PRUEF_FAELLE"] + ".tmp", "w", encoding="utf-8", newline="\n") as f:
|
||||
f.write("\n".join(json.dumps(x, ensure_ascii=False) for x in faelle) + "\n")
|
||||
os.replace(os.environ["PRUEF_FAELLE"] + ".tmp", os.environ["PRUEF_FAELLE"])
|
||||
open(os.path.join(HIER, "pruefung.txt"), "w", encoding="utf-8", newline="\n").write("\n".join(z) + "\n")
|
||||
print("\n".join(z))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,3 @@
|
||||
Aus (neue Schalter nicht gesetzt) gegen pokerbench-motor-schatten.exe: 786/786 gleich (400 zufaellig + 386 Splash nach dem Flop)
|
||||
Splash an (MOTOR_STACKOFF_SPLASH=1): 6/386 Splash-Nachflop-Zuege geaendert {'TURN RAISE->FOLD': 1, 'RIVER RAISE->CHECK': 3, 'TURN RAISE->CHECK': 2}; diese Haende wie gespielt +8.7 bb gluecksbereinigt
|
||||
davon mit Spur 'geprueft und behalten': 19
|
||||
Reference in New Issue
Block a user