Files
pokerfreak/messung/motor/sinn/river_echt.py
T
mmintelandClaude Opus 5.5 c75a2b1863 Motor: Rust-Engine mit NL2-Regeln und Spielertypen, Pruefwerkzeuge
Regeln fuer River, Flop/Turn, Einsaetze und Iso gegen Limper (nl2.rs), Tafeln ohne Spielerkennungen.
Gemeinsam gegen den Trainer-Pool: +8,0 +-3,9 bb/100 mit bekanntem Typ, +0,9 +-6,6 ohne. Gewinn live nicht belegt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 23:51:18 +01:00

21 lines
1.5 KiB
Python

# Vorhersage (Feld-Tafel) gegen echtes Ergebnis bei allen eigenen River-Calls gegen einen Einsatz/Raise
import sys,io,contextlib,json,math
sys.path[:0]=["entscheiden","messung/motor/sinn"]
with contextlib.redirect_stdout(io.StringIO()):
src=open("messung/motor/sinn/river_kreuz.py",encoding="utf-8").read(); exec(src[:src.index("NH=9362")])
aus={str(a["hand"]):a for a in json.load(open(sys.argv[1]+".aus")) if a["st"]=="RIVER"}
Q=[]
for x in R:
a=aus.get(str(x[0]))
if x[8]=="CALL" and a and a["wert"] is not None: Q.append((x[1],x[2],sum(x[5])/2,a["wert"],x[6],x[7],x[3]))
def z(nm,v):
if len(v)<3: return
n=len(v); d=[a[3]-a[2] for a in v]; m=sum(d)/n; se=math.sqrt(sum((y-m)**2 for y in d)/(n-1)/n)
pr=sum((a[2]+a[4])/(a[5]+a[4]) for a in v)/n; ist=sum(a[3]>-a[4]+.01 for a in v)/n
print("%-28s n %3d Vorhersage %+.2f bb, echt %+.2f, Abweichung %+.2f +-%.2f | Gewinnquote vorhergesagt ~%.0f%% echt %.0f%%"%(nm,n,sum(a[2] for a in v)/n,sum(a[3] for a in v)/n,m,se,100*pr,100*ist))
z("alle Calls",Q); z("Einsatz",[a for a in Q if a[0]=="B"]); z("Raise",[a for a in Q if a[0]!="B"])
z("ohne Topf>100",[a for a in Q if a[5]<=100])
for l,h in ((0,.5),(.5,.7),(.7,.85),(.85,1.01)): z("Staerke %.2f"%l,[a for a in Q if l<=a[1]<h])
z("Motor foldet, Tafel callt",[a for a in Q if a[6]>=.5 and a[2]>.2*a[4]]); z("Motor callt, Tafel foldet",[a for a in Q if a[6]<.5 and a[2]<-.2*a[4]])
print([tuple(round(y,2) if isinstance(y,float) else y for y in a) for a in Q[:4]])