diff --git a/docs/notizen/STAND-weltklasse.md b/docs/notizen/STAND-weltklasse.md index be4f09c5..1643c79c 100644 --- a/docs/notizen/STAND-weltklasse.md +++ b/docs/notizen/STAND-weltklasse.md @@ -300,3 +300,5 @@ das E1-Tor erneut. | Read-Wirkung je Knoten (15.11., `diag_welt DIAG_READ=1`, `tests/probe_angriff.rs`) | Jede Hand zweimal (Memory-Read / blind, gleiche Deals), Geld an der ersten abweichenden Entscheidung. **pool-nl2: Read − blind +1,4 bb/100, Pfad gleich in 97,4 %**, vorflop 0 % geänderte Entscheidungen, „frei“ (Angriff) 1–4 %, wirkt nur in der Verteidigung (Call → Fold, ≈ +5,5 bb/Hand). **micro-passiv: +34,9 bb/100, Pfad verschieden in 34 %.** Ursache belegt: `engine::read_gate::gate_reads` lässt einen Read nur für CallingStation durch (`earned_trust`, Regular/Nit/LAG = 0, Befund Nit-Leck: Ein-Straßen-Bluff-EV ignoriert die Mehrstraßen-Kosten der starken Caller); jeder NL2-Read (auch der echte, foldToBet 0,566) klassiert Regular → Angriffs-Kanal (`table_fold`, Bluff/C-Bet) blind. Probe: C-Bet IP auf Kd8h3c 17,8 % bei jedem Fold-Read 0,30–0,75 (bitgleich), im Entscheid fe 0,261 statt 0,504; nur die MDF-Verteidigung sieht den Read | Hebel Lücke × Häufigkeit: Angriffs-Kanal für Folder sicher öffnen (nur Fold-Reads, Called-Zweig gegen die oberen 1−fold der Range, Mehrstraßen-Kosten), Tore: Leiter ohne Verlierer inkl. nit, reg, pool-nl2, nemesis-2; LBR nicht schlechter | | Decke S1 je Leiter-Bot (15.11., `messung_decke/DECKE.txt`, 2000 Hände, LBR gegen den Bot = untere Schranke) | Engine schöpft im Mittel **46 %** der Decke aus, mit Archetyp-HUD ebenso 46 % (der HUD-Read bringt auf S1 nichts). Lücke Decke − Engine mit HUD, größte zuerst: cbet-folder +320 (41 %), micro-passiv +305 (49 %), umgekehrt +293 (61 %), textur-cbet +268 (34 %), check-raiser +239 (44 %), wert-sizer +238 (20 %), tanker +235 (35 %), polar +187 (45 %), balanciert +160 (57 %), 3bet-folder +137 (59 %), position +107 (59 %). Je Zelle ±90–180 bb/100: Anteile je Zeile grob, die Reihenfolge der großen Lücken belastbar. Stand vor RERAISE_TIEFE | Hebel nach Lücke × Micro-Häufigkeit: micro-passiv (= der Micro-Pool selbst), dann cbet-folder (RERAISE_TIEFE im Tor); Liniendiagnose micro-passiv läuft (`diag_micro-passiv.txt`) | | Decke: cbet-folder −31 (Priorität 1, 15.11.; `diag_welt`, `messung_decke/`) | Engine −31, GTO-Bot auf denselben Deals +57. Größter Posten Erhöhungskriege ≈ −58 bb/100 (Bot ≈ −7): `street_continuation` zählte jede Erhöhung gleich (`level` Bet/Raise), die Equity blieb über 3–4 Erhöhungen bei 0,63–0,65 (Top Pair + Gutshot 5-bettet all-in, Luft + OESD „Semibluff“ in reine Wertranges). Fix `RERAISE_TIEFE=1` (aus, bit-identisch): zweite Aggression einer Straße → Boden zwei Paare / Set, nur Kombi-Draws, Bluff-Anteil halb, gewichtet mit neuem Read `raise_to_bet` (Erhöhen gegen Einsatz; Sim-Gedächtnis, auf 0,30 geschrumpft; voll ≤ 0,25, aus ≥ 0,35). Ungegated: nemesis-2 −41 ±22 (Verlierer); auf Aggression gegated: −26 ±18 (Aggression trennt nicht: nemesis-2 0,32–0,38, reg 0,25–0,32); auf `raise_to_bet` (nemesis-2 0,41–0,49, reg 0,10–0,17, Folder 0,10–0,25): **Pilot +6,16 ±3,12, kein Verlierer** — cbet-folder +19,7 ±18,2 (−27 → −8), wert-sizer +20,4 ±10,9, reg +16,3 ±13,0, check-raiser +14,3 ±11,3, 3bet-folder −5,6 ±13,5 offen, nemesis-1/2/3, maniac, station neutral. LBR unberührt (Draht liefert `raise_to_bet` nicht → Vertrauen 0). Live wirkungslos, bis `lesen/` den Zähler liefert | **15.11. 03:15 umgebaut (Orchestrator: keine Schwelle, stetige Verengung):** nach der k-ten Aggression einer Straße bleibt der stärkste Anteil r^(k−1) dessen, was nach der ersten in der Range war (`Continuation::top_share`, `engine::range_filter` nach Made, dann Draw), plus Größen-Bluffanteil; r = `raise_to_bet` aus dem Gedächtnis, auf 0,30 geschrumpft, ohne Hände der Pool-Wert 0,30. Schwelle 0,25/0,35, Trust und `RERAISE_RUNG` entfernt. Aus bit-identisch (cmp cbet-folder, nemesis-2). Draht: `reads.raiseToBet` (a4d30e7), Zähler in `lesen/zaehler.py`: D2/D3 claude/gedaechtnis-voll-1f97d3 a3f79fc (Specs einzeln grün, Übergabe generisch; zählt erst ab dem nächsten Läuferstart, Pool-Anker 0,30/10 erst nach dem Tor). Eingereiht (vorgezogen, neue Binärdatei): `reraise-an`, `reraise-micro`, `pn2-reraise` gegen `pn2-mdf`, LBR erzwungener Read folder 0,12 aus/an + mittel 0,28 an, LBR blind an gegen `engine-s1-mdf` | +| RERAISE_TIEFE r^(k−1) volles Tor (15.11., `messung_zaehlung/arme/reraise-an` gegen `leiter-mdf`, 2000/4000 Deals × 4) | Mittel **+11,95 ±1,90**, besser: cbet-folder +46,1 ±14,3 (−31 → +15), fish +35,4, umgekehrt +27,6, reg +21,8, position +19,4, balanciert +15,6, tanker +15,3, wert-sizer +11,5, textur-cbet +10,7, nit +7,1, gto +6,9; 3bet-folder +2,3 ±8,5, nemesis-2 +4,4 ±7,0 neutral. **Verlierer nemesis-1 −11,40 ±9,05** → so nicht live. Ursache: nemesis-1 ist ein Schwellen-Erhöher (`raise_at` 0,587 auf jeder Stufe): seine Re-Raise-Range ist kaum enger als seine Raise-Range, r = `raise_to_bet` (unbedingt) verengt sie viel zu stark | **Umgebaut (15.11.): r = bedingter Read `reraise_to_raise`** (erneut aggressiv, nachdem auf derselben Straße nach eigener Aggression erhöht wurde; Sim-Gedächtnis `reraise_seen/made`, Draht `reads.reraiseToRaise` / `profile.reraiseToRaise`, Anker 0,30/10). Aus bit-identisch. Eingereiht: `reraise2-an`, `reraise2-micro`, `pn2-reraise` und LBR-an-Jobs auf neuer Binärdatei (erzwungener Read jetzt `reraiseToRaise`); Vorprobe nemesis-1 läuft (`arme/reraise2-n1`) | +| ANGRIFF_FOLD (15.11., c118034, Messschalter aus = bitgleich) | Fold-Reads nicht verdienter Stile (alle NL2-Reads = Regular) kommen als stilloser Rest (`Profile::fold_only`) durch `read_gate`; Called-Zweig gegen die stärksten 1−fold (`top_call_continuation`); Bluff-Größen bis VALUE_BAND. Probe: C-Bet bei Fold-Read ≥ 0,45 17,8 % → 81–92 %, blind unverändert; aus bitgleich (cbet-folder, nemesis-2, nit) | Tor eingereiht: `angriff-an` (alle Zeilen), `angriff-micro`, `pn2-angriff`, `angriff-lbr-folder-an` gegen `reraise-lbr-folder-aus` | diff --git a/src/exploit/mark.rs b/src/exploit/mark.rs index 99fb1b14..63736140 100644 --- a/src/exploit/mark.rs +++ b/src/exploit/mark.rs @@ -32,6 +32,7 @@ const WEAK_PLAYER: Profile = Profile { fold_to_steal: None, fold_to_raise: None, raise_to_bet: None, + reraise_to_raise: None, fold_only: false, }; @@ -69,6 +70,7 @@ pub fn with_mark(measured: Option, mark: &str) -> Option { fold_to_steal: known.fold_to_steal, fold_to_raise: known.fold_to_raise, raise_to_bet: known.raise_to_bet, + reraise_to_raise: known.reraise_to_raise, fold_only: known.fold_only, }) } diff --git a/src/exploit/profile.rs b/src/exploit/profile.rs index 44cff2e9..f8a97f99 100644 --- a/src/exploit/profile.rs +++ b/src/exploit/profile.rs @@ -77,6 +77,10 @@ pub struct Profile { /// How often the player RAISES when facing a postflop bet (raises over folds + calls + raises facing /// a bet). Sim memory only so far (`RERAISE_TIEFE` gate); `None` without it. pub raise_to_bet: Option, + /// How often the player RE-RAISES when raised after their own postflop bet/raise on that street + /// (aggressive over fold + call + aggressive in that spot). Drives the `RERAISE_TIEFE` narrowing + /// per raise level; `None` without it (pool value). + pub reraise_to_raise: Option, /// Set by `engine::read_gate` (switch `ANGRIFF_FOLD`) on the reduced profile of an untrusted style: /// only the fold reads were kept, so the profile has no style (`exploit::style::classify` = /// Unknown) and only the fold chance of hero's bets uses it. Never on the wire. diff --git a/src/exploit/sample.rs b/src/exploit/sample.rs index eed6ef77..737c2f42 100644 --- a/src/exploit/sample.rs +++ b/src/exploit/sample.rs @@ -43,6 +43,7 @@ pub const PRIOR: Profile = Profile { fold_to_steal: None, fold_to_raise: None, raise_to_bet: None, + reraise_to_raise: None, fold_only: false, }; @@ -96,6 +97,7 @@ pub fn shrink(profile: &Profile, hands: f64) -> Profile { fold_to_steal: profile.fold_to_steal, fold_to_raise: profile.fold_to_raise, raise_to_bet: profile.raise_to_bet, + reraise_to_raise: profile.reraise_to_raise, fold_only: profile.fold_only, } } diff --git a/src/exploit/street_continuation.rs b/src/exploit/street_continuation.rs index 45e6d2e1..10fab492 100644 --- a/src/exploit/street_continuation.rs +++ b/src/exploit/street_continuation.rs @@ -112,9 +112,11 @@ pub const RAISE_TO_BET_POOL: f64 = 0.30; /// The share of the range that continues after the villain's `k`-th aggression on one street /// (`k >= 2`): `r^(k-1)` with `r` the raise-to-bet read (shrunk to the pool in the read), clamped to -/// `[0.02, 1]`. +/// `[0.02, 1]`. Since 15.11. `r` is the CONDITIONAL re-raise read (`Profile::reraise_to_raise`, raised +/// after an own bet/raise on the street): the plain raise-facing-a-bet rate narrowed a threshold raiser +/// (same strength bar on every level, nemesis-1) far too much - ladder -11,40 +-9,05 bb/100. pub fn reraise_share(villain: &Villain, k: usize) -> f64 { - let r = villain.profile.as_ref().and_then(|p| p.raise_to_bet).filter(|a| a.is_finite()).unwrap_or(RAISE_TO_BET_POOL); + let r = villain.profile.as_ref().and_then(|p| p.reraise_to_raise).filter(|a| a.is_finite()).unwrap_or(RAISE_TO_BET_POOL); r.clamp(0.02, 1.0).powi(k.saturating_sub(1) as i32) } diff --git a/src/sim/memory.rs b/src/sim/memory.rs index 3286c4c1..a8141ad6 100644 --- a/src/sim/memory.rs +++ b/src/sim/memory.rs @@ -58,6 +58,10 @@ struct Counts { xr_made: u32, // Postflop raises facing a bet (Raise, or an all-in over someone else's bet on that street). raised_vs_bet: u32, + // Postflop actions facing aggression after the seat's own bet/raise on that street, and how many + // of them re-raised (`Profile::reraise_to_raise`). + reraise_seen: u32, + reraise_made: u32, } fn street_index(street: Street) -> Option { @@ -271,6 +275,16 @@ impl SessionMemory { // reads are measured, `tests/sim_opponent_stats`): leaving checks out of the // denominator makes a passive, check-heavy opponent look far more aggressive than it // is, and `bluff_share` reads aggression directly. + // Facing aggression after an own bet/raise on this street: the re-raise spot. + let own = history[..i].iter().rposition(|b| b.street == r.street && b.seat == seat && b.action.is_aggressive()); + if let Some(j) = own { + if matches!(r.action, SeenAction::Fold | SeenAction::Call) || r.action.is_aggressive() { + if history[j + 1..i].iter().any(|b| b.street == r.street && b.seat != seat && b.action.is_aggressive()) { + self.c.reraise_seen += 1; + self.c.reraise_made += r.action.is_aggressive() as u32; + } + } + } match r.action { SeenAction::Fold => { self.c.folded_to_bet += 1; @@ -379,6 +393,8 @@ impl SessionMemory { fold_to_raise: None, // Shrunk toward 0.30 (the middle of the `RERAISE_TIEFE` gate) with 10 pseudo-samples. raise_to_bet: Some((self.c.raised_vs_bet as f64 + 10.0 * 0.30) / ((facing_bet + self.c.raised_vs_bet) as f64 + 10.0)), + // Same shrinkage, conditional on having bet/raised the street before facing the raise. + reraise_to_raise: Some((self.c.reraise_made as f64 + 10.0 * 0.30) / (self.c.reraise_seen as f64 + 10.0)), vpip: ratio(self.c.vpip, self.c.hands), pfr: ratio(self.c.pfr, self.c.hands), fold_to_bet: ratio(self.c.folded_to_bet, facing_bet), @@ -477,6 +493,29 @@ mod tests { assert!((on.check_raise.unwrap() - 15.0 * 0.08 / 45.0).abs() < 1e-12); } + /// The conditional re-raise read counts only answers to a raise after an own bet/raise on the street: + /// the opponent bets, hero raises, the opponent re-raises (hit) or calls (miss); a call of hero's + /// first bet is not that spot. + #[test] + fn reraise_read_counts_raises_after_own_aggression() { + use SeenAction::*; + let pre = [rec(Street::Preflop, 1, PostSmallBlind), rec(Street::Preflop, 2, PostBigBlind), + rec(Street::Preflop, 1, Call), rec(Street::Preflop, 2, Check)]; + let line = |answer| { + let mut h = pre.to_vec(); + h.extend([rec(Street::Flop, 2, Bet), rec(Street::Flop, 1, Raise), rec(Street::Flop, 2, answer), + rec(Street::Turn, 1, Bet), rec(Street::Turn, 2, Call)]); + h + }; + let mut m = SessionMemory::new(); + for i in 0..40 { + m.observe_hand(&line(if i % 4 == 0 { Raise } else { Call }), 0, 2); + } + assert_eq!((m.c.reraise_seen, m.c.reraise_made), (40, 10)); + let r = m.read().expect("read").reraise_to_raise.unwrap(); + assert!((r - (10.0 + 3.0) / 50.0).abs() < 1e-12); + } + /// One heads-up hand (hero seat 0 = seat 1, opponent seat 2): the opponent calls hero's preflop /// raise (voluntary, not a raise), then calls a flop bet and folds the turn (passive, folds to a /// bet, never aggressive). diff --git a/src/wire/decode_villain.rs b/src/wire/decode_villain.rs index b5acbf51..81243bf8 100644 --- a/src/wire/decode_villain.rs +++ b/src/wire/decode_villain.rs @@ -46,6 +46,7 @@ fn profile(villain: &Value, path: &str) -> Result, Fault> { // Raise frequency facing a postflop bet (`RERAISE_TIEFE` gate): a forced read for measurement // (`LBR_PROFIL`); live it comes counted through `reads.raiseToBet` below. Absent: None. raise_to_bet: opt_number_member(object, &at_profile, "raiseToBet")?, + reraise_to_raise: opt_number_member(object, &at_profile, "reraiseToRaise")?, fold_only: false, }; // `hands` (extension, exploit::sample): with it, few hands count little @@ -196,6 +197,11 @@ fn with_reads(object: &Value, path: &str, p: Profile) -> Result if let Some(r) = get("raiseToBet")? { out.raise_to_bet = r.posterior(Some(RAISE_TO_BET_ANCHOR), RAISE_TO_BET_PRIOR); } + // Re-raises when raised after an own postflop bet/raise on that street (lesen/zaehler.py + // reraiseToRaise), same anchor and prior. + if let Some(r) = get("reraiseToRaise")? { + out.reraise_to_raise = r.posterior(Some(RAISE_TO_BET_ANCHOR), RAISE_TO_BET_PRIOR); + } // Shown river bets: raw share and count (the river gearbox blends them by their own count). if let Some(r) = get("riverBluffShown")? { if out.river_bluff_shown.is_none() { diff --git a/tests/reraise_narrowing.rs b/tests/reraise_narrowing.rs index 89fbb623..9c6a7b8e 100644 --- a/tests/reraise_narrowing.rs +++ b/tests/reraise_narrowing.rs @@ -87,7 +87,7 @@ fn the_share_per_level_is_the_raise_frequency_and_the_pool_without_a_read() { seat: 1, stack: 100.0, folded: false, - profile: Some(Profile { raise_to_bet: r, ..Profile::default() }), + profile: Some(Profile { reraise_to_raise: r, ..Profile::default() }), }; assert!((reraise_share(&read(Some(0.2)), 2) - 0.2).abs() < 1e-12); assert!((reraise_share(&read(Some(0.2)), 3) - 0.04).abs() < 1e-12); diff --git a/tests/wire_decode.rs b/tests/wire_decode.rs index 30aee291..ab35fdf1 100644 --- a/tests/wire_decode.rs +++ b/tests/wire_decode.rs @@ -382,3 +382,16 @@ fn raise_to_bet_read() { let direct = r#""villains":[{"seat":1,"stack":50,"folded":false,"profile":{"vpip":0.3,"foldToBet":0.6,"hands":24,"raiseToBet":0.15}}]"#; assert!((run(&plus(direct)).unwrap().villains[0].profile.unwrap().raise_to_bet.unwrap() - 0.15).abs() < 1e-12); } + +/// The conditional re-raise read (`reraiseToRaise`: re-raises when raised after an own postflop +/// bet/raise on the street), the one RERAISE_TIEFE narrows by: same anchor and strength as raiseToBet. +#[test] +fn reraise_to_raise_read() { + let hud = r#""villains":[{"seat":1,"stack":50,"folded":false,"profile":{"vpip":0.3,"foldToBet":0.6,"hands":24}}]"#; + assert_eq!(run(&plus(hud)).unwrap().villains[0].profile.unwrap().reraise_to_raise, None); + let counted = r#""villains":[{"seat":1,"stack":50,"folded":false,"profile":{"vpip":0.3,"foldToBet":0.6,"hands":24, + "reads":{"reraiseToRaise":{"n":10,"k":8}}}}]"#; + let p = run(&plus(counted)).unwrap().villains[0].profile.unwrap(); + assert!((p.reraise_to_raise.unwrap() - (8.0 + 3.0) / 20.0).abs() < 1e-12); + assert_eq!(p.raise_to_bet, None); +}