Calculate expected score for player A against player B.
(rating_a: float, rating_b: float)
| 17 | |
| 18 | |
| 19 | def expected_score(rating_a: float, rating_b: float) -> float: |
| 20 | """Calculate expected score for player A against player B.""" |
| 21 | return 1 / (1 + 10 ** ((rating_b - rating_a) / ELO_DENOM)) |
| 22 | |
| 23 | |
| 24 | def update_elo(*, current_rating: float, expected_score: float, actual_score: float, k: float = 32) -> float: |
no outgoing calls
no test coverage detected