- 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>
33 lines
1.1 KiB
Rust
33 lines
1.1 KiB
Rust
/// Hero's equity share in the called branch of a raise: against the hands that call
|
|
/// it, not against the whole range (a bet folds out the weak part, the rest is stronger).
|
|
/// Raw shares, before the multiway realisation discount.
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
pub struct Called {
|
|
by_size: Vec<(f64, f64)>,
|
|
flat: Option<f64>,
|
|
}
|
|
|
|
impl Called {
|
|
/// The same share for every size (no calling-range model: the whole range calls).
|
|
pub fn flat(share: f64) -> Called {
|
|
Called { by_size: Vec::new(), flat: Some(share) }
|
|
}
|
|
|
|
/// One share per raise-to amount.
|
|
pub fn sized(by_size: Vec<(f64, f64)>) -> Called {
|
|
Called { by_size, flat: None }
|
|
}
|
|
|
|
/// The share for a raise to `to`; `fallback` when the size is unknown or the share
|
|
/// is not a probability.
|
|
pub fn share_at(&self, to: f64, fallback: f64) -> f64 {
|
|
self.by_size
|
|
.iter()
|
|
.find(|(size, _)| (size - to).abs() < 1e-9)
|
|
.map(|(_, share)| *share)
|
|
.or(self.flat)
|
|
.filter(|s| s.is_finite() && (0.0..=1.0).contains(s))
|
|
.unwrap_or(fallback)
|
|
}
|
|
}
|