Sign in to follow this  
Followers 0
ACP

The Ratings/Rankings Thread

5 posts in this topic

Ratings are done with a Elo setup, see: https://en.wikipedia.org/wiki/Elo_rating_system. All rankings start at 0 and will move up or down as players win or lose matches. This means that about half of players will have a negative rating. Ratings are kept accurate to 4 decimal places. There are two separate ratings tables for goat format and current format, and these two ratings are completely unrelated to each other. The code used for calculating ratings will be available to the public so that anyone can run the program themselves and verify that the rankings are not being unfairly manipulated.

 

All war matches, including playoffs, are played at a K-value of 20. Casual ranked games (matches that are not for wars) may be played at any time at a K-value of 5. This means that a casual match will have about ¼ of the impact on your rating that a war match does. However, you may not play against the same player in a casual match (for ranking) more than twice every 7 days per format. In other words, if you play against someone for 3 matches in current format over 7 days, only the first two matches will count for rating. However, if you play 2 matches of current format and 1 match of goat format, they will all count for rating. This rule is in place to prevent boosting and get more people to play against each other.


Ratings are time decayed to insure that those at the top of the rankings cannot just avoid playing matches to keep their ranking. At the end of every month, all ratings will be multiplied by .92 (or decayed by 8%). This translates into a 39% decay over 6 months and a 63% decay over a year. The longer that players avoid playing, the closer that their rating will converge to 0.

 

All posts below will be reserved to update the ratings. Please only post below if you think that the ratings are inaccurate. This is, that the number of recorded wins and losses is incorrect for you or another player.

 

Table of all match results: https://drive.google.com/open?id=1OMMwcLWd48YFgXdz2h0_448juQBuBNGMf6SkeF4Cn_E

 

Source code for the ratings program:

 

package dgzelo;

import java.io.*;
import java.util.Scanner;
/* imports pre-written packages that the program will need */

/**
 * An implementation of the ELO Ratings System
 * For all DGz warring
 * @author ACP
 */
public class DgzElo 
{
    public static void main(String[] args) throws FileNotFoundException
    {
        Scanner rankingsScanner = new Scanner(new FileReader("rankings.txt"));
        /* rankings.txt contains current rankings data and is located in the DgzElo folder. This creates a "scanner" that reads the file and gets information from it.
         * each line of the file comes in the form [rating] [wins] [losses] [name] */
        
        Scanner resultsScanner = new Scanner(new FileReader("results.txt"));
        /* results.txt has match results along with a K-value and is used to update the rankings. This creates a "scanner" that reads the file and gets information from it.*/
        
        PlayerList players = new PlayerList();
        /* Creates a PlayerList object. As you may have already guessed, it is a list of players and functions for manipulating that list.*/
        
        while (rankingsScanner.hasNextLine())
        {
            players.addPlayer(rankingsScanner.nextDouble(), rankingsScanner.nextInt(), rankingsScanner.nextInt(), rankingsScanner.nextLine());
        }
        /* This while statement loops through all of the rankings data and adds the ranking data to our list of players */
        
        int kvalue = resultsScanner.nextInt();
        /* Gets the k-value from the first line of the results. This k-value is applied to all of the results from that file */
        
        while (resultsScanner.hasNextLine())
        {
            double p1wins = resultsScanner.nextDouble();
            String p1name = resultsScanner.nextLine();
            double p2wins = resultsScanner.nextDouble();
            String p2name = resultsScanner.nextLine();
            
            players.enterResult(p1name, p1wins, p2name, p2wins, kvalue);
        }
        /* This while statement loops through all of the results data and then sends it to the "enterResults" function so the rankings can be updated */
        
        players.printAllRatings();
        /* The new ratings are printed in the same formatting as the rankings.txt file. If you'd like to save the data for future use, simply copy/paste the information over to the rankings.txt file (deleting the old information) and save the file */
    }
}

package dgzelo;

import java.util.ArrayList;
import java.util.Collections;

