Explorar o código

Fixing a bug in the scoring logic, turns out I need to relearn python

Kirk Trombley %!s(int64=5) %!d(string=hai) anos
pai
achega
51d736d824
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/lib.py

+ 1 - 1
server/lib.py

@@ -58,5 +58,5 @@ def score(target, guess):
         return 0, dist_km
 
     # Gaussian, with some manual tuning to get good fall off
-    exponent = -((dist_km - min_dist_km) ^ 2) / exp_denom
+    exponent = -((dist_km - min_dist_km) ** 2) / exp_denom
     return int(perfect_score * math.exp(exponent)), dist_km