This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def calc_new_elo(a,b,winner, k=20): | |
| # a = rating of a | |
| # b = rating of b | |
| # if a wins then winner = 1 | |
| # if b wins then winner = 2 | |
| # if draw then winner = 0.5 | |
| # k factor default value is 20 | |