BTG FORUMSPage :12
Forums -> General Discussion -> Multiplayer Rating System. Ideas?
The GeekMessage
Sparticuslvl 19
Finally fixed the profile pic uploader
Site Admin


Posts: 927
Joined: 8/27/2010
Posted: 12/21/2012 1:43:58 PM

Hey everyone :)

As the game is getting closer and closer to being done, I need to start thinking of some sort of rating system. I'm sure most of you have played multiplayer games where there is a rating system that helps you get an idea how good other players really is.

Most rating systems are similar to the ELO rating system (http://en.wikipedia.org/wiki/Elo_rating_system). Basically everyone starts off at a rating of 1500. Better players will see their rating slowly rise, others will see their rating slowly drop. It's sort of an exponential scale... so moving up from 1500 to 1600 is quite easy.... moving from 1900 to 2000 is very hard.

Seeing as how many of you are gamers and i'm sure many of you are good at math, I have a question for you.

How would you calculate how each of the following players rating would change based on the game outcome :

Player 1, Rating 1500, 1th place
Player 2, Rating 1720, 2nd place
Player 3, Rating 1310, 3rd place
Player 4, Rating 1450, 4th place
Player 5, Rating 1690, 5th place
Player 6, Rating 1159, 6th place

So, looking at the information we can see that a 1500 got first place. That player beat some players that are rated better than him and some that are rated lower than him. Clearly his rating should go up... but by how much?

Then you see another player rated 1720 got 2nd place. Clearly he beat out a lot of players, but he did however lose to a much lower rated player (the 1500). Would his rating go up, down, and by how much?

Anyways, that's the next big thing I need to solve. I'm hoping someone out there either has a solution, or, knows what formula others games use to calculate this.

This problem has been solved many times before in many multiplayer games. However, I haven't been able to find any of their formulas :)

lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 12/21/2012 4:17:11 PM   (Edited: 12/25/2012 10:43:30 AM)

***warning*** work in progress ***

p: player
pl: players lost against
pw: players won against
n: number, count ---> npw: number of players won against
t: tournament
si: relation of current rating to start value 1500



1st i take into account the relation of the ratings of players lost against and players won against to the own rating, some kind of indices:

pwi= (sum ratings won against) / (npw x current rating)
pli= (sum ratings lost against) / (npl x current rating)

example player 4:
pwi=2849 / (2x1450)= 0.9824 ---> <1 means was higher rated than average players won against
pli= 4530 / (3x1450)=1.0414 ---> >1 means was lower rated than average players lost against

---> both indices close to 1 means the player should stay about the same in ratings

2nd, i combine pwi and pli to a tournament index that highly values numbers of players lost and won against:

ti = npw x (pwi^npw) - npl/(pli^npl)

---> the (pwi^npw) exponentially slows down relatively high ranked winners gaining much more, the (pli^npl) prevents from loosing too much against many higher ranked

ti player 4 = 2x(0.9824^2) - 3/(1.0414^3) = 1.93 - 2.656 = -0.726

3rd, multiply ti to slow down gain/loss in relation to start value and finally adding to current rating:

rating new = rating old + (optional constant)x(si x ti)

rating new player 4 = 1450 + (optional constant)x(si x -0.726) =
---> when 0<si>2, player 4 will remain the same in ratings, but with that (optional constant) being 10, some noticeable change in raing occures.

example player 1:

pli = 0 (!!!!bugs may occur for things like 0 / 0 possible solution: extra pli argument for winner sets it 0, and pwi argument for looser that sets it 0)
pwi = 7329 / 5x1500 = 0.9772
ti = 5 x (0.9772^5) - 0 = 5 x 0.891 = 4.455 ----> 4.455 for ti instead of 5, because he had a little higher rating than the average of players won against

rating new = 1500 + (optional constant) x ( si x 4.455 ) =


to to is formula for variable si and a optional constant factor to make the final gain/loss more noticeable. i'll see if that's necessary after calculating some examples.

greetings, crumb
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 12/22/2012 8:11:54 AM   (Edited: 12/25/2012 10:44:12 AM)

to sum it up in better overview:

p: player
pl: players lost against
pw: players won against
npw: number of players won against
npl: number of players lost against
ti: some tournament index, gain or loss with relation to others
si: realation start-rating (1500) to current rating
---> "si" is on my to do list. it will be a quotient,
i aim for a range 0 < si >= 2
positive ti for players under 1500 should give si > 1
negative ti for players over 1500 should give si < 1

pwi= (sum ratings of pw) / (npw x current rating)
pli= (sum ratings of pl) / (npl x current rating)
ti = npw x (pwi^npw) - npl/(pli^npl)
rating new = current rating + (optional constant)x(si x ti)
njulianlvl 67
010 001 111
Geek


Posts: 184
Joined: 9/28/2010
Posted: 12/22/2012 8:38:49 AM   (Edited: 12/29/2012 9:01:02 AM)

No matter what Formula you use, never use "root of curren rating". This caused the rating system of Vortex Wars 2 to crush. Someone tried to get below 0 with success. Everyone who was in a game with him became "infected" with a rating of a huge negative number.

Just that you know, sooner or later someone will get below 0.
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 12/22/2012 2:55:21 PM

a downward cap for a players rating value, used in the calculation, could do the trick, upward i don't think it'll be necessary. everyone gets rewarded a nerved sum of the count of players he lost and won against. maybe tomorrow i'll calculate extreme case scenarios like a very low rated player winning against a bunch of very high ranked. i'd still have to put up estimations for people playing thousands of tournaments, if their ranking can get above that still wouldn't wrack any constellation of 6 players ranings within that range. but i'm positive you can't break this in years with a certain playing behaviour
Sparticuslvl 19
Finally fixed the profile pic uploader
Site Admin


Posts: 927
Joined: 8/27/2010
Posted: 12/23/2012 7:33:09 PM

Cool, thanks for all the work you put together lordcrumb. As soon as my Christmas guests leave I'll go over it in more detail and see how it looks. :)

For the most part, the actual game is done and working. The hardest part is starting now for me. I basically need to balance the game.... which means I need to play the game and see if it's too easy, too hard, the prices of the towers are right, the damages are all good...etc, etc. Since now there are 50 different creepos, 11 levels of towers, up to 16 players in real time... It's a ton of work... but hopefully goes smoothly :)

