HF RL Explorer

chess club Elo ratings: refactor extract

chess club Elo ratings: refactor extract: a task in smol-software-harbor (Harbor dataset). elo.py computes the Elo expected score with the same formula in three places. Extract it into a function expected score(ra, rb) (returns the expected score of a player rated ra against one rated rb , between…

The task

`elo.py` computes the Elo expected score with the same formula in three places. Extract it into a function `expected_score(ra, rb)` (returns the expected score of a player rated `ra` against one rated `rb`, between 0 and 1) and make `new_ratings()` and `win_probability()` use it, so the formula `10 ** (... / 400)`…

Part of efederici/smol-software-harbor.