//! Stufe 4 (offline half): the sim-to-real HUD gap. //! //! Prints the HUD distribution the synthetic population INDUCES (vpip/pfr/fold-to-bet/aggression, mean //! and spread) so it can be held against the real players' HUD. The real spread below is read from the //! Stufe-1 calibration (`archiv/population.json`, `lesen/kalibrierung.py`), which today is a single //! ten-player table snapshot (mostly regs), so only the reg axis has a real comparison — the method is //! what stands; more logs sharpen it. The remaining gap (live outcomes vs sim) needs the live farm. //! //! Run: `cargo run --release --bin simreal`. use rechner::sim::population::{Archetype, Population, Spread}; use rechner::sim::reader::Style; use rechner::sim::simreal::population_induced_hud; const SEED: u64 = 0x5EED_0001; const DRAWS: usize = 120; const HANDS_EACH: usize = 2000; fn main() { let pop = Population::micro(); let field = population_induced_hud(&pop, DRAWS, HANDS_EACH, SEED); println!("=== Stufe 4 (offline): Sim-to-Real-Gap im HUD-Raum ==="); println!("{DRAWS} Zieher x {HANDS_EACH} Haende.\n"); println!("Induzierte HUD des ganzen synthetischen FELDES (alle Archetypen):"); println!(" Achse Mittel Streuung (ueber Archetypen)"); println!(" vpip {:>7.3} {:>7.3}", field.mean.vpip, field.sd.vpip); println!(" pfr {:>7.3} {:>7.3}", field.mean.pfr, field.sd.pfr); println!(" foldToBet {:>7.3} {:>7.3}", field.mean.fold_to_bet, field.sd.fold_to_bet); println!(" aggression {:>7.3} {:>7.3}", field.mean.aggression, field.sd.aggression); // The FAIR comparison: synthetic WITHIN-reg spread vs the real within-reg spread. The real snapshot // is one table of (mostly) regs, so only this cluster has a real target. Draw reg-only opponents. let reg_only = Population { archetypes: vec![Archetype { label: "reg", mean: Style::Reg.rules(), weight: 1.0 }], spread: Spread::DEFAULT, }; let reg = population_induced_hud(®_only, DRAWS, HANDS_EACH, SEED ^ 0x8EED); let (real_vpip_sd, real_pfr_sd, real_ftb_sd) = (0.043, 0.027, 0.089); println!("\nInnerhalb des reg-Clusters — synth. vs real STREUUNG (der faire Vergleich):"); println!(" Achse synth. real Gap"); println!(" vpip {:>7.3} {:>7.3} {:>+7.3}", reg.sd.vpip, real_vpip_sd, reg.sd.vpip - real_vpip_sd); println!(" pfr {:>7.3} {:>7.3} {:>+7.3}", reg.sd.pfr, real_pfr_sd, reg.sd.pfr - real_pfr_sd); println!(" foldToBet {:>7.3} {:>7.3} {:>+7.3}", reg.sd.fold_to_bet, real_ftb_sd, reg.sd.fold_to_bet - real_ftb_sd); println!("\n(Echte Mittel je Archetyp und die anderen Cluster brauchen mehr Mitschriebe als die"); println!(" eine Tisch-Momentaufnahme. Der Live-Outcome-Abgleich bleibt dem Live-Farm vorbehalten.)"); }