I love this section: 'Thread description'
  • 36 posts
  • Page 1 of 3
AlexCheckMate wrote:
Morituri te salutant,

This thread is made for a personal reason. I would like to know how the mechanics for the rating on this site function. It seems obvious that there are a number of variables / constants involved; question is - which exactly are these? What are the numerical values connected to these?

Now I do not know whether the inner workings for this system are supposed to remain / be secret, but if they aren't, I'd love to hear more about them.

the inner workings aren't public. i would like to know myself [...]. that's also something you could probably ask in the forums for the programmers to maybe respond to.
- Hoodlum

What is most likely already out there in the public domain, in regard to the engine would be the following. Positive effects on the rating, which can be gained for winning a game, are:

  • More players in the game
  • Higher rated players in the game
  • Standings against players which suggest the other player/s is/are tough competition for you (dunno...? guessing..?)
  • Specials, such as boni from tournaments
  • ...

Now some farfetched thoughts on what else might have an effect:

  • The settings of the game (map, gametype (e.g. Capitals vs Deathmatch), duration & duration type (e.g. live vs 24h turn), card turn in, fortification type)
  • A random factor
  • Whether there has been resignations / missed turns - and the amount thereof
  • ...

If someone of the crew (or just someone who's gathered loads of games / data and figured it out for him/herself) would share this knowledge with me, I'd be very happy =)
Thanks in advance,

Alex

Disclaimer: An exhaustive search on the forum for more answers regarding this mystery has not (yet) been executed - there might be more information out there already than what I know of
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
Matty wrote:
Heyho. The site's code is not public, as we don't want ppl to just be able to copy the site and do random stuff with it. But the inner workings of these algorithms are not necessarily secret.
For example, the literal code we use to determine a dice roll is just used as an example on the bb-code page: https://dominating12.com/tutorial/bbcode

I'm not sure if we ever published the rating code, so I posted the relevant bits below in the spoiler. I left out some specifics like how we determine the winners and the weird $ signs that php code tends to have. I didn't leave out any team game specific things, so this code is also used when there's 2 winners and 4 losers or something like that.
As you can see, standings, game types, settings, resignations and all these have no influence. Only the amount of players and their total rating. Winning a 9 player game with higher rated players then you will give you lots of rating. Winning a 3 player game to players with lower rating will not give you that much.
Losing a game if you're the highest rated player will cost you more rating. Losing a game where everyone's better then you will not cost you that much at all.

As you can also see, 2 player games with high rating differences are handled differently.

The way we calculate the rating (click to show)
"Strength doesn't lie in numbers, strength doesn't lie in wealth. Strength lies in nights of peaceful slumbers." ~Maria
AlexCheckMate wrote:
Thanks for the swift and rather elaborate answer Matty! Makes perfect sense to not disclose all of the code - I'm not even interested in that either.

Reading through your post / code, it seems rather straightforward, but looks might be deceiving...

So... just to give myself an example...
Numerical example for a 6 player game (click to show)

As a base - for losing; you lose 20 rating. With this number getting adjusted to be lower/higher, based on your rating with respect to the average rating of the game.
As a base - for winning; you win 20 rating per opponent. With this number getting adjusted to be lower/higher, based on the opponents ratings with respect to the average rating of the game.

So..... it makes no difference for the losers against who they lose? It's just about the average rating in the game?
In case I made some errors somewhere, please do point them out to me (+ corrections xd).

///\\\///\\\///\\\
\\\///\\\///\\\///

As for the little modification regarding 2 player games with the loser having >3x the rating of the winner (e.g. 1500 player beats 4600 player).
Is this being processed in the way it is intended? It seems that when A > 3B, the MORE big A is with respect to B (e.g. A = 7B ), the rating distribution becomes ever so more less profitable for B...?

As an example:
Numerical evaluation of 2 player games with high ranked player >3 low ranked player (click to show)

It does indeed protect the high ranked player, but it also rewards the low ranked player in an increasingly more awkward way. I assume rating is not supposed to be "created" out of thin air... but perhaps the winnings should not be comprised? Only tackle the losses? The current mod is only in favour of protecting high players, but does not reward low players in a fair way.
For a "low winner", it is more profitable to win against someone exactly 3x his/her rating, than someone who's supposed to be even better (so s/he's also less likely to win against this person) and has a rating >3x of the winner. In the same logic; better to win against someone with 2x your rating, than someone with 4x your rating (gains/losses of 26 and 24 respectively).

