//! How each style moves the thresholds, as data. use super::style::Style; #[derive(Clone, Copy, Debug, PartialEq)] pub struct Shift { /// Added to `call_margin`. pub call_margin: f64, /// Added to `value_raise`. pub value_raise: f64, /// Multiplies `range_width_scale`. pub range_width: f64, } const NONE: Shift = Shift { call_margin: 0.0, value_raise: 0.0, range_width: 1.0, }; /// `None` for `Unknown`: nothing is learned from an empty profile. pub fn shift_for(style: Style) -> Option { match style { Style::Unknown => None, Style::Regular => Some(NONE), // Their bets are strong, they fold to ours, we defend less. Style::Nit => Some(Shift { call_margin: 0.04, value_raise: 0.02, range_width: 0.85, }), // They call too much: value-bet thinner, never bluff. Style::CallingStation => Some(Shift { call_margin: 0.0, value_raise: -0.04, range_width: 1.0, }), // They bluff and raise light: call wider, defend wider. Style::LooseAggressive => Some(Shift { call_margin: -0.015, value_raise: -0.01, range_width: 1.15, }), } }