Hand percentiles (169-class equity ranking, Omaha-5 structural score with empirical CDF), position/situation inference, position x situation charts, all-in-or-fold charts, pot-odds all-in calls, advise(); exploit style classification, threshold adjustment and villain range guess. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
926 B
Rust
27 lines
926 B
Rust
//! Short human-readable explanation of a chart decision.
|
|
|
|
use super::chart_row::ChartRow;
|
|
use super::plan::ChartAction;
|
|
use super::position::Position;
|
|
use super::situation::Situation;
|
|
|
|
fn percent(cutoff: f64) -> u32 {
|
|
(cutoff * 100.0).round().clamp(0.0, 100.0) as u32
|
|
}
|
|
|
|
/// e.g. `"BTN open, top 38%"`, `"BB vs open, call top 30%"`, `"EP open, fold outside top 15%"`.
|
|
pub fn describe(
|
|
position: Position,
|
|
situation: Situation,
|
|
action: ChartAction,
|
|
row: &ChartRow,
|
|
) -> String {
|
|
let head = format!("{} {}", position.label(), situation.label());
|
|
match action {
|
|
ChartAction::Raise => format!("{head}, top {}%", percent(row.raise)),
|
|
ChartAction::Call => format!("{head}, call top {}%", percent(row.call)),
|
|
ChartAction::Jam => format!("{head}, jam top {}%", percent(row.jam)),
|
|
ChartAction::Fold => format!("{head}, fold outside top {}%", percent(row.widest())),
|
|
}
|
|
}
|