As a sidenote... I assume the default rating starts at 1000? That way it'll be rather difficult to drop down to 500, 200, or even lesser rating... it does however make perfect sense to treat cases approaching the limits differently.. (e.g. a 200 rating player beating a 1000). Then again... no real use in having 'exception' catchers at all places... There's more important stuff to worry about...

Once more - thanks for the input! Happy to hear some more / my current thought(s) reviewed =)

- Alex

Alex
PS - Cool link with BBCode (Hihi, BBC B))! Now I see there is an even better way to quote someone (should've added Hoodlums name in the quote in the first post ;d)
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
AlexCheckMate wrote:
I've just played a game against someone of whom I'm fairly sure s/he just gained a rank.

My rating was 1653, his/her rank was (& remains) Warrant Officer - so should be >2100.
Winning the game gave me 22 rating.

Using your code (click to show)

Meaning the opponent shouldve had a rating between 2122 and 2139. Seems likely.

Using your code #2 (click to show)

I suppose I'll opt for a few more test cases (with more players) and if they stay in line with the code, I'll just be fine with it...
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
AlexCheckMate wrote:
Going over a 4 person game (played it yesterday).

4 player game (click to show)

I'm fine with the explanation of the code as is. Thank you Matty!

If someone would want to... a spin-off topic could be to discuss whether they feel like the rating system, in the way it currently is, is fine - or some tweaking would be in order.
In my opinion... I'm not going to burn my hands on that project - yet.

One last time - Thanks a lot Matty :)

PS - I'm sorry if someone regards my numerous posting as spam - it is by all means NOT intended as such!

- Alex
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
Matty wrote:
AlexCheckMate
As a base - for losing; you lose 20 rating. With this number getting adjusted to be lower/higher, based on your rating with respect to the average rating of the game.
As a base - for winning; you win 20 rating per opponent. With this number getting adjusted to be lower/higher, based on the opponents ratings with respect to the average rating of the game.

So..... it makes no difference for the losers against who they lose? It's just about the average rating in the game?
In case I made some errors somewhere, please do point them out to me (+ corrections xd).
Correct. It doesn't matter if you lose directly to a higher ranked player or to someone else, for as long as they're in the game.
Of course, if you lose to a high ranked player, the average would probably be higher, so you probably lose less rating. In that sense it does matter.

AlexCheckMate
As for the little modification regarding 2 player games with the loser having >3x the rating of the winner (e.g. 1500 player beats 4600 player).
Is this being processed in the way it is intended? It seems that when A > 3B, the MORE big A is with respect to B (e.g. A = 7B ), the rating distribution becomes ever so more less profitable for B...?

It does indeed protect the high ranked player, but it also rewards the low ranked player in an increasingly more awkward way. I assume rating is not supposed to be "created" out of thin air... but perhaps the winnings should not be comprised? Only tackle the losses? The current mod is only in favour of protecting high players, but does not reward low players in a fair way.
For a "low winner", it is more profitable to win against someone exactly 3x his/her rating, than someone who's supposed to be even better (so s/he's also less likely to win against this person) and has a rating >3x of the winner. In the same logic; better to win against someone with 2x your rating, than someone with 4x your rating (gains/losses of 26 and 24 respectively).
Correct again. The thing is that it's considerably easier to beat a high ranked player in a 2p game, rather then a 3p game (let alone a 9p game). Therefore, the stakes in rating are less. The higher rated player doesn't deserve to lose as much, and the lower rated player doesn't deserve the big bonus, because it's relatively easy to do (note: relatively, it's still not always easy :)).
This 'correction' is hacked in a bit, and has some drawbacks as well. In either way 2p games are not a very reliable way to get rating. I suggest you play them for the fun of it :P
If we ever want a fair 2p rating system, we'd have to implement a completely separate rating system IMO, but that's probably for another topic (and low on my priority list).

AlexCheckMate
As a sidenote... I assume the default rating starts at 1000? That way it'll be rather difficult to drop down to 500, 200, or even lesser rating... it does however make perfect sense to treat cases approaching the limits differently.. (e.g. a 200 rating player beating a 1000). Then again... no real use in having 'exception' catchers at all places... There's more important stuff to worry about...
Correct.
"Strength doesn't lie in numbers, strength doesn't lie in wealth. Strength lies in nights of peaceful slumbers." ~Maria
Matty wrote:
AlexCheckMate
If someone would want to... a spin-off topic could be to discuss whether they feel like the rating system, in the way it currently is, is fine - or some tweaking would be in order.
In my opinion... I'm not going to burn my hands on that project - yet.
Something like ELO rating would probably be better then the system we currently use. I've toyed with the idea, but never really got close to doing it. I probably never will.

AlexCheckMate
One last time - Thanks a lot Matty :)

