public IteratedTeamDifferencesInnerLayer(TrueSkillFactorGraph <TPlayer> parentGraph, TeamPerformancesToTeamPerformanceDifferencesLayer <TPlayer> teamPerformancesToTeamPerformanceDifferences, TeamDifferencesComparisonLayer <TPlayer> teamDifferencesComparisonLayer) : base(parentGraph) { mTeamPerformancesToTeamPerformanceDifferencesLayer = teamPerformancesToTeamPerformanceDifferences; mTeamDifferencesComparisonLayer = teamDifferencesComparisonLayer; }
public override IDictionary <TPlayer, Rating> CalculateNewRatings <TPlayer>(GameInfo gameInfo, IEnumerable <IDictionary <TPlayer, Rating> > teams, params int[] teamRanks) { Guard.ArgumentNotNull(gameInfo, "gameInfo"); ValidateTeamCountAndPlayersCountPerTeam(teams); RankSorter.Sort(ref teams, ref teamRanks); var factorGraph = new TrueSkillFactorGraph <TPlayer>(gameInfo, teams, teamRanks); factorGraph.BuildGraph(); factorGraph.RunSchedule(); var probabilityOfOutCome = factorGraph.GetProbabilityOfRanking(); return(factorGraph.GetUpdatedRatings()); }
public PlayerPerformancesToTeamPerformancesLayer(TrueSkillFactorGraph <TPlayer> parentGraph) : base(parentGraph) { }
public PlayerPriorValuesToSkillsLayer(TrueSkillFactorGraph <TPlayer> parentGraph, IEnumerable <IDictionary <TPlayer, Rating> > teams) : base(parentGraph) { mTeams = teams; }