Files
pokerfreak/src/odds/ev.rs
T
mmintelandClaude Opus 5.5 c8257b4248 Rake in der Live-Entscheidung hinter RAKE_LIVE (Stufe 1: Postflop), Mikro-Rake gemessen
Mikro-Tisch NL 0.01/0.02 aus 857 Haenden gemessen: 5 % auf den Cent (half-even), Deckel 10 bb,
kein no-flop-no-drop (RakeRule::MICRO_BB). rake::live: thread-lokaler Scope, nur Cash-Spots unter
RAKE_LIVE=1; ohne Scope ist net() die Identitaet -> aus = bit-gleich zu 62e51bb (1767 Postflop-
und 2776 Preflop-Spots byte-gleich).

Gerakt: odds::ev, break_even/MDF, Bluff-Zweige und Bluff-Schranke, River-Baum v1, river_game,
turn_river_game, open_jam, Audit (Jam/All-in). Simulator: SIM_RAKE=mikro (TableCost::MICRO).
chartgen charts --rake mikro (ChartRake::Micro) fuer Stufe 2 (Preflop-Tabellen, noch nicht verdrahtet).

Nachspiel: 20/1767 Aktionen kippen, Audit +21.94 bb fuer das Rake-Spiel (ein Turn-Spot +21.72),
River -1.73. Bericht und Schaltvorschlag: messung_rake/BERICHT.md. Specs rake_rule 22, rake_live 7 gruen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 00:58:53 +01:00

42 lines
1.7 KiB
Rust

//! Expected value per action, in chips, relative to folding now (fold = 0).
//!
//! Approximations (documented, deliberate):
//! * Hero has nothing committed on this street, so a raise "to X" adds X chips.
//! * If a raise is called, exactly one villain calls and adds `X - to_call`
//! (the existing bet is already in the pot); the rest fold.
//! * `share` (equity) is realised in full; no later-street betting is modelled.
//! * Every pot hero wins is the pot it takes home, `rake::live::net` (the room's rake off). Outside a
//! `RAKE_LIVE` cash scope `net` is the identity and every formula is the raw one, bit for bit.
use crate::rake::live::net;
/// Folding is the reference point.
pub fn fold() -> f64 {
0.0
}
/// Free check: hero keeps `share` of the current pot (net of rake).
pub fn check(share: f64, pot: f64) -> f64 {
share * net(pot)
}
/// Call: `share * net(pot + to_call) - to_call`.
pub fn call(share: f64, pot: f64, to_call: f64) -> f64 {
share * net(pot + to_call) - to_call
}
/// Pot after a raise adding `added` chips that one villain calls:
/// `pot + added + max(added - to_call, 0)`. Also the money at stake in the raise,
/// used to scale its EV standard error.
pub fn final_pot(pot: f64, to_call: f64, added: f64) -> f64 {
pot + added + (added - to_call).max(0.0)
}
/// Raise adding `added` chips, with fold probability `fe`:
/// `fe * net(pot) + (1 - fe) * (share * net(final_pot) - added)` where
/// `final_pot = pot + added + max(added - to_call, 0)`. A pot won by a fold is raked too (no "no
/// flop, no drop" at the live stake).
pub fn raise(share: f64, pot: f64, to_call: f64, added: f64, fe: f64) -> f64 {
fe * net(pot) + (1.0 - fe) * (share * net(final_pot(pot, to_call, added)) - added)
}