Skip to content

Commit

Permalink
Adjusted model to be more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
Foulest committed Dec 8, 2024
1 parent e45344d commit a99b636
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/foulest/swiss/match/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ public Team simulate(boolean mostLikelyOnly) {
* - 70% of the win probability is based on the team's average player rating.
* <p>
* If the match is the best of three:
* - 50% of the win probability is based on the team's world ranking.
* - 50% of the win probability is based on the team's average player rating.
* - 70% of the win probability is based on the team's world ranking.
* - 30% of the win probability is based on the team's average player rating.
*
* @param t1 The first team.
* @param t2 The second team.
* @return The win probability of the first team.
*/
public static double calculateWinProbability(@NotNull Team t1, @NotNull Team t2, boolean bestOfThree) {
double worldRankingWeight = bestOfThree ? 0.50 / 100.0 : 0.30 / 100.0;
double playerRatingWeight = bestOfThree ? 0.50 : 0.70;
double worldRankingWeight = bestOfThree ? 0.70 / 100.0 : 0.30 / 100.0;
double playerRatingWeight = bestOfThree ? 0.30 : 0.70;
double scale = 5.0;

// Compute scores
Expand Down

0 comments on commit a99b636

Please sign in to comment.