Page 1 of 2

Introducing Country Weighting

Posted: Mon Feb 19, 2018 12:58 am
by jmo1121109
In very simple terms, this change will help ensure that country assignments are more even for members over multiple games played since country selection has been broken for a while and thanks to this change, it should be "fair" again.

To quote the creator's description:

"Previously country selection has been random, or attempted to use the standard deviation of the chances of a player getting a particular country. This change instead uses the Hungarian algorithm to solve the assignment problem optimally. It also solves the problem where entries weren't being saved in the wD_VariantData table, so now the play counts will affect the country selection."

So a huge thank you to rjmcf for making the code changes to introduce this weighting system for us! And thank you to A_Tin_Can for working on the code reviews for this change!

If you're interested in reviewing the code behind this change, you can do so at: https://github.com/kestasjk/webDiplomacy/pull/281

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 1:05 am
by A_Tin_Can
This is a huge improvement! Many many thanks to rjmcf for implementing it, and to the moderator team for their help in confirming that the patch was successful.

+1s all around!

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 1:19 am
by Rjmcf
Thanks for the shoutout! I haven't been here long but this community is AWESOME and I'm super grateful to be able to contribute to it. :-D

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 5:14 am
by bo_sox48
Thank you rj and ATC for helping out on this and of course jmo as well. This is quietly a huge improvement over what we had been doing in the past.

Rj, welcome to the world of webDip development. It's great to get some new help and we're very grateful for it.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 5:15 am
by CommanderByron
Super grateful to have members like you willing to put in the work.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:19 am
by TrPrado
Thanks so much to everyone involved for helping improve the quality of the site.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:37 am
by Durga
Wow thanks everyone! You're all awesome. Any chance we can get a "pick your country" game option? :)

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:38 am
by Claesar
We regularly had forum posts complaining about country weighting, but that should be fixed now that we outsourced it to Hungary!
Thanks for the work, this one was very high on our list.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 2:55 pm
by Yonni
Fantastic, great work.

I assume your assignment history is agnostic to press type? (e.g. drawing Germany for a GB game also affects your chance of drawing Germany for a diplomacy game?)

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 3:15 pm
by Condescension
I disagree with this! Conceivably you could manipulate this by playing a lot of unimportant games until your favorite country gets skipped a few times, then joining a more important game. It should just be totally, independently random.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 4:09 pm
by Claesar
Condescension wrote:
Mon Feb 19, 2018 3:15 pm
I disagree with this! Conceivably you could manipulate this by playing a lot of unimportant games until your favorite country gets skipped a few times, then joining a more important game. It should just be totally, independently random.
That doesn't really work the way you decribe it. There's a chance you could have a lower chance to draw a centre power if you're regularly starting 100+ games. But that strategy may also backfire, forcing you to start another 1000 games.

And even then, you could not get the country you want. If you think it's worth the effort, go for it.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 5:44 pm
by Condescension
Claesar wrote:
Mon Feb 19, 2018 4:09 pm
Condescension wrote:
Mon Feb 19, 2018 3:15 pm
I disagree with this! Conceivably you could manipulate this by playing a lot of unimportant games until your favorite country gets skipped a few times, then joining a more important game. It should just be totally, independently random.
That doesn't really work the way you decribe it. There's a chance you could have a lower chance to draw a centre power if you're regularly starting 100+ games. But that strategy may also backfire, forcing you to start another 1000 games.

And even then, you could not get the country you want. If you think it's worth the effort, go for it.
Why do I need 100+ games? If this is the case, then it's not actually impactful, right? The only way this system would benefit players if it meaningfully decreased the odds of playing the same country multiple times in a row or close to each other, right? Does it do that or does it not do that?

If it doesn't do that, what does the system do? If it does do that, can't I wait until I get a game playing as Italy before starting an important game, decreasing the odds of drawing Italy?

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:02 pm
by Mercy
I agree with Condescension.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:14 pm
by CommanderByron
At the risk of being wrong I think the thing that Claesar is saying is that you'd have to play a lot of games to affect the algorithm to the point where you could guarantee any ONE country. Even then you'd have to draw the country you are trying to avoid in a higher percentage of the "less important" games; which you also can't manipulate. So it's very hard almost impossible to game this system but if you put the effort in and can also predict what the algorithm will do with the other 6 players histories than by all means feel free to.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:31 pm
by Condescension
You don't need to guarantee a country in order for it to be exploitable. You can just make it LESS LIKELY, even marginally, to pick a given country (Italy), which is clearly gaming the system. If a player were to play meaningless games until they drew Italy, then play an important one, they would be less likely to draw Italy. That's exploitation, and that's a factual consequence of this decision.

Just use the php random.org API and distribute the countries randomly. I don't think anybody in the world would claim that a random distribution is unfair.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:57 pm
by Octavious
That would be a remarkable amount of effort for very little gain. Can we not assume that it won't happen on the basis that no one here is sad enough to actually do it?

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 6:58 pm
by Yonni
Nobody worth their salt is gaming the system like that and the effect it would have is minimal. Stop building strawmen.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 7:31 pm
by Tom Bombadil
I won't speak for everybody, but I don't really care if someone goes through that effort to try to get a "better" country in a big game.

For starters, people have different country preferences, which shows that no country is inherently better than others. So you may start 100 games to try to join a big game as France, while I do the same thing with the hopes for Austria.

Second, I, like most people I'm sure, play on this website for fun during my spare time. I'd much rather have a system that weights so avoid repetitive games as the same country over and over. Variety is fun.

I think its a great system. Much appreciated to rjmcf, ATC, jmo an others who helped fix this system.

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 9:00 pm
by Deeply_Dippy
Well said, sah!

Re: Introducing Country Weighting

Posted: Mon Feb 19, 2018 9:17 pm
by Durga
Yeah, I'm sick of having 20 games as France when I fucking hate France.