diff --git a/messung/farm/farm-flop-job.ps1 b/messung/farm/farm-flop-job.ps1 new file mode 100644 index 00000000..4619dc13 --- /dev/null +++ b/messung/farm/farm-flop-job.ps1 @@ -0,0 +1,36 @@ +# Flop-Prueffaelle (flopsuche, Hauptsession 03.12.), laeuft im ruhigen Fenster aus farm-nacht13: Bau claude/flop-sperre 7825f460 als +# pokerbench-flopsperre-rebel.exe, dann drei Laeufe nacheinander mit je EINEM Motor (nachspiel_flop.py), GPU-Turnblatt-Dienst als Kindprozess. +# Python mit CUDA und Kern-Ordner aus \dienst.txt (Zeile 1 Python, Zeile 2 Kern; abgestimmt mit gpu-kern). Faelle aus \faelle.txt (nie ins Git). +param([string]$O = 'D:\Projects\pf-batterie\messung\farm\flop-i30') +$ziel = 'D:\Projects\pokerfreak-daten\pruefstand\flop-sperre\i30'; New-Item -ItemType Directory -Force $ziel | Out-Null +$log = "$O\job.log"; function Log($x) { Add-Content -Path $log -Value ((Get-Date -Format 'HH:mm:ss') + ' ' + $x) -Encoding UTF8 } +$d = Get-Content "$O\dienst.txt" -EA 0; if (@($d).Count -lt 2) { Log 'ROT: dienst.txt fehlt (Python/Kern von gpu-kern)'; exit 1 } +$pyc = $d[0].Trim(); $kern = $d[1].Trim() +foreach ($p in @($pyc, "$kern\turn\blattwert.py", "$kern\turn\dturntafel.py")) { if (-not (Test-Path $p)) { Log "ROT: fehlt $p"; exit 1 } } +if (("$pyc$kern").Contains(' ')) { Log 'ROT: Leerzeichen im Python- oder Kern-Pfad (der Motor trennt an Leerzeichen)'; exit 1 } +$f = @{}; Get-Content "$O\faelle.txt" | ? { $_ -match '^(\w+)=(.+)$' } | % { $f[$Matches[1]] = $Matches[2].Trim() } +$baum = 'D:\Projects\pf-flopsperre-7825f460' +if (-not (Test-Path "$baum\Cargo.toml")) { + New-Item -ItemType Directory -Force $baum | Out-Null + Set-Location D:\Projects\pf-basis-fd2437df; git archive --format=tar -o "$O\flop.tar" refs/farm/flop; tar -xf "$O\flop.tar" -C $baum; Remove-Item "$O\flop.tar" + Log "exportiert nach $baum" +} +$exe = "$baum\pokerbench-flopsperre-rebel.exe" +if (-not (Test-Path $exe)) { + Set-Location "$baum\entscheiden\motor"; $out = cargo build --release -j 16 2>&1 | Out-String + if ($out -notmatch 'Finished') { Log 'ROT: Bau gescheitert'; Set-Content "$O\bau.log" $out; exit 1 } + Copy-Item target\release\motor.exe $exe +} +Log ("Exe $exe SHA256 " + (Get-FileHash $exe).Hash) +$daten = 'D:/Projects/pokerfreak-daten/grundstrategie-mitzaehler'; $schatten = 'D:\Projects\pokerfreak-daten\live-archiv\schatten-20261202-1530.jsonl' +$fest = @('MOTOR_FLOP_SUCHE=1', 'MOTOR_FLOP_SUCHE_BODEN=0.05', 'MOTOR_FLOP_SUCHE_WECHSEL=6', 'MOTOR_FLOP_SUCHE_MS=100000000', 'RAYON_NUM_THREADS=8', 'MOTOR_FLOP_SUCHE_ABNAHME=0', 'MOTOR_FLOP_SUCHE_RUNDEN=300') +$dienst = "$pyc $baum\messung\motor\flop_sperre\turnblatt_dienst.py --geraet cuda --ziel-prozent 1.0 --boden 0.01 --kern $kern" +Set-Location "$baum\messung\motor\flop_sperre" +foreach ($l in @(@('rebel5-rauschen0.01', 'FUENF', ' --rauschen 0.01 --saat 7'), @('rebel5-rauschen0.005', 'FUENF', ' --rauschen 0.005 --saat 7'), @('rebel14', 'VIERZEHN', ''))) { + $aus = "$ziel\$($l[0]).jsonl" + if (Test-Path $aus) { Log "$($l[0]) vorhanden, uebersprungen (nur anhaengen, nie leeren)"; continue } + $t0 = Get-Date; Log "START $($l[0]) ($($l[1]))" + & python -X utf8 nachspiel_flop.py $exe $daten $schatten $aus $l[0] --haende $f[$l[1]] @fest "MOTOR_FLOP_BLATT_DIENST=$dienst$($l[2])" 2>&1 | % { Log " $_" } + Log ("ENDE $($l[0]) nach {0:N0} s, Zeilen {1}" -f ((Get-Date) - $t0).TotalSeconds, @(Get-Content $aus -EA 0).Count) +} +Log '=== FERTIG flop' diff --git a/messung/farm/farm-nacht13.ps1 b/messung/farm/farm-nacht13.ps1 new file mode 100644 index 00000000..825549f6 --- /dev/null +++ b/messung/farm/farm-nacht13.ps1 @@ -0,0 +1,14 @@ +# Flop-Prueffaelle (flopsuche 03.12.): nach basis-plus 03./02.12., im ruhigen Fenster mit GPU-RUHE (Turn-Fabrik pausiert), Job farm-flop-job.ps1. +$f = 'D:\Projects\pf-batterie\messung\farm'; $o = "$f\flop-i30"; New-Item -ItemType Directory -Force $o | Out-Null; $log = "$o\kette.log" +function Log($x) { Add-Content -Path $log -Value ((Get-Date -Format 'HH:mm:ss') + ' ' + $x) -Encoding UTF8 } +function Spielt { (Test-Path 'D:\Projects\pokerfreak\.claude\worktrees\engine-lecks-angreifen-de7b88\betrieb\scratch\laeufer.pid') -or (Test-Path 'D:\Projects\pokerfreak\scratch\laeufer.pid') } # ohne WMI +function WarteFrei { $r = 0; while ($r -lt 2) { if (Spielt) { $r = 0 } else { $r++ }; Start-Sleep 15 } } +Set-Location D:\Projects\pf-basis-fd2437df +git fetch -q D:\Projects\pokerfreak\scratch\flop.bundle +refs/remotes/origin/claude/flop-sperre:refs/farm/flop +Log ('wartet auf basis-plus 03./02.12.; flop ' + (git rev-parse --short=8 refs/farm/flop)) +while (-not (Select-String -Path "$f\basis-plus\kette.log" -Pattern '=== FERTIG basis-plus' -Quiet -EA 0)) { Start-Sleep 60 } +WarteFrei +Log 'Start im ruhigen Fenster (GPU-RUHE)' +& powershell -NoProfile -ExecutionPolicy Bypass -File D:\Projects\pokerfreak\scratch\farm-ruhe.ps1 -Befehl "powershell -NoProfile -ExecutionPolicy Bypass -File D:\Projects\pokerfreak\scratch\farm-flop-job.ps1 -O $o" -Aus "$o\ruhe.out" -GpuRuhe 2>&1 | % { Log " ruhe: $_" } +Get-Content "$o\job.log" -EA 0 | Select-String 'ROT|START|ENDE|FERTIG|Exe' | % { Log $_.Line } +Log '=== FERTIG flop'