diff --git a/src/engine/glaube.rs b/src/engine/glaube.rs index ba6592ed..18df4069 100644 --- a/src/engine/glaube.rs +++ b/src/engine/glaube.rs @@ -258,6 +258,9 @@ pub fn bluff(profile: Option<&Profile>, street: Street, prior: f64) -> f64 { return prior; } let ok = |x: Option| x.filter(|v| v.is_finite()); + // Hierarchy: an unread villain (or the pool baseline) starts at the pool, never above the heuristic. + let unread = profile.is_none_or(|p| p.pool_baseline); + let prior = if unread { prior.min(POOL_RIVER_AIR) } else { prior }; let Some(p) = profile else { return prior }; match (ok(p.river_bluff_share), ok(p.river_bluff_shown)) { (Some(share), Some(n)) if n > 0.0 => beta_mean(prior, STREET_PRIOR, share.clamp(0.0, 1.0), n).min(MAX_BLUFF_SHARE), @@ -265,6 +268,11 @@ pub fn bluff(profile: Option<&Profile>, street: Street, prior: f64) -> f64 { } } +/// Pool air share of shown river bets/raises at NL2 (real hands 15./16.11., `lesen/linien.py`, air = +/// equity below 0,40 vs a random hand on the final board): 10 of 68 (0,15); multi-street lines 5 of 36, +/// river all-ins 0 of 7. The balanced share `s/(1+2s)` the heuristic uses is 0,25 for a half-pot bet. +pub const POOL_RIVER_AIR: f64 = 0.15; + /// Posterior mean of a Beta prior with mean `m0` worth `k0` observations after `n` observations /// with mean `x`. fn beta_mean(m0: f64, k0: f64, x: f64, n: f64) -> f64 {