PS - I'm sorry if someone regards my numerous posting as spam - it is by all means NOT intended as such!
You're welcome, thanks for the question. I'm a fan of open source, and though not everything is suitable for open source, it's still a good thing to publish these bits of code.
"Strength doesn't lie in numbers, strength doesn't lie in wealth. Strength lies in nights of peaceful slumbers." ~Maria
AlexCheckMate wrote:
Matty
AlexCheckMate
As for the little modification regarding 2 player games with the loser having >3x the rating of the winner (e.g. 1500 player beats 4600 player).
Is this being processed in the way it is intended? It seems that when A > 3B, the MORE big A is with respect to B (e.g. A = 7B ), the rating distribution becomes ever so more less profitable for B...?

It does indeed protect the high ranked player, but it also rewards the low ranked player in an increasingly more awkward way. I assume rating is not supposed to be "created" out of thin air... but perhaps the winnings should not be comprised? Only tackle the losses? The current mod is only in favour of protecting high players, but does not reward low players in a fair way.
For a "low winner", it is more profitable to win against someone exactly 3x his/her rating, than someone who's supposed to be even better (so s/he's also less likely to win against this person) and has a rating >3x of the winner. In the same logic; better to win against someone with 2x your rating, than someone with 4x your rating (gains/losses of 26 and 24 respectively).

Correct again. The thing is that it's considerably easier to beat a high ranked player in a 2p game, rather then a 3p game (let alone a 9p game). Therefore, the stakes in rating are less. The higher rated player doesn't deserve to lose as much, and the lower rated player doesn't deserve the big bonus, because it's relatively easy to do (note: relatively, it's still not always easy :)).
This 'correction' is hacked in a bit, and has some drawbacks as well. In either way 2p games are not a very reliable way to get rating. I suggest you play them for the fun of it :P
If we ever want a fair 2p rating system, we'd have to implement a completely separate rating system IMO, but that's probably for another topic (and low on my priority list).


Yes, I can see the difference in 1v1, 1v1v1 and higher numbers; the 1v1 will have an increased luck factor - consequently taking down from the relative skill factor (not what I was talking about). Having said that... it doesn't change anything in the fact that - just for numbers/rating - it's smarter, in a sense, for the lower player to play against someone 3x his/her size, rather than someone 3.X, 5, 7 or even higher factors bigger... (with the bigger the ratio, the worse the stats get for the low player (#1 less chance of winning - relatively, #2 less gains in event of winning)). Sure, the gains should not keep on growing linearly (but that was already handled; e.g. for ratios of 3, 5, 7, the gains were respectively 30, 33, 35, with a limit at 39 (not 40) - this now goes 30, 20, 15, with a limit of 0 (when the opponent is >119x bigger (pure theoretical, lol), there is no sense in playing a game - wrt rating).

Then again... I can not hand you a solution for that right on the spot... just asked to make sure it was intended like that, even though it is crooked in a sense. It's fine to stay as is (after all, it's just about playing a game and having fun at it - works out perfectly as is :)).

-Alex
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
Matty wrote:
For reference, this is the weird 2p behaviour of rating. I actually never calculated the results before (Vexer put it in a long time ago).
This is how it is with Vexer's modifier.

WinnerLoserWon/lost
5000 500 3
5000 1000 6
2000 1000 13
1000 1000 20
1000 1500 24
1000 2000 26
1000 2500 28
1000 3000 30
1000 3001 29 (rather then 30)
1000 4000 24 (rather then 32)
1000 5000 20 (rather then 33)
1000 6000 17 (rather then 34)
500 5000 10 (rather then 36)
.
Note that you get less points if you beat a player that is A LOT better then you. But if you lose, you also lose a lot less points.
"Strength doesn't lie in numbers, strength doesn't lie in wealth. Strength lies in nights of peaceful slumbers." ~Maria
AlexCheckMate wrote:
Matty
For reference, this is the weird 2p behaviour of rating. I actually never calculated the results, but now I did, I very much doubt I like it.
Probably better to cut it off and keep it at 30 after a while.

This is how it is with Vexer's modifier (+1 correction & 1 addition). (click to show)

I guess your last line (underlined/large) is actually a very fair as well as easy solution!
Somewhat surprised noone verified Vexer's code - but I can fully understand that all such 'projects' are very low priority. It's not a job afterall #freetime.

-Alex
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
Matty wrote:
I edited my post a couple of times, as I realized more and more what happened - that highlighted line by you is edited out, as I don't think so anymore.
In fact, I actually think Vexer's formula is pretty smart.

You see, if we cut it off at 30, it's unfair for the higher rated player.

Let's take the 5000 vs 1000 case in comparison with the 2000 vs 1000 case.
If the 5000 player wins, he gets 6 rating. If he loses, he loses 20.
If the 2000 player wins, he gets 13, he loses 26.

So if they both end up playing 2 games, winning one, losing one (not unreasonable for 2p games), with Vexer's formula the 5000 rated player loses netto 14 rating, the 2000 rated player loses netto 13 rating. That's actually quite fair IMO.

If we'd cut off, the 5000 rated player would've gambled losing 30 (rather then 33), for only getting 6! That's a net loss of 24 rating, which means he should probably never play 2 player games if he wants to keep his rank.
"Strength doesn't lie in numbers, strength doesn't lie in wealth. Strength lies in nights of peaceful slumbers." ~Maria
AlexCheckMate wrote:
Matty, oops, did not notice the edits timely - mea culpa. I (think I) fully comprehend where you're coming from. It might not be the most fair, IMHO, when reviewing it from the lower players point of view (solely looking at rating gains; I believe rewards should not sink so much, when being so brave to face someone that much better (in theory)), but it does encourage more games between players which are far apart in rating - which might be very beneficial for the lower rated player too; learning more/quicker, if s/he's interested. If s/he isn't - s/he probably doesn't care about rating anyway. :)
Probably best to leave it as it - it's not broken. Doesn't need a fix. I also agree, the way it is being done now is pretty smart, smarter than I took it for at first sight =p