I hope everyone is having an awesome holidays. Take care :)
MainstreaMlvl 75
is hardly around any more. Apologies...
Geek


Posts: 76
Joined: 9/2/2010
Posted: 12/25/2012 12:55:18 AM

This work has been done before... there is a good multiple-players variations on the Elo chess-point system which has been holding up for the past decades. Please see http://en.wikipedia.org/wiki/Elo_rating_system
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 12/25/2012 10:03:28 AM   (Edited: 12/25/2012 10:48:49 AM)

i've noticed that for the final line, ti still needed to be nerved for gains/losses for players with ratings "far" from the start value, that would be 1500 i guess.

so i added the variable "si" to the overview post, and described the range of output it should have etc.. postponed figuring the formula for now,
but shouldn't be too hard

added some extra explanations in my 1st post and updated variable namings in both posts
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 1/25/2013 9:59:29 AM   (Edited: 1/25/2013 10:03:10 AM)

i figured out the missing formula for variable si.
what's missing is the constant factor in the last part of the formula, which i can only figure out by doing some testing with a scientific calculator. but i'm busi with a new customer luckily/sadly :/

________________
history for si:

aiming for 2000--> 0 1500-->1 1000--> 0
c.rating-1500 --> -500 to +500
root of ((c.rating-1500)^2) --> 0 to 500 --> 0 for new players, 500 for 1000 and 2000er scorers
(root of ((c.rating-1500)^2) - 500) / 500 --> -1 for new players, 0 for extrem low and high scorers but we ned +1 and 0 instead of -1 and 0 ---> this times -1
(root of ((c.rating-1500)^2) - 500) / -500
___________________________


