Files
pokerfreak/src/preflop/full_chart.rs
T
mmintel 9c79d8236b Acceptance 5.11.: channel play without AFK, quiet focus, working Cockpit, stronger play
- Practice tables: 20-min session 54/54 turns at the server, control session 28 turns,
  0 timeouts; stage: 3 tables, two rounds each, clean teardown.
- Never let the clock run: an engine abstention becomes check or fold (nie_verstreichen).
- Mittler join in a fixed order (kill the duplicate, then announce), a mittler ends with its
  game, the laufwache opens no tables, stop waits for the runner to stand up.
- Focus: no lobby connections from HUD, probes or layout; "Focus Window on Turn" off.
- Tables: disconnected or sitting-out opponents do not count; a table without channel is
  closed and avoided after 45 s; the join event keeps the writer's pid (strict invariants).
- Geldwache: same room list as the runner, the table's own report, stand up before closing.
- Engine: the small blind completes the top 65 % against limpers (price per fair share);
  the calling range of a bet is as wide as the villain calls - value bets into stations.
- Cockpit: the source tree never comes from SHELL; one operating set for laufwache and
  Cockpit (sicht/start.py --client, ServerStart).
- Project lives in ~/Projects/pokerfreak (kern was a detour).
2026-11-05 16:10:43 +01:00

92 lines
3.1 KiB
Rust

//! Raise / call / jam cut-offs for full-action games (six-max reference), as data.
//!
//! Rows by position, columns by situation (`Unopened`, `FacingLimp`, `FacingOpen`,
//! `FacingThreeBetPlus`). `FacingAllIn` is priced, not charted (`allin_call_cutoff`).
//! The percentiles are shares of all starting hands, best first.
use super::chart_row::ChartRow;
use super::position::Position;
use super::situation::Situation;
const fn row(raise: f64, call: f64, jam: f64) -> ChartRow {
ChartRow::new(raise, call, jam)
}
const EARLY: [ChartRow; 4] = [
row(0.15, 0.15, 0.0),
row(0.10, 0.22, 0.0),
row(0.04, 0.08, 0.0),
row(0.025, 0.045, 0.0),
];
const MIDDLE: [ChartRow; 4] = [
row(0.19, 0.19, 0.0),
row(0.13, 0.27, 0.0),
row(0.05, 0.10, 0.0),
row(0.03, 0.05, 0.0),
];
const CUTOFF: [ChartRow; 4] = [
row(0.27, 0.27, 0.0),
row(0.18, 0.34, 0.0),
row(0.07, 0.15, 0.0),
row(0.035, 0.06, 0.0),
];
const BUTTON: [ChartRow; 4] = [
row(0.42, 0.42, 0.0),
row(0.28, 0.45, 0.0),
row(0.09, 0.24, 0.0),
row(0.04, 0.08, 0.0),
];
/// The small blind against limpers completes the top 65 % (and isolates the top 20 %).
///
/// It pays half a big blind into a pot of at least two and a half; every further limper adds a bet
/// and an opponent, so the price against a fair share of the pot stays put, and so does the range.
/// Calibrated 5.11.2026: raw multiway equity against random hands (Monte Carlo), realized as in
/// the CFR model (`cfr::spot_params`: `REALIZATION_SPREAD` 1.3, out of position 0.85), the big
/// blind raising its top 18 %: completing pays for every class up to about the 68th percentile,
/// with and without antes, against one or two limpers; beyond it offsuit trash, near zero or worse.
const SMALL_BLIND_COMPLETES: f64 = 0.65;
const SMALL_BLIND: [ChartRow; 4] = [
row(0.38, 0.45, 0.0),
row(0.20, SMALL_BLIND_COMPLETES, 0.0),
row(0.09, 0.15, 0.0),
row(0.04, 0.07, 0.0),
];
const BIG_BLIND: [ChartRow; 4] = [
row(0.15, 1.0, 0.0),
row(0.18, 1.0, 0.0),
row(0.08, 0.35, 0.0),
row(0.04, 0.09, 0.0),
];
const HEADS_UP_BUTTON: [ChartRow; 4] = [
row(0.75, 0.90, 0.0),
row(0.40, 1.0, 0.0),
row(0.15, 0.55, 0.0),
row(0.05, 0.14, 0.0),
];
/// Unknown position is charted like early position (the tightest, hence the safest).
fn rows_for(position: Position) -> &'static [ChartRow; 4] {
match position {
Position::Early | Position::Unknown => &EARLY,
Position::Middle => &MIDDLE,
Position::Cutoff => &CUTOFF,
Position::Button => &BUTTON,
Position::SmallBlind => &SMALL_BLIND,
Position::BigBlind => &BIG_BLIND,
Position::HeadsUpButton => &HEADS_UP_BUTTON,
}
}
/// `None` for `FacingAllIn`, which has no fixed chart.
pub fn full_row(position: Position, situation: Situation) -> Option<ChartRow> {
let column = match situation {
Situation::Unopened => 0,
Situation::FacingLimp => 1,
Situation::FacingOpen => 2,
Situation::FacingThreeBetPlus => 3,
Situation::FacingAllIn => return None,
};
Some(rows_for(position)[column])
}