Amogh1221 commited on
Commit
8ede892
·
verified ·
1 Parent(s): 6a372a9

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -3
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
- # Estimate Elo based slightly on accuracy
474
- # This is a fun heuristic metric
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),