# Player ranking using Elo with more than two players

I would like to use Elo to track player rankings between matches of a certain game, however the game can be played with up to four players in a match. I have seen games like Carcassonne use Elo with more than two players playing, but I am not familiar with Elo beyond a 1-1 matchup.

From the wikipedia article the two-player equations I would like to extend are:

Ea = 1/(1 + 10(Rb - Ra) / 400)

Eb = 1/(1 + 10(Ra - Rb) / 400)

Rxnew = Rxold + 32 * (W – Ex), where W=1 if X wins and W=0 if X loses.

How would the computation for Ex and W change given more than two players?

• I would be cautious about using an Elo-style system for games with more than two players, as many factors can conspire to make them less than pure games of skill - players ganging up on perceived strongest players, etc. If you mix scores from matches with different numbers of players I'd strongly suggest dropping the weightings (I.e. the '32' in the update formula for R) for games with more players. – Steven Stadnicki May 14 '13 at 0:43
• @StevenStadnicki thanks for the recommendation. I am unclear however on how dropping the weight constant addresses the issues you mention. Can you elaborate? – fbrereto May 14 '13 at 5:44
• By dropping the weight for multiplayer matches you're inherently saying that they're not as important to a player's rating as two-player matches are; essentially, you're saying that they're less representative of how good the player actually is. Magic does something similar to this with their tournament structure, where different levels of tournament have different K-values to represent how much weight they should be given in determining a player's rating. – Steven Stadnicki May 14 '13 at 6:53

As suggested by the top link in my Google search, you could calculate the individual changes in a players Elo rating (your R values), and then sum them up to provide the total change to apply to each player's rating.

i.e. If you have 4 players (A,B,C,D), calculate the change to A's rating (R-sub-a-sub-new) from their scores against B, C, and D, and then adjust A's rating by the total of the R-values calculated.

• I went this route and it seems to be working well so far, thanks. – fbrereto May 14 '13 at 5:45
• Looks like here are the formulas for this idea: sradack.blogspot.ru/2008/06/… – dbf Dec 6 '15 at 19:47

I found a paper with PHP source code of a method similar to fnord's answer here: http://elo-norsak.rhcloud.com/3.php I created a more general purpose php implementation here: https://github.com/FigBug/Multiplayer-ELO I am using it with my board game group, and so far it seems to be working well.

The calculation of Ex and W would stay the same. Instead of using a K of 32, use a K of 32 / (#players - 1). Then, look at each permutation of 2 players and calculate (32 / (#players - 1) * (W - Ex)). Then RxNew is equal to RxOld + Sum of all the values you just calculated.

• It's generally good practice to include a summary of your method/recommendation in the body of an answer, rather than relying entirely on external links. Links have a habit of breaking over time, which can leave your answer missing crucial details when someone tries to look it up years from now. – DMGregory Dec 7 '15 at 13:43
• Thanks for your practic code, it's helpful! Just one suggestion to your realisation - may be it's better not to round intermediate results eloChange += round($K * ($S - \$EA)); but do rounding only after all of calculations when setting eloPost – FlameStorm Jan 8 at 11:05

I recently wrote this post on the topic. I hope it helps. I will soon also add the code in another post.

Here is an outline of what it entails:

One decision you have to make is if you have a kind of sub-match or not. For example: In foosball, you will see that in a 2v2 game there are always two players facing each other directly and two indirectly. That means: the two defenders never really interact, it's only the attacker-defender pairs. The alternative is a scenario like Dota which is 5v5 and there are no real individual, predictable 1v1 matchups as part of the real match.

Case one: No sub-match structure:

In this case, you can simply average the rating of all players involved and use that as a team-rating for that team. So for R_a and R_b, you would simply use the sum of the ratings of all players of that team, divided by the number of players. Once you have computed the update for the team, you update every team-members rating with the update.

Case two: Sub-matches:

In this case, you split into sub-matches and weigh them against each other. So you compute E_a and E_b for every pair and then weigh these. For example: For 5v5 with a 1v1 sub-structure you compute the 5 E_a values for the 5 pairs. Then you compute a weighted term for every individual player based on the sub-match he is a part of. So if player 1 is part of submatch 1, you compute something like 0.6*E_a1 + 0.1*E_a2+ 0.1*E_a3+ 0.1*E_a4+ 0.1*E_a5 (where E_a1 is E_a for the sub-match the player is involved in).

The parameters here can be freely chosen, but you can optimize them once you have some data. Try to find a weighting scheme for which the player ratings don't fluctuate as much. This can be done automatically by computing the variance fo the values and then minimizing that for a given set of match results by adapting the weights. I hope this is helpful.