Ejemplo n.º 1
0
        /// <summary>
        /// Run through all players within a resultset and calculate their new ratings.
        ///
        /// Players within the resultset who did not compete during the rating period
        /// will have see their deviation increase (in line with Prof Glickman's paper).
        ///
        /// Note that this method will clear the results held in the association result set.
        /// </summary>
        /// <param name="results"></param>
        public void UpdateRatings(RatingPeriodResults results)
        {
            foreach (var player in results.GetParticipants())
            {
                if (results.GetResults(player).Count > 0)
                {
                    CalculateNewRating(player, results.GetResults(player));
                }
                else
                {
                    // if a player does not compete during the rating period, then only Step 6 applies.
                    // the player's rating and volatility parameters remain the same but deviation increases
                    player.SetWorkingRating(player.GetGlicko2Rating());
                    player.SetWorkingRatingDeviation(CalculateNewRatingDeviation(player.GetGlicko2RatingDeviation(),
                                                                                 player.GetVolatility()));
                    player.SetWorkingVolatility(player.GetVolatility());
                }
            }

            // now iterate through the participants and confirm their new ratings
            foreach (var player in results.GetParticipants())
            {
                player.FinaliseRating();
            }

            // lastly, clear the result set down in anticipation of the next rating period
            results.Clear();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Run through all players within a resultset and calculate their new ratings.
        ///
        /// Players within the resultset who did not compete during the rating period
        /// will have see their deviation increase (in line with Prof Glickman's paper).
        ///
        /// Note that this method will clear the results held in the association result set.
        /// </summary>
        /// <param name="results"></param>
        public void UpdateRatings(RatingPeriodResults results)
        {
            UpdateWorkingRatings(results);

            // now iterate through the participants and confirm their new ratings
            foreach (var player in results.GetParticipants())
            {
                player.FinaliseRating();
            }

            // lastly, clear the result set down in anticipation of the next rating period
            results.Clear();
        }
Ejemplo n.º 3
0
 public void UpdateWorkingRatings(RatingPeriodResults results)
 {
     foreach (var player in results.GetParticipants())
     {
         if (results.GetResults(player).Count > 0)
         {
             CalculateNewRating(player, results.GetResults(player));
         }
         else
         {
             // if a player does not compete during the rating period, then only Step 6 applies.
             // the player's rating and volatility parameters remain the same but deviation increases
             player.SetWorkingRating(player.GetGlicko2Rating());
             player.SetWorkingRatingDeviation(CalculateNewRatingDeviation(player.GetGlicko2RatingDeviation(),
                                                                          player.GetVolatility()));
             player.SetWorkingVolatility(player.GetVolatility());
         }
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Run through all players within a resultset and calculate their new ratings.
        /// 
        /// Players within the resultset who did not compete during the rating period
        /// will have see their deviation increase (in line with Prof Glickman's paper).
        /// 
        /// Note that this method will clear the results held in the association result set.
        /// </summary>
        /// <param name="results"></param>
        public void UpdateRatings(RatingPeriodResults results)
        {
            foreach (var player in results.GetParticipants())
            {
                if (results.GetResults(player).Count > 0)
                {
                    CalculateNewRating(player, results.GetResults(player));
                }
                else
                {
                    // if a player does not compete during the rating period, then only Step 6 applies.
                    // the player's rating and volatility parameters remain the same but deviation increases
                    player.SetWorkingRating(player.GetGlicko2Rating());
                    player.SetWorkingRatingDeviation(CalculateNewRatingDeviation(player.GetGlicko2RatingDeviation(),
                        player.GetVolatility()));
                    player.SetWorkingVolatility(player.GetVolatility());
                }
            }

            // now iterate through the participants and confirm their new ratings
            foreach (var player in results.GetParticipants())
            {
                player.FinaliseRating();
            }

            // lastly, clear the result set down in anticipation of the next rating period
            results.Clear();
        }