Rushb ELO Engine

FREE
By akdarrah | Updated il y a 20 jours | Data
Health Check

N/A

README

Rushb API sets out to solve what initially may seem like a simple problem: ELO player rankings with support for editing/deleting match history.

When ranking a match between two players using ELO, a player’s ranking is impacted differently depending on the current ranking of their opponent. For situations where rankings can be permanent, ELO implementation can be simple. But when you throw in editing or deleting match history, the problem becomes much more complex. By changing the ranking of a player, you are potentially invalidating the ranking of every player they played against at a later time, every player those players played, etc.

Problem Example

For example, Let’s say we have 3 new players each with an initial rating of 1000. Player A and B face off in a match with player A winning. This match makes player A’s rating 1012 and Player B’s rating 987. Now Player A and Player C face off in a second match, and player C wins. Now, after the two matches, Player A has rating of 999, Player B 987, and Player C 1012.

Now imagine that a user of your application decides to edit the result of the first match between Player A and Player B so that player B now wins. Not only does this change Players A and B, Player C is also impacted since Player A would no longer have a rating of 1012 for the second match (after a loss against Player B, Player A would have a rating of 987). The end result is Player A with a rating of 974, PlayerB 1012, and PlayerC 1012.

As you can imagine, this becomes a difficult problem when dealing with thousands of players and matches.

API Theory

When querying for the ranking of a player, Rushb will always return the most up to date information available. As API requests are made, Rushb queues changes (new matches, match edits, or match deletions) to happen one at a time. This allows the API to correct all impacted Player rankings after a change. Match creation is fast because no other players will ever be impacted, but edits and deletions can become computationally expensive.

Architecture

IMPORTANT: Use of this API requires an account on http://www.rushb.tv/. All API resources belong to an Application, which can be created from the Rushb website. Once your application is created, you will be given a ‘secret key’, which will be used as the api_key for all requests to the API.

The Rushb API was designed to remove as much complexity as possible from the application. As a user of the API, you only need to work with 3 resources: games, players, and matches.

Game can represent a literal game (such as Starcraft), but can also be used in more abstract ways to simply represent a group of players. For example, if you had 3 regions of Starcraft players, you could have 3 game records (one for each region: Starcraft-East, Starcraft-Central, Starcraft-West).

Players represent the participant in the game. Players can only participate in matches for the game they belong to, against players in the same game.

Matches are one on one face offs between players. They will either result in a win for one of the players, or a tie (represented by a null/nil winner value).

Ruby Gem

The official Rushb Ruby gem can be found at https://github.com/akdarrah/Rushb-Ruby-Gem

Get Started

Please send an email to developers@challonge.com for pricing.

Followers: 3
Resources:
Product Website
API Creator:
A
akdarrah
akdarrah
Log In to Rate API
Rating: 5 - Votes: 1