Skip to content

Commit 80e9065

Browse files
committed
normalize ratings for ffa
1 parent 902c27e commit 80e9065

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ZkData/Ef/WHR/WholeHistoryRating.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ public Dictionary<DateTime, float> GetPlayerRatingHistory(int AccountID)
111111

112112
public List<float> PredictOutcome(IEnumerable<IEnumerable<Account>> teams, DateTime time)
113113
{
114-
return teams.Select(t =>
114+
var predictions = teams.Select(t =>
115115
SetupGame(t.Select(x => RatingSystems.GetRatingId(x.AccountID)).ToList(),
116116
teams.Where(t2 => !t2.Equals(t)).SelectMany(t2 => t2.Select(x => RatingSystems.GetRatingId(x.AccountID))).ToList(),
117117
true,
118118
RatingSystems.ConvertDateToDays(time),
119119
-1
120-
).getBlackWinProbability() * 2 / teams.Count()).ToList();
120+
).getBlackWinProbability()).ToList();
121+
return predictions.Select(x => x / predictions.Sum()).ToList();
121122
}
122123

123124

0 commit comments

Comments
 (0)