E2-Plateau-Befund: die Kartenabstraktion ist der Boden (Fest-Flop +54, Fest-Turn -72 gegen +190), kein MCCFR/LBR-Fehler; Diagnosewerkzeuge, Fortsetzungstest

Aus worktree-agent-a3689a5f9ba457171 (b79d9e3), flop_fest auf die Szenariofamilie uebertragen. blueprint:: 28/28.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 02:28:26 +01:00
co-authored by Claude Opus 5.5
parent e1ca7feadd
commit 20da294c5a
5 changed files with 699 additions and 494 deletions
+29
View File
@@ -0,0 +1,29 @@
//! Diagnostic for the E2 plateau: best response inside the abstract game vs LBR (real cards).
//!
//! plateau <abstraktion-dir> <ckpt> <iterationen> [lbr-haende]
//! Bench copy: `pokerbench-engine-plateau.exe`. Threads: POKERBENCH_THREADS (default 2).
use rechner::blueprint::lbr::lbr;
use rechner::blueprint::mccfr::{beste_antwort, Tabellen};
use rechner::blueprint::s1::{Abstraktion, S1};
use std::path::Path;
fn main() {
let a: Vec<String> = std::env::args().collect();
let n: u64 = a[3].parse().unwrap();
let h: usize = a.get(4).and_then(|s| s.parse().ok()).unwrap_or(4000);
let threads: usize = std::env::var("POKERBENCH_THREADS").ok().and_then(|s| s.parse().ok()).unwrap_or(2).max(1);
let s = S1::neu(Abstraktion::laden(Path::new(&a[1])).unwrap());
let mut tab = Tabellen::neu(&s);
assert!(tab.datei_lesen(Path::new(&a[2])));
println!("Runden {}, Eintraege {}", tab.runden, tab.eintraege());
let e = lbr(&s, &tab, h, threads, 77);
println!("LBR {:+.1} ±{:.1} (BB {:+.1}, BTN {:+.1})", e.bb100, e.ci95, e.je_sitz[0], e.je_sitz[1]);
let w: Vec<(usize, (f64, f64))> = std::thread::scope(|sc| {
let hs: Vec<_> = (0..2).map(|p| { let (s, tab) = (&s, &tab); sc.spawn(move || (p, beste_antwort(s, tab, p, n, 5 + p as u64))) }).collect();
hs.into_iter().map(|h| h.join().unwrap()).collect()
});
for (p, (a1, a2)) in &w {
println!("abstrakte beste Antwort Sitz {p}: 1. Haelfte {:+.1}, 2. Haelfte {:+.1} bb/100", 100.0 * a1, 100.0 * a2);
}
}
+30
View File
@@ -0,0 +1,30 @@
//! Diagnostic for the E2 plateau: S1 with one fixed flop (board-blindness test).
//!
//! plateau_flop <abstraktion-dir> <flop z.B. "Ks 7d 2c" | zufall> <runden> <periode> <lbr-haende> [lbr-alle]
//! Bench copy: `pokerbench-engine-plateau.exe`. Threads: POKERBENCH_THREADS (default 2).
use rechner::blueprint::lbr::lbr;
use rechner::blueprint::mccfr::{rechnen, Tabellen};
use rechner::blueprint::s1::{Abstraktion, S1};
use rechner::card::Card;
use rechner::hand::fast7;
use std::path::Path;
fn main() {
let a: Vec<String> = std::env::args().collect();
let (runden, periode, h): (u64, u64, usize) = (a[3].parse().unwrap(), a[4].parse().unwrap(), a[5].parse().unwrap());
let alle: u64 = a.get(6).and_then(|s| s.parse().ok()).unwrap_or(runden);
let threads: usize = std::env::var("POKERBENCH_THREADS").ok().and_then(|s| s.parse().ok()).unwrap_or(2).max(1);
let mut s = S1::neu(Abstraktion::laden(Path::new(&a[1])).unwrap());
if a[2] != "zufall" {
s.flop_fest = Some(Card::parse_list(&a[2]).unwrap().iter().fold(0, |m, c| m | fast7::bit(*c)));
}
let mut tab = Tabellen::neu(&s);
while tab.runden < runden {
rechnen(&s, &mut tab, 1, periode, threads, 0xABCD);
if tab.runden % alle == 0 || tab.runden == runden {
let e = lbr(&s, &tab, h, threads, 0x1B2 ^ tab.runden);
println!("Flop {} Runde {} LBR {:+.1} ±{:.1} (BB {:+.1}, BTN {:+.1})", a[2], tab.runden, e.bb100, e.ci95, e.je_sitz[0], e.je_sitz[1]);
}
}
}