jackconryan / DartsElo

Creating an Elo system for our local Darts matches/tournaments.
0 stars 1 forks source link

Add threw first advatage to match calculations #4

Closed jackconryan closed 11 months ago

jackconryan commented 12 months ago

Added first throw advantage functionality.

player who throws first has an extra 20 elo added to their rating for purposes of the elo change calculation. this means player who throws first and loses, loses more and player who throws first and wins gains less, exact number this should be has not yet been determined 20 is a good starting place.

commonly home teams get 50-100 points added to their elo as can be seen in this nfl elo system from fivethirthyeight https://github.com/fivethirtyeight/nfl-elo-game/blob/fbec1afa38ece5befe24fb21be8ddba8eb160fe6/forecast.py#L4C14-L4C14

added a print_current_avg_elo() function to determine if elo was being lost from the system as I feared may happen,

changed how new_rating function worked to have it return the difference in elo rather than the new updated rating, this reduced the code repetition in the doubles_match_result function