From c3be26fa5134cfa0439d920f0ad1e8f1de602776 Mon Sep 17 00:00:00 2001 From: Alexander Munch-Hansen Date: Sat, 6 Apr 2019 16:50:46 +0200 Subject: [PATCH] Fixed probs --- server/nightr/strategies/upstairs_neighbour.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/nightr/strategies/upstairs_neighbour.py b/server/nightr/strategies/upstairs_neighbour.py index b340c58..4b528b6 100644 --- a/server/nightr/strategies/upstairs_neighbour.py +++ b/server/nightr/strategies/upstairs_neighbour.py @@ -32,7 +32,9 @@ def check_games(context: Context) -> Prediction: p.reasons.append("Alexanders upstairs neighbour is currently playing league") p.probability = 0.8 else: + last_game_in_hours = min(24.0, last_game_in_hours) + p.reasons.append(f"Alexanders upstairs neighbour has not played league for {last_game_in_hours} hours!") - p.probability = last_game_in_hours / 24 + p.probability = 1 - (last_game_in_hours / 24) return p