Files
pokerfreak/src/exploit/made_ladder.rs
T
mmintelandClaude Opus 5.5 9a9c6c946d Range narrowing from action history, position from inferred button
Wire: optional history decoding. exploit::range_model: role band + postflop
continuations. preflop::button / seat_position: button inference from blinds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:41:03 +01:00

26 lines
689 B
Rust

use crate::read::made::Made;
/// The rungs a continuation floor moves on, weakest first.
const LADDER: [Made; 9] = [
Made::Air,
Made::BottomPair,
Made::MiddlePair,
Made::TopPairWeakKicker,
Made::TopPairGoodKicker,
Made::Overpair,
Made::TwoPair,
Made::Set,
Made::Straight,
];
/// A floor never goes below bottom pair (rung 1): "any made hand" is the loosest claim.
const LOWEST_RUNG: i32 = 1;
/// Rung `base + shift`, clamped to the ladder. Positive shifts are stricter.
pub fn rung(base: i32, shift: i32) -> Made {
let index = base
.saturating_add(shift)
.clamp(LOWEST_RUNG, LADDER.len() as i32 - 1);
LADDER[index as usize]
}