Bluffing and bluff catching driven by opponent frequencies

- exploit::fold_chance: documented foldToBet -> P(fold) map by bet size, per villain
- engine: two-branch EV for every raise (fold branch, called branch vs calling range)
- semibluffs first, pure bluffs heads-up above a fold and EV threshold
- betting ranges keep a bluff share (size, street, style or new profile.aggression)
- guards: no bluffs vs never-folders, no bluff catch vs ranges without bluffs
- steal width in unopened pots from how often the blinds fold
- combo-list sampling for narrow two-card ranges

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 13:11:38 +01:00
co-authored by Claude Opus 5.5
parent 8b74c451a2
commit 1ad6f76088
41 changed files with 2871 additions and 1720 deletions
+26
View File
@@ -0,0 +1,26 @@
use super::fold_chance::{fold_chance, MAX_FOLD};
use crate::game::Spot;
/// Pressure of a raise to `to`: the chips beyond a call, `to - to_call`, over the pot
/// after calling, `pot + to_call`. A plain bet (`to_call = 0`) is `to / pot`.
/// 0 when the pot is empty or the numbers are not finite.
pub fn pressure_ratio(pot: f64, to_call: f64, to: f64) -> f64 {
let base = pot + to_call;
let ratio = (to - to_call).max(0.0) / base;
if base > 0.0 && ratio.is_finite() { ratio } else { 0.0 }
}
/// P(every live villain folds) to hero raising to `to`: each villain's `fold_chance`
/// (from their own profile) times the shared `scale` (`Thresholds::fold_equity_scale`),
/// capped, multiplied over the villains as independent events. No live villain: 0.
pub fn table_fold(spot: &Spot, to: f64, scale: f64) -> f64 {
let ratio = pressure_ratio(spot.pot, spot.to_call, to);
let facing_raise = spot.to_call > 0.0;
let scale = if scale.is_finite() { scale.max(0.0) } else { 1.0 };
let mut live = spot.live_villains().peekable();
if live.peek().is_none() {
return 0.0;
}
live.map(|v| (fold_chance(v.profile.as_ref(), ratio, facing_raise) * scale).clamp(0.0, MAX_FOLD))
.product()
}