From 2c435472f5daad460015a3fc55d7f4a0fc8a543e Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Wed, 1 Jul 2026 20:04:55 -0500 Subject: [PATCH] fix simulation --- lib/simulation.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/simulation.ts b/lib/simulation.ts index 97a3ded..a222751 100644 --- a/lib/simulation.ts +++ b/lib/simulation.ts @@ -26,7 +26,7 @@ export function saveOverrides(overrides: SimOverrides): void { // Plausibles Standardergebnis aus Polymarket-3-Wege-Wahrscheinlichkeiten. // // Schwellen (zentral): -// Draw am höchsten ODER max(home,away) < 0.40 → 0:0 (Gruppe) / 1:0 Heim (K.o.) +// Draw am höchsten ODER max(home,away) < 0.40 → 0:0 (Gruppe) / Favorit 1:0 (K.o.) // Favorit 0.40–0.60 → 1:0 // Favorit 0.60–0.78 → 2:0 // Favorit > 0.78 → 3:0 @@ -48,7 +48,11 @@ export function defaultScore(match: Match): { homeScore: number; awayScore: numb if (isDraw || maxFA < 0.40) { if (isGroup) return { homeScore: 0, awayScore: 0 }; - return { homeScore: 1, awayScore: 0 }; // K.o.: knapp Heim (kein Remis) + // K.o.: kein Remis möglich → der wahrscheinlichere von Heim/Auswärts gewinnt knapp, + // Draw wird ignoriert (kein gültiges K.o.-Ergebnis). + return prob.home >= prob.away + ? { homeScore: 1, awayScore: 0 } + : { homeScore: 0, awayScore: 1 }; } // Favorit bestimmen