Having had a brief chat with TP_Knighty, it also protects against 'Smurfs' (never heard of that expression before xD).



New question that just popped up for me today. I got accepted in a lot of long term games (I've not played any of those before).
Q: What rating is used when calculating the ratings at the end of a game?
  • The rating which the players had when they ENTERED the game
  • The rating the players have just moments before the game ENDS
  • The rating the respective players had at the time they DIED
  • Other

Why do I ask?

A certain player could start 50 long term games (assume 4 player games - all opponents also at 1000 rating) while s/he's at 1000 rating. The ratings s/he'll win/lose in those 50 games might fluctuate a lot depending on the answer to my question. Even more so because opponents have the same fluctuations going on with their ratings. In the event s/he wins all 50, his/her gains will remain constant (60 rating/game => 3000 in total) - provided option #1 is in effect. Or, they will steadily decrease (when all other variables are kept constant; maybe 2000 in total? (didn't do the maths)) - provided option #2 is in effect. Option #3 makes not a lot of difference for set case - with player 1 winning all games; but in other events it might.

Thanks in advance,

-Alex
“Gravitation cannot be held responsible for people falling in love. How on earth can you explain in terms of chemistry and physics so important a biological phenomenon as first love? Put your hand on a stove for a minute and it seems like an hour. Sit with that special girl for an hour and it seems like a minute. That's relativity.”

― Albert Einstein
Cireon wrote:
We use the rating at the time that the winnings are calculated, so that is option 2. There are probably arguments for each of the three options you mentioned, but the truth is that any option but the option we currently use would be much more complicated implementation-wise, and I think the benefits to doing so are fairly minimal.
“This is how humans are: We question all our beliefs, except for the ones that we really believe in, and those we never think to question.”
- Speaker for the Dead, O.S. Card
Blagoje_Jovovic wrote:
1 point won 1 point loss for 1 vs 1 games.
always.
that is a solution as i can see
“Vital lives are about action. You can't feel warmth unless you create it, can't feel delight until you play, can't know serendipity unless you risk.”
The_Bishop wrote:
If I'm not wrong the first rating formula gave 20 points (lost and won) fixed, for 2p games, no matter what the 2 ratings were... Not great, it was really convenient for high ranks. Then got fixed (for all games actually) so that in 2p games approched a maximum of 40 points lost per game, in an asymptotic way. In practice it never reached 40, even a loss of 35 was rare and only happened when the loser had 7 times the rating of the winner; 36 or 37 were even rarer: almost impossible to arrive at 38 or 39... Just to describe the function.

It was at that point very un-convenient for highs and very convenient for lows. In practice high ranks could lose really much, while their winnings were ridicously low, so they almost stopped to play 1v1. Then arrived 'Vexer's repair' which is the formula we still use now I think, for 2p games.
«God doesn't play dice with the World» ~ Albert Einstein