public class PlayerList 
{
    private ArrayList<Player> aList = new ArrayList<Player>();
    
    public PlayerList()
    {
    }
    
    public void addPlayer(String name)
    {
        aList.add(new Player(name));
    }
    
    public void addPlayer(double rating, int wins, int losses, String name)
    {
        aList.add(new Player(rating, wins, losses, name));
    }
    
    public int findPlayer(String name)
    {
        for (int i = 0; i < aList.size(); i++)
        {
            if (aList.get(i).name.equalsIgnoreCase(name))
                return i;
        }
        
        System.out.println(name + " was not found in the rankings and will be automatically added with a rating of 0.");
        addPlayer(name);
        return aList.size()-1;
    }
    
    public void enterResult(String name1, double wins1, String name2, double wins2, int kvalue)
    {
        int player1index = findPlayer(name1);
        int player2index = findPlayer(name2);
        
        double e1 = 1/(1 + Math.pow(10., ((double)(aList.get(player2index).rating-aList.get(player1index).rating))/400));
        
        double p1pointgain = kvalue * Math.abs(wins1 - wins2) * ((wins1 > wins2 ? 1 : 0) - e1);
        
        aList.get(player1index).rating += p1pointgain;
        aList.get(player2index).rating -= p1pointgain;
        
        if (wins1 > wins2)
        {
            aList.get(player1index).wins += 1;
            aList.get(player2index).losses += 1;
        }
        else if (wins2 > wins1)
        {
            aList.get(player2index).wins += 1;
            aList.get(player1index).losses += 1;
        }
    }
    
    public void printAllRatings()
    {
        Collections.sort(aList);
        for (Player aList1 : aList) 
            System.out.println(aList1);
    }
}

package dgzelo;

public class Player implements Comparable<Player>
{
    double rating;
    int wins;
    int losses;
    String name;
    
    public Player(String name)
    {
        this.name = name;
        rating = 0;
        wins = 0;
        losses = 0;
    }
    
    public Player(double rating, int wins, int losses, String name)
    {
        this.rating = rating;
        this.wins = wins;
        this.losses = losses;
        this.name = name;
    }
    
    @Override
    public String toString()
    {
        return (Math.round(rating*10000.0)/10000.0 + "   " + wins + " " + losses + name);
    }
    
    @Override
    public int compareTo(Player otherPlayer) 
    {
        if (otherPlayer.rating > this.rating)
            return 1;
        else
            return -1;
    }
}

 

2

Share this post


Link to post
Share on other sites

We haven't played very many matches so far, but I figured I'd post ratings just so everyone can see what they would look like. I'll post the code of the ratings program later tonight.

 

Current format rating, wins, losses, player name

4.964   2 0 SQUIDS~
2.5   1 0 Carter Wix
-2.5   0 1 Synergy_DabKing
-4.964   0 2 muh 100 godzillion

 

Goat format rating, wins, losses, player name

2.5   1 0 ACP
-2.5   0 1 Satchmo

1

Share this post


Link to post
Share on other sites

acp didnt i beat you

0

Share this post


Link to post
Share on other sites
11 minutes ago, Silver said:

acp didnt i beat you

You played me in a testing match about a few days before warring even started, if that's what you mean.

1

Share this post


Link to post
Share on other sites

Current format rating, wins, losses, player name

4.964   2 0 SQUIDS~
2.5173   1 0 ACP
2.4828   1 0 wrinklywinkie
2.4649   1 0 Silver
-0.1069   2 2 Carter Wix
-2.482   0 1 Soul
-2.5   0 1 Synergy_DabKing
-7.3402   1 4 muh 100 godzillion

 

Goat format rating, wins, losses, player name

9.7154   5 1 ACP
0.1772   1 1 mark
0.0005   1 1 MMF
-2.4464   0 1 Goins
-2.4642   0 1 SageRhapsody
-2.4825   1 2 Silver
-2.5   0 1 Satchmo

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.