diff --git a/server/nightr/strategies/miloStrats.py b/server/nightr/strategies/miloStrats.py index 3b08314..593c981 100644 --- a/server/nightr/strategies/miloStrats.py +++ b/server/nightr/strategies/miloStrats.py @@ -57,7 +57,10 @@ def tv2newsStrat(context : Context) -> Prediction: avg_delta += d avg_timestamp = avg_delta // len(delta_times) // 60 p = Prediction() - p.weight = 0.7 + if avg_timestamp < 0: + p.weight = 0.0 + else: + p.weight = 0.7 p.probability = 1.0 if avg_timestamp > 50 else 0.0 p.reasons.append('There were ' + ('few' if avg_timestamp > 50 else 'many') + ' recent articles on TV2 News') return p