Sichert den bisher ungetrackten Stand der Hauptkopie: Messregister (register.py, REGISTER.md, KARTE-vorlage mit Pflichtfeldern decke und abbruch), Karten und Auswerteskripte aller Motor-Messungen, Pruefbatterie und Beute-Auswertungen (nur anonyme Summen), robust.rs, PLAN-motor (Leck-Orakel, frequenz-gebundene Loesung, Tor-Klassen und Sammelkorb), CLAUDE.md-Regel "kein Lauf tiefer als noetig". Grosse Rohdaten (*.bin, *.jsonl, Logs, archiv/lauf) bleiben draussen; Kopie unter pokerfreak-daten/sicherung-2026-11-27-hauptkopie. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
2.6 KiB
Python
36 lines
2.6 KiB
Python
# NL2-Luft: echte Aggressor-Lagen Flop/Turn zu zweit ohne Einsatz; gleiche Exe ohne (MOTOR_LUFT=0) und mit Regel.
|
|
import json,sys,subprocess,ctypes,threading,os,random
|
|
R="D:/Projects/pokerfreak/"; D=R+"daten/grundstrategie/motor"; E=R+"entscheiden/motor/target/pokerbench-motor-luft.exe"
|
|
P=R+".claude/worktrees/engine-lecks-angreifen-de7b88/archiv/lauf/schatten.jsonl"
|
|
F=[]
|
|
for z in open(P,encoding="utf-8",errors="replace"):
|
|
if '"motor"' not in z: continue
|
|
try: d=json.loads(z)
|
|
except ValueError: continue
|
|
q=d.get("q")
|
|
if not q or d.get("gespielt")!="motor" or q.get("_splash") or q.get("street") not in("FLOP","TURN") or q.get("toCall",0)>0: continue
|
|
if sum(v.get("folded")!=True for v in q.get("villains",[]))!=1: continue
|
|
h=q["history"]; vor={"FLOP":"PREFLOP","TURN":"FLOP"}[q["street"]]
|
|
agg=[x for x in h if x["street"]==vor and x["action"] in("BET","RAISE","ALL_IN")]
|
|
if not agg or agg[-1]["seat"]!=q["heroSeat"] or any(x["street"]==q["street"] and x["action"] in("BET","RAISE","ALL_IN") for x in h): continue
|
|
F.append(q)
|
|
random.seed(2); F=random.sample(F,min(len(F),int(sys.argv[1]))); print("Lagen",len(F),flush=True)
|
|
A={"ohne":{"MOTOR_LUFT":"0"},"mit":{}}; O={v:[None]*len(F) for v in A}
|
|
def arb(v,idx):
|
|
env=dict(os.environ,RAYON_NUM_THREADS="2",MOTOR_JAMLERNEN="0",**A[v])
|
|
p=subprocess.Popen([E,"dienst","sechs100",D,"2000-600-400","200",D+"/sechs100-v2.bin","genau"],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.DEVNULL,text=True,encoding="utf-8",creationflags=0x4000,env=env)
|
|
s=type("S",(ctypes.Structure,),{"_fields_":[(k,ctypes.c_ulong) for k in "VCM"]})(1,1,0); ctypes.windll.kernel32.SetProcessInformation(ctypes.c_void_p(int(p._handle)),4,ctypes.byref(s),12)
|
|
for i in idx:
|
|
q=dict(F[i]); q.setdefault("seed",1+i); p.stdin.write(json.dumps(q)+"\n"); p.stdin.flush(); O[v][i]=json.loads(p.stdout.readline())
|
|
p.stdin.close()
|
|
K=5; th=[threading.Thread(target=arb,args=(v,range(k,len(F),K))) for v in A for k in range(K)]; [t.start() for t in th]; [t.join() for t in th]
|
|
json.dump({"F":F,"O":O},open("pruef.json","w"))
|
|
import collections
|
|
c=collections.Counter(); ill=0
|
|
for q,a,b in zip(F,O["ohne"],O["mit"]):
|
|
ill+=b["action"] not in q["legalActions"]
|
|
if (a["action"],a.get("size"))!=(b["action"],b.get("size")): c[(q["street"],a["action"],b["action"],"Luft" if "NL2-Luft" in b["reason"] else "?")]+=1
|
|
print("anders:",dict(c),"unzulaessig",ill)
|
|
for q,a,b in zip(F,O["ohne"],O["mit"]):
|
|
if "NL2-Luft" in b["reason"]: print(" ",q["street"],[c["rank"][0]+c["suit"][0] for c in q["heroCards"]],round(b["size"]/q["pot"],2),b["reason"][:150])
|