From c1180342ae7acde01b975608564cc03986180bc5 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 15 Nov 2026 04:37:11 +0100 Subject: [PATCH] ANGRIFF_FOLD=1 (Messschalter, aus = bitgleich): Fold-Reads nicht verdienter Stile kommen als stilloser Profil-Rest (fold_only) durch read_gate in den Angriff; Called-Zweig gegen die staerksten 1-fold der Range; Bluff-Groessen bis VALUE_BAND Probe: C-Bet-Haeufigkeit bei Fold-Read >= 0,45 von 17,8 % auf 81-92 %; blind unveraendert. Co-Authored-By: Claude Opus 5.5 --- src/engine/called_equity.rs | 6 ++++-- src/engine/read_gate.rs | 31 ++++++++++++++++++++++++++++++- src/engine/size_policy.rs | 6 ++++++ src/exploit/call_floor.rs | 16 ++++++++++++++++ src/exploit/mark.rs | 2 ++ src/exploit/profile.rs | 4 ++++ src/exploit/sample.rs | 2 ++ src/exploit/style.rs | 2 +- src/wire/decode_villain.rs | 1 + 9 files changed, 66 insertions(+), 4 deletions(-) diff --git a/src/engine/called_equity.rs b/src/engine/called_equity.rs index ed85e265..e53f6e51 100644 --- a/src/engine/called_equity.rs +++ b/src/engine/called_equity.rs @@ -5,7 +5,7 @@ use crate::card::Card; use crate::equity::monte_carlo::estimate; use crate::equity::query::Query; use crate::equity::villain_range::VillainRange; -use crate::exploit::call_floor::call_continuation; +use crate::exploit::call_floor::{call_continuation, top_call_continuation}; use crate::exploit::range_model::range_spec; use crate::exploit::size_notch::size_notch; use crate::exploit::table_fold::pressure_ratio; @@ -55,7 +55,9 @@ fn simulate(spot: &Spot, notch: i32, ratio: f64) -> Option { .live_villains() .map(|v| { let mut spec = range_spec(spot, v); - spec.continues.push(call_continuation(v, spot.street, ratio, spot.to_call > 0.0)); + let fold_only = v.profile.is_some_and(|p| p.fold_only); + let call = if fold_only { top_call_continuation } else { call_continuation }; + spec.continues.push(call(v, spot.street, ratio, spot.to_call > 0.0)); range_filter(&spec, rules, spot.variant, &spot.board) }) .collect(); diff --git a/src/engine/read_gate.rs b/src/engine/read_gate.rs index 50d8c3d0..b85b9226 100644 --- a/src/engine/read_gate.rs +++ b/src/engine/read_gate.rs @@ -11,6 +11,7 @@ //! loose table, may never tip us into a worse decision. use crate::exploit::style::{classify, Style}; +use crate::exploit::profile::Profile; use crate::game::{Spot, Villain}; /// How much of a read's adjustment each opponent style has EARNED on the ladder — the measured right @@ -64,9 +65,37 @@ pub fn gate_reads(spot: &Spot) -> Spot { .villains .iter() .map(|v| Villain { - profile: v.profile.filter(|p| exploit_worthy(classify(p))), + profile: v.profile.and_then(|p| if exploit_worthy(classify(&p)) { Some(p) } else { fold_reads(&p) }), ..v.clone() }) .collect(); Spot { villains, ..spot.clone() } } + +/// Messschalter (einmal gelesen): `ANGRIFF_FOLD=1` laesst von einem nicht verdienten Stil (Regular, +/// Nit, LAG) die Fold-Reads durch - foldToBet (gepoolt und je Strasse) und foldToCbet - als +/// stilloses Profil (`Profile::fold_only`, `classify` = Unknown): kein Stil-Shift, nur die +/// Fold-Wahrscheinlichkeit von Heros Einsaetzen (`exploit::table_fold`). Gegen die Mehrstrassen-Kosten +/// starker Caller (Befund Nit-Leck) spielt der Called-Zweig dann gegen die staerksten 1 - fold der +/// Range (`exploit::call_floor`). Befund 15.11. (`diag_welt DIAG_READ=1`): jeder NL2-Read klassiert +/// Regular und lief im Angriff blind (pool-nl2 Read − blind +1,4 bb/100, C-Bet bitgleich bei jedem +/// Fold-Read). Vorgabe: aus (alt, bit-identisch). +pub fn fold_attack_enabled() -> bool { + use std::sync::OnceLock; + static ON: OnceLock = OnceLock::new(); + *ON.get_or_init(|| std::env::var("ANGRIFF_FOLD").as_deref() == Ok("1")) +} + +/// The fold reads of an untrusted profile as a style-less profile, when `ANGRIFF_FOLD` is on and it +/// carries one; otherwise `None` (blind, as before). +fn fold_reads(p: &Profile) -> Option { + let any = p.fold_to_bet.is_some() || p.fold_to_cbet.is_some() || p.street_fold_to_bet.iter().any(Option::is_some); + (fold_attack_enabled() && any).then(|| Profile { + fold_to_bet: p.fold_to_bet, + street_fold_to_bet: p.street_fold_to_bet, + fold_to_cbet: p.fold_to_cbet, + confidence: p.confidence, + fold_only: true, + ..Profile::default() + }) +} diff --git a/src/engine/size_policy.rs b/src/engine/size_policy.rs index 9a943950..2c98a0d5 100644 --- a/src/engine/size_policy.rs +++ b/src/engine/size_policy.rs @@ -110,7 +110,13 @@ pub fn extra_call_margin(spot: &Spot, read: &HandRead) -> f64 { fn band(spot: &Spot, kind: RaiseKind, share: f64, read: &HandRead) -> (f64, f64) { let t = tier(read.made); let late = spot.street != Street::Flop; + // ANGRIFF_FOLD against a style-less fold read: bluffs and semibluffs may also take the value sizes, + // where the read's fold chance applies in full (a small bet is folded less, `exploit::fold_chance`); + // the EV picks the size. + let fold_read = super::read_gate::fold_attack_enabled() + && spot.live_villains().any(|v| v.profile.is_some_and(|p| p.fold_only)); let base = match kind { + RaiseKind::Semibluff | RaiseKind::Bluff if fold_read => (BLUFF_BAND.0, VALUE_BAND.1), RaiseKind::Semibluff | RaiseKind::Bluff | RaiseKind::ThinValue => BLUFF_BAND, RaiseKind::Value if t == Tier::Medium => BLUFF_BAND, RaiseKind::Value if t == Tier::Monster && late && share >= NUT_SHARE => NUT_BAND, diff --git a/src/exploit/call_floor.rs b/src/exploit/call_floor.rs index e08c2551..f7d6d711 100644 --- a/src/exploit/call_floor.rs +++ b/src/exploit/call_floor.rs @@ -28,3 +28,19 @@ pub fn call_continuation(villain: &Villain, street: Street, ratio: f64, facing_r top_share: None, } } + +/// `call_continuation` against a style-less fold read (`Profile::fold_only`, `ANGRIFF_FOLD`): whoever +/// calls holds the strongest `1 - fold` of the range (Bayes for a caller who continues by strength), +/// not the calling floor topped up with random hands - the multi-street cost of a called bluff into +/// a strong range (Befund Nit-Leck) is priced into the called branch. +pub fn top_call_continuation(villain: &Villain, street: Street, ratio: f64, facing_raise: bool) -> Continuation { + Continuation { + board_len: street.board_len(), + min_made: crate::read::made::Made::Air, + draws_continue: true, + min_draw: crate::read::draw::Draw::None, + bluff_share: 0.0, + continue_share: None, + top_share: Some(1.0 - fold_chance(villain.profile.as_ref(), ratio, facing_raise)), + } +} diff --git a/src/exploit/mark.rs b/src/exploit/mark.rs index 55b09302..99fb1b14 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, + fold_only: false, }; fn prior(mark: &str) -> Option { @@ -68,5 +69,6 @@ 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, + fold_only: known.fold_only, }) } diff --git a/src/exploit/profile.rs b/src/exploit/profile.rs index 7d8979b4..44cff2e9 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, + /// 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. + pub fold_only: bool, } /// Equity vs a random hand on the river below which a shown river bet counts as air (a bluff): the diff --git a/src/exploit/sample.rs b/src/exploit/sample.rs index 7d5a855e..eed6ef77 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, + fold_only: false, }; /// Postflop moves at which an aggression read and the population weigh the same — the session @@ -95,6 +96,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, + fold_only: profile.fold_only, } } diff --git a/src/exploit/style.rs b/src/exploit/style.rs index 01d5bb76..1aa2b47e 100644 --- a/src/exploit/style.rs +++ b/src/exploit/style.rs @@ -70,7 +70,7 @@ pub fn classify(profile: &Profile) -> Style { let tight = vpip.is_some_and(|v| v <= NIT_VPIP) || (fold.is_some_and(|b| b >= NIT_FOLD_TO_BET) && vpip.is_none_or(|v| v <= NIT_MAX_VPIP_WITH_FOLDS)); - if vpip.is_none() && pfr.is_none() && fold.is_none() { + if profile.fold_only || (vpip.is_none() && pfr.is_none() && fold.is_none()) { Style::Unknown } else if loose && pfr.is_some_and(|f| f >= AGGRESSIVE_PFR) { Style::LooseAggressive diff --git a/src/wire/decode_villain.rs b/src/wire/decode_villain.rs index 2f534b72..b5acbf51 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")?, + fold_only: false, }; // `hands` (extension, exploit::sample): with it, few hands count little let shrunk = match opt_number_member(object, &at_profile, "hands")? {