Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -470,9 +470,8 @@ async def analyze_game(request: AnalyzeRequest):
|
|
| 470 |
# ~100 avg loss -> ~60%
|
| 471 |
accuracy = max(10.0, min(100.0, 100.0 * math.exp(-0.005 * avg_cpl)))
|
| 472 |
|
| 473 |
-
#
|
| 474 |
-
|
| 475 |
-
estimated_elo = int(max(400, min(3600, 3600 - (avg_cpl * 20))))
|
| 476 |
|
| 477 |
return AnalyzeResponse(
|
| 478 |
accuracy=round(accuracy, 1),
|
|
|
|
| 470 |
# ~100 avg loss -> ~60%
|
| 471 |
accuracy = max(10.0, min(100.0, 100.0 * math.exp(-0.005 * avg_cpl)))
|
| 472 |
|
| 473 |
+
# Exponential Elo Decay calibrated to 3600 max engine strength
|
| 474 |
+
estimated_elo = int(max(400, min(3600, round(3600 * math.exp(-0.015 * avg_cpl)))))
|
|
|
|
| 475 |
|
| 476 |
return AnalyzeResponse(
|
| 477 |
accuracy=round(accuracy, 1),
|