latest definitions:

cr: current rating
srw: sums ratings of players won agains
srl: sums ratings of players lost against
npw: number of players won against
npl: number of players lost against
ti: tournament index, gain or loss with relation to others
si: realation 1500 to current rating to keep ratings between 1000 and 2000

_________________________

latest formulas:

pwi= srw / (npw x cr)
pli= srl / (npl x cr)
ti = npw x (pwi^npw) - npl/(pli^npl)
si=(root of ((cr -1500)^2) - 500) / -500
rating new = cr + (constant factor)x(si x ti)

njulianlvl 67
010 001 111
Geek


Posts: 184
Joined: 9/28/2010
Posted: 1/31/2013 12:20:26 PM

I had the idea, that you implement a factor for the duration of a game. At first I thought of the amounts of Waves or creeps you beat, but that would make grinding too easy.
So the only thing that is left is time. I thought of

(Formular stuff) + (t * x) + (even more Formular)

while t is the time in eighter timeunits, say 3 compleated minutes are one timeunit, or simpler in full minutes.
If you say that one game with 60 minuts should worth more than 10 games with 6 minutes each, then x must be greather than 1. If you think, that a 60 minuts game should worth less than 10 games of 6 minutes, then x has to be less than 1.

I hope it's easy for you to build in the time factor :)
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 2/23/2013 6:00:29 AM   (Edited: 2/23/2013 6:05:54 AM)

i have a hard time testing the formula, can't get around with those online scientific calculators. and i couldn't find any fitting desktop solution either, where i can enter different variables for the different formula parts or the crappy looking merged formula, that consists of many () and sub()'s...
so i'll do some tests by hand.

test 1, two good ones winning against many low rated:

Player 1, Rating 1500, 1th place <---
Player 2, Rating 1900, 2nd place <---
Player 3, Rating 1100, 3rd place
Player 4, Rating 1100, 4th place
Player 5, Rating 1100, 5th place
Player 6, Rating 1100, 6th place <---

test 2, extremm low beating extream high ones:
Player 1, Rating 1100, 1th place <---
Player 2, Rating 1900, 2nd place <---
Player 3, Rating 1900, 3nd place <---

test 3, extrem high beating extrem low ones:
Player 1, Rating 1900, 1th place <---
Player 2, Rating 1100, 2nd place <---
Player 2, Rating 1100, 2nd place <---

test 4, somewhat average, one good one winning and a good one loosing:

Player 1, Rating 1800, 1th place <---
Player 2, Rating 1100, 2nd place <---
Player 3, Rating 1300, 3rd place
Player 4, Rating 1400, 4th place
Player 5, Rating 1600, 5th place
Player 6, Rating 1500, 6th place <---
Player 7, Rating 1300, 7rd place
Player 8, Rating 1400, 8th place
Player 9, Rating 1100, 9th place <---
Player10, Rating 1800, 10thplace <---

test 5, opposite of test 4:
Player 1, Rating 1100, 1th place <---
Player 2, Rating 1800, 2nd place <---
Player 3, Rating 1300, 3rd place
Player 4, Rating 1400, 4th place
Player 5, Rating 1600, 5th place
Player 6, Rating 1100, 6th place
Player 7, Rating 1300, 7rd place
Player 8, Rating 1400, 8th place
Player 9, Rating 1800, 9th place <---
Player10, Rating 1100, 10thplace <---

arrows pinpoint players i'm going to test now.
wish me luck, that it's gona work ;)
'later

lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 2/23/2013 7:18:52 AM   (Edited: 2/23/2013 7:52:21 AM)

first results
test 1:

Player 1, Rating 1500, 1th place <--- pwi=0.84 pli=0 ti=2.09 si=1 rating_new= 1500+(?)x(2.09)
Player 2, Rating 1900, 2nd place <--- pwi=0.579 pli=0.789 ti=-0.834 si=0.2 rating_new=1900+(?)x(-0.1668)
Player 3, Rating 1100, 3rd place
Player 4, Rating 1100, 4th place
Player 5, Rating 1100, 5th place
Player 6, Rating 1100, 6th place <--- pwi=0 pli=1.218 ti=-1.8657 si=0.2 rating_new=1100+(?)x(-0.373)

constant factor "?" being "5" would result:
player 1 from 1500 to 1510 points
player 2 from 1900 to 1899 points
player 6 from 1100 to 1098 points

makes sense to me so far, as player 1 gains a lot from winning
and player 2 remaining almost the same and the unlucky player 6 only loosing a little


test 2:
Player 1, Rating 1100, 1th place <--- pwi=3.45 pli=0 ti=11.93 si=0.2 rating_new=1100+(?)x2.387
Player 2, Rating 1900, 2nd place <--- pwi=1 pli=0.579 ti=0.421 si=0.2 rating_new=1900+(?)x0.084
Player 3, Rating 1900, 3nd place <--- pwi=0 pli=0.79 ti=-5.1 si=0.2 rating_new= 1900+(?)x(-1.03)

again with the constant being 5:

player1 from 1100 to 1112
player2 from 1900 to 1900
player3 from 1900 to 1895

onward to test 3... wait, need a break ;)
njulianlvl 67
010 001 111
Geek


Posts: 184
Joined: 9/28/2010
Posted: 2/24/2013 10:41:20 AM

Quote:

test 2:
Player 1, Rating 1100, 1th place <--- pwi=3.45 pli=0 ti=11.93 si=0.2 rating_new=1100+(?)x2.387
Player 2, Rating 1900, 2nd place <--- pwi=1 pli=0.579 ti=0.421 si=0.2 rating_new=1900+(?)x0.084
Player 3, Rating 1900, 3nd place <--- pwi=0 pli=0.79 ti=-5.1 si=0.2 rating_new= 1900+(?)x(-1.03)

again with the constant being 5:

player1 from 1100 to 1112
player2 from 1900 to 1900
player3 from 1900 to 1895

____
In my opinion Player 1 should get way more, while player 3 should lose way more.

But don't hurry or mess with all your tests, I'm glad that you're doing it voluntarily. And if you want I can try to help.
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 2/25/2013 1:41:07 AM   (Edited: 2/25/2013 1:44:27 AM)

that's what i'm wondering about... it needs a lot to get that high or low as 1900 or 1100. both are 400 away from the starting value 1500 and therefore have their ti nerved by a si of 0.2. that means their gains And losses get nerved quite a lot.
maybe i should set it up so gains for low scorers and losses for high scorers not getting nerved as much as losses for low-scorers and gains for high scorers...i mean since player 1 has a very high ti of about 12, his "disadvantage" of being a low scorer is already taken into account.

and another explanation for the relatively low changes for the players lays in the fact that only 3 were participating in the tournament. if there were more high-scorers beaten in this tournament, the gain of player 1 would be higher (but maybe still not enough?)

i'll think about it for a bit
lordcrumblvl 86
thx 4 voting and rating maps
Geek


Posts: 175
Joined: 9/21/2010
Posted: 2/25/2013 6:13:17 AM

@njulian:
i'm glad about opinions, that's why i post results.

but after i thought a bit about that results of test2, i think the outcome is reasonable, as player1 wouldn't have lost nearly as much as 12 points that he gained from winning.
also just a opinion though, that will get clearer after i get around to the other tests
 Page :12
Start Playing Now!
Returning Geeks Sign In
New Geeks Register
 
 
© 2010 - 2015, BeatTheGeek.com - Terms Of Service - Privacy Policy