Vorwissen Einsatz-Seite: Flop-Spots (Preis wie Turn: eine Strasse), Live-Profil je Spot (prof_ohne) fuer den Arm ohne Anreicherung; Lauf Luecke rel gegen ohne auf dev

Turn/River-Anfragen bitgleich zum alten Scan (Probe 11 520/11 520).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 04:26:57 +01:00
co-authored by Claude Opus 5.5
parent 3207e765c1
commit 8b16b24690
5 changed files with 57 additions and 11 deletions
+12 -11
View File
@@ -56,8 +56,8 @@ T_AB = calendar.timegm((2026, 10, 19, 0, 0, 0, 0, 0, 0))
T_BIS = calendar.timegm((2026, 11, 17, 0, 0, 0, 0, 0, 0))
NL2 = 0.02
OHNE = ("raiseToBet", "reraiseToRaise")
STR = {2: "t", 3: "r"}
STRNAME = {2: "turn", 3: "river"}
STR = {1: "f", 2: "t", 3: "r"}
STRNAME = {1: "flop", 2: "turn", 3: "river"}
PROBEN = 160
@@ -121,7 +121,7 @@ def spots_hand(h, info, pool_fold):
import leckfinder as lf
import eval7
n = h["n"]
if n < 2 or h["blinds"][0] <= 0 or h["strassen"] < 2:
if n < 2 or h["blinds"][0] <= 0 or h["strassen"] < 1:
return [], [], {}
bb = h["bb"]
k = NL2 / bb
@@ -179,7 +179,7 @@ def spots_hand(h, info, pool_fold):
tc = max(hoch - beitrag[p], 0.0)
aktiv = [q for q in range(n) if q not in folded]
topf = topf_vor + sum(beitrag)
if s in (2, 3) and len(aktiv) == 2:
if s in (1, 2, 3) and len(aktiv) == 2:
o = aktiv[0] if aktiv[1] == p else aktiv[1]
# Entscheidungsspot: niemand hat gesetzt, beide mit Stack
if (not gesetzt and tc <= 1e-9 and stack[p] > 1e-9 and stack[o] > 1e-9 and p in gez
@@ -196,6 +196,7 @@ def spots_hand(h, info, pool_fold):
if q == o:
pid = D.kennung("CP", namen[o])
v["profile"] = draht.profil_mit(_PROF.get(pid), e, _SP.get("pool"), True, OHNE)
prof_ohne = _PROF.get(pid)
vil.append(v)
seed = (h["nr"] * 131 + i) & 0xFFFFFFFF
req = {"variant": "NLHE", "bigBlind": NL2, "seats": n, "heroSeat": p + 1,
@@ -208,7 +209,7 @@ def spots_hand(h, info, pool_fold):
out.append({"id": "%d.%d" % (h["nr"], i), "s": s, "ip": ip, "vw_o": kk, "h_o": e["h_roh"],
"P": round(topf / bb, 3), "stack": round(min(stack[p], stack[o]) / bb, 3),
"perz": round(perzentil(gez[p], brett5[:(0, 3, 4, 5)[s]], seed), 4),
"_i": i, "_p": p, "echt": echt, "req": req})
"_i": i, "_p": p, "echt": echt, "req": req, "prof_ohne": prof_ohne})
# W-Probe: erster Einsatz Kopf an Kopf, Antwort Call, danach Showdown; Setzer-Karten offen
if art == "r" and not gesetzt and stack[p] > 1e-9:
r = ziel - beitrag[p]
@@ -291,7 +292,7 @@ def sproben_hand(h, info, g_p):
else:
return []
out = []
for s in (2, 3):
for s in (1, 2, 3):
ak = [(i, x) for i, x in enumerate(h["akt"]) if x[0] == s]
if len(ak) < 2 or any(x[2] == "r" for _, x in ak) or any(x[2] == "r" for x in h["akt"] if x[0] > s):
continue
@@ -476,7 +477,7 @@ def arme_main(a):
"""Spots einer Haelfte fuer den Kern; geschichtete Stichprobe nach Read-Abweichung (pi je Spot, gewertet mit 1/pi):
Abweichung >= 0,10 -> pi = A, >= 0,05 -> A/2, sonst A/8 (A = --anteil)."""
aus, haelfte = a[:2]
strassen = {int({"t": 2, "r": 3}[x]) for x in (a[a.index("--strasse") + 1] if "--strasse" in a else "t,r").split(",")}
strassen = {int({"f": 1, "t": 2, "r": 3}[x]) for x in (a[a.index("--strasse") + 1] if "--strasse" in a else "t,r").split(",")}
anteil = float(a[a.index("--anteil") + 1]) if "--anteil" in a else 1.0
rnd = random.Random(2111)
n = 0
@@ -522,7 +523,7 @@ def werten_main(a):
d = json.load(gzip.open(os.path.join(og, "tage", n), "rt", encoding="utf-8"))
sitz_og += d["sitz"]
for zelle, ks, ts, P, r in d["spots"]:
if zelle.startswith("b_t_") or zelle.startswith("b_r_"):
if zelle[:4] in ("b_f_", "b_t_", "b_r_"):
q = echt[(ks[0], zelle)]
q[0] += 1
q[1] += ts[0]
@@ -570,7 +571,7 @@ def werten_main(a):
# W-Tabelle (alle Proben der Haelfte): (s, c, rk, zehntel) -> [n, sum]; mit Glaettung ueber rk
wt = collections.defaultdict(lambda: [0.0, 0.0])
for s, c, kk, perz, gew, spaeter in wpro:
if versiegelt(kk) != (haelfte == "siegel") or (s == 2 and spaeter):
if versiegelt(kk) != (haelfte == "siegel") or (s in (1, 2) and spaeter):
continue
b = min(int(perz * 10), 9)
for key in ((s, c, rk(s, c, kk), b), (s, c, -1, b)):
@@ -619,7 +620,7 @@ def werten_main(a):
s_tab[key][1] += gew * anteil
f_kl = collections.defaultdict(lambda: [0, 0])
for (kk, zelle), (n_, k_) in echt.items():
s = 2 if zelle[2] == "t" else 3
s = {"f": 1, "t": 2, "r": 3}[zelle[2]]
c = zelle[-1]
if kk in prior_kk[(s, c)]:
q = f_kl[(s, c, rk(s, c, kk))]
@@ -676,7 +677,7 @@ def werten_main(a):
if not z:
continue
for zelle, nk in z.items():
if zelle.startswith("b_t_") or zelle.startswith("b_r_"):
if zelle[:4] in ("b_f_", "b_t_", "b_r_"):
q = og_z[(kk, zelle)]
q[0] += gw_ * nk[0]
q[1] += gw_ * nk[1]
+5
View File
@@ -0,0 +1,5 @@
# Startet ein Python-Skript mit Prioritaet BelowNormal (Kindprozesse erben sie).
import ctypes, runpy, sys
ctypes.windll.kernel32.SetPriorityClass(ctypes.windll.kernel32.GetCurrentProcess(), 0x4000)
sys.argv = sys.argv[1:]
runpy.run_path(sys.argv[0], run_name="__main__")
+18
View File
@@ -0,0 +1,18 @@
# Arm "ohne Anreicherung": gleiche Spots, Gegnerprofil = Live-Zaehlung allein (prof_ohne), sonst textgleich.
import json, sys
src, ziel = sys.argv[1:3]
n = m = 0
with open(ziel, "w", encoding="utf-8", newline="\n") as f:
for z in open(src, encoding="utf-8"):
sp = json.loads(z)
po = sp.pop("prof_ohne", None)
for v in sp["req"]["villains"]:
if "profile" in v:
if po:
v["profile"] = po
else:
v.pop("profile")
m += 1
f.write(json.dumps(sp, separators=(",", ":")) + "\n")
n += 1
print(n, "Spots;", m, "ohne Live-Profil", flush=True)
@@ -0,0 +1,9 @@
# Luecke: Anreicherung rel gegen ohne an Heros freien Knoten (Flop/Turn/River), dev-Gegner, FOLD aus, fest.
# Anhalten: erst STARTER.winpid, dann die Laeufe. Hoechstens 4 Faeden neben der Ident (Budget 8), BelowNormal.
cd C:/Users/marcm/pokerfreak-vorwissen/golive
D=C:/Users/marcm/pokerfreak-vorwissen; L=$D/luecke
py() { python -I -X utf8 $L/bremse.py "$@"; }
[ -f $L/scan.fertig ] || { py lesen/vorwissen/einsatz.py scan D:/Projects/pokerfreak-daten/hhdealer/zip/nl2-6max-1jahr.zip C:/Users/marcm/pokerfreak-gegnernetz/daten-hhd C:/Users/marcm/pokerfreak-gegnernetz/familie-c/spots-v1.profile.npz $D/speicher-1019-h90v.json.gz $L --prozesse 4 > $L/scan.log 2>&1 && touch $L/scan.fertig; }
echo "$(date +%H:%M) scan fertig" >> $L/lauf.log
[ -f $L/scan_s.fertig ] || { py lesen/vorwissen/einsatz.py scan_s D:/Projects/pokerfreak-daten/hhdealer/zip/nl2-6max-1jahr.zip C:/Users/marcm/pokerfreak-gegnernetz/daten-hhd $L --prozesse 4 > $L/scan_s.log 2>&1 && touch $L/scan_s.fertig; }
echo "$(date +%H:%M) scan_s fertig" >> $L/lauf.log
@@ -0,0 +1,13 @@
# Teil 2: Spots ziehen (dev, f,t,r), Arme rel / ohne mit golive2.exe (fest, FOLD aus), werten.
cd C:/Users/marcm/pokerfreak-vorwissen/golive
D=C:/Users/marcm/pokerfreak-vorwissen; L=$D/luecke; K=$D/bin/pokerbench-vorwissen-golive2.exe; W=$D/main-baum
I="SOLVER_ITER=hu_river:100,hu_turn:40,hu_flop:40,mw_flop:4050,mw_turn:4100,mw_river:7200;SOLVER_ZEIT=fest;VORWISSEN_FOLD=-;VORWISSEN_BLUFF=-;VORWISSEN_KERN=-"
py() { python -I -X utf8 $L/bremse.py "$@"; }
while [ ! -f $L/scan_s.fertig ]; do sleep 30; done
[ -f $L/spots-dev.jsonl ] || py lesen/vorwissen/einsatz.py arme $L dev --strasse f,t,r --anteil ${A:-0.2} >> $L/lauf.log 2>&1
[ -f $L/spots-dev-ohne.jsonl ] || python -I -X utf8 $L/ohne.py $L/spots-dev.jsonl $L/spots-dev-ohne.jsonl >> $L/lauf.log 2>&1
lauf() { [ -f $2 ] || { date +%s > $2.start; py lesen/vorwissen/familie.py entscheiden $1 $K $W $2 "$I" --prozesse 4 > $2.log 2>&1; }; echo "$(date +%H:%M) $2 fertig" >> $L/lauf.log; }
lauf $L/spots-dev-ohne.jsonl $L/antw-dev-ohne.jsonl
lauf $L/spots-dev.jsonl $L/antw-dev-rel.jsonl
py lesen/vorwissen/einsatz.py werten $L dev $D/obergrenze $L/antw-dev-ohne.jsonl $L/antw-dev-rel.jsonl $L/erg-dev-rel.json --boot 1000 > $L/werten-dev-rel.txt 2>&1
echo "$(date +%H:%M) werten fertig" >> $L/lauf.log