zwilling.py --fortsetzen: angefangene Laeufe mit eigenen Schaltern fortsetzen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 08:49:58 +01:00
co-authored by Claude Opus 5.5
parent de3dcdf5f5
commit a3d75c8863
+17
View File
@@ -122,7 +122,24 @@ def main():
a.add_argument("--pruefsitze", action="store_true",
help="dieselben Austeilungen mit dem G-Sitz (Reg-Frequenzen) und dem Pop-Sitz auf dem Pruefsitz; "
"druckt Engine minus G und Engine minus Pop (gepaart)")
a.add_argument("--fortsetzen", default="",
help="angefangenen Laufordner mit seinen eigenen Schaltern (schalter.json) fortsetzen; --exe muss der "
"Code-Stand des Laufs sein (_code)")
o = a.parse_args()
if o.fortsetzen:
d = os.path.normpath(o.fortsetzen)
env = json.load(open(os.path.join(d, "schalter.json"), encoding="utf-8"))
code = env.pop("_code", "")
m = re.match(r"(basis|stand|kandidat|sitz-G|sitz-P|.+?)-[0-9a-f]{12}$", os.path.basename(d))
held = {"sitz-G": "G", "sitz-P": "P"}.get(m.group(1) if m else "", "engine")
full = dict(os.environ, **env)
full.update(ZWILLING=DATEN, ZWILLING_RANGES=";".join(r for r in RANGES if os.path.exists(r)),
POKERBENCH_THREADS=str(o.threads or min(12, budget())))
print("Fortsetzen %s (Code %s, %s)" % (d, code or "?", held), flush=True)
kw = {"creationflags": BELOW_NORMAL} if sys.platform == "win32" else {}
subprocess.run([o.exe, "lauf", d, str(o.deals), "50", str(o.seed), "memory", "eigen", held], env=full, check=True, **kw)
open(os.path.join(d, "fertig"), "w").write("")
return
if not os.path.exists(o.exe):
sys.exit("Binary fehlt: %s (cargo build --release --bin zwilling, Kopie als pokerbench-zwilling-lauf.exe)" % o.exe)
threads = o.threads or min(12, budget())