diff --git a/src/engine/decide.rs b/src/engine/decide.rs index 2e2d87ac..89fb5661 100644 --- a/src/engine/decide.rs +++ b/src/engine/decide.rs @@ -79,6 +79,18 @@ fn postflop(spot: &Spot, thresholds: &Thresholds, raw: &Spot, premium: f64) -> D // UNGEGATETEN Reads - der Boden darf den Gegner-Bluffanteil defensiv lesen (gegen einen // bewiesenen Nicht-Bluffer mehr folden), was `read_gate` dem Range-Modell verwehrt. let base = choose_postflop_with(spot, &equity, &called_equity(spot), thresholds, &hand_read); + // ENTHALTUNG=ruhig: a held raise's passive fallback is undone against a READ over-aggressor + // (raw read: the gate drops aggressive profiles), the old ABSTAIN stands (`postflop::enthaltung_ruhig`). + let base = if super::postflop::enthaltung_ruhig() + && base.reason.contains(super::postflop::RAISE_GEHALTEN) + && raw.live_villains().next().and_then(|v| v.profile.as_ref()).is_some_and(|p| { + p.aggression.is_some_and(|a| a >= 0.45) && p.aggression_confidence.is_some_and(|c| !c.is_nan() && c >= 0.25) + }) { + let reason = base.reason.split(super::postflop::RAISE_GEHALTEN).next().unwrap_or_default().to_string(); + Decision { choice: crate::game::Choice::Abstain, reason: format!("{reason} (aggressor read: held)"), ..base } + } else { + base + }; let floored = crate::exploit::mdf_floor::floor(raw, hand_read.made, base).with_equity(equity.share); // Defensive river veto (the belief+trust gearbox, CASH ONLY): a confident read that the // villain UNDER-bluffs its river bet turns a heuristic call into a fold. This is the one diff --git a/src/engine/postflop.rs b/src/engine/postflop.rs index 1b6dad46..1a2c9eaa 100644 --- a/src/engine/postflop.rs +++ b/src/engine/postflop.rs @@ -17,9 +17,22 @@ use crate::rng::Rng; /// (default): ABSTAIN as before, bit-identical. fn enthaltung_passiv() -> bool { static ON: std::sync::OnceLock = std::sync::OnceLock::new(); - *ON.get_or_init(|| std::env::var("ENTHALTUNG").as_deref() == Ok("passiv")) + *ON.get_or_init(|| matches!(std::env::var("ENTHALTUNG").as_deref(), Ok("passiv") | Ok("ruhig"))) } +/// `ENTHALTUNG=ruhig`: like `passiv`, but against a villain READ as an over-aggressor (postflop +/// aggression >= 0.45, confidence >= 0.25) the held raise stays ABSTAIN (= fold facing a bet): the +/// enthaltung gate 15.11. measured the passive call as a consistent loser against the maniac only +/// (-1.69 +-1.33 bb/100, all four draws negative), the barrels after the call cost more than the +/// fold. Applied in `decide` on the raw (ungated) read, keyed on `RAISE_GEHALTEN` in the reason. +pub fn enthaltung_ruhig() -> bool { + static ON: std::sync::OnceLock = std::sync::OnceLock::new(); + *ON.get_or_init(|| std::env::var("ENTHALTUNG").as_deref() == Ok("ruhig")) +} + +/// The reason marker of a held raise that fell back to its passive line (`ENTHALTUNG`). +pub const RAISE_GEHALTEN: &str = ", raise held -> "; + fn label(choice: Choice, kind: Option) -> String { match (choice, kind) { (Choice::Raise { to }, Some(RaiseKind::Semibluff)) => format!("semibluff raise to {to:.2}"), @@ -227,7 +240,7 @@ pub fn choose_postflop_with( return priced(Decision::new( choice, abstain_confidence(gap, error), - format!("{head}: raise EV lead {gap:+.2} inside its error {error:.2}, raise held -> {name}"), + format!("{head}: raise EV lead {gap:+.2} inside its error {error:.2}{RAISE_GEHALTEN}{name}"), )); } }