Files
pokerfreak/src/preflop/first_raiser.rs
T
mmintelandClaude Opus 5.5 7f40fa49a0 CFR charts with both blinds as defenders, short deck tables
EP, MP, CO and BTN now play three-player games against small and big
blind (push/fold and open/call/3-bet trees, CFR+ for three players,
exploitability summed over all three best responses). Deal weights and
three-way shares are documented approximations. Short deck gets its own
equity table and charts from the same generator (--deck short).

Open width shrinks in EP/MP (e.g. EP 100bb 0.291 -> 0.249, MP 40bb
0.357 -> 0.293); frozen exploitability stays at 0-4 micro-bb (full) and
0-9 micro-bb (short). Lookup and advice cover SB vs open/jam, BB after
an SB call and the opener vs an SB 3-bet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:02:45 +01:00

41 lines
1.3 KiB
Rust

use crate::game::{SeenAction, Spot, Street};
/// Seats that raised or went all-in preflop, in order.
fn raisers(spot: &Spot) -> impl Iterator<Item = u8> + '_ {
spot.history
.iter()
.filter(|r| r.street == Street::Preflop && matches!(r.action, SeenAction::Raise | SeenAction::AllIn))
.map(|r| r.seat)
}
/// The seat that opened the pot with a raise (or jam), when the history shows one.
pub fn first_raiser(spot: &Spot) -> Option<u8> {
raisers(spot).next()
}
/// The seat of the only preflop raise, `None` with no raise or with several.
pub fn sole_raiser(spot: &Spot) -> Option<u8> {
let mut all = raisers(spot);
let first = all.next()?;
all.next().is_none().then_some(first)
}
/// The seat of the second preflop raise (the 3-bet), when the history shows one.
pub fn second_raiser(spot: &Spot) -> Option<u8> {
raisers(spot).nth(1)
}
/// Number of preflop raises and jams.
pub fn raise_count(spot: &Spot) -> usize {
raisers(spot).count()
}
/// Seats that called preflop (a big blind check is not a call), in order.
pub fn preflop_callers(spot: &Spot) -> Vec<u8> {
spot.history
.iter()
.filter(|r| r.street == Street::Preflop && r.action == SeenAction::Call)
.map(|r| r.seat)
.collect()
}