Introducing Country Weighting

Site announcements from the moderator team go here.
Message
Author
jmo1121109
Lifetime Site Contributor
Posts: 1099
Joined: Fri Sep 29, 2017 4:20 pm
Karma: 2944
Contact:

Introducing Country Weighting

#1 Post by jmo1121109 » Mon Feb 19, 2018 12:58 am

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

A_Tin_Can
Lifetime Site Contributor
Posts: 283
Joined: Fri Sep 29, 2017 9:18 pm
Karma: 451
Contact:

Re: Introducing Country Weighting

#2 Post by A_Tin_Can » Mon Feb 19, 2018 1:05 am

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!

Rjmcf
Code Contributor
Code Contributor
Posts: 147
Joined: Sun Dec 31, 2017 11:52 am
Karma: 26
Contact:

Re: Introducing Country Weighting

#3 Post by Rjmcf » Mon Feb 19, 2018 1:19 am

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
1

bo_sox48
Site Admin
Site Admin
Posts: 3901
Joined: Thu Jun 08, 2017 1:01 am
Karma: 2785
Contact:

Re: Introducing Country Weighting

#4 Post by bo_sox48 » Mon Feb 19, 2018 5:14 am

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.

CommanderByron
Silver Donator
Silver Donator
Posts: 217
Joined: Mon Dec 18, 2017 10:56 pm
Location: On an Island. In an Ocean. Surrounded by Water.
Karma: 165
Contact:

Re: Introducing Country Weighting

#5 Post by CommanderByron » Mon Feb 19, 2018 5:15 am

Super grateful to have members like you willing to put in the work.

TrPrado
Site Moderator
Site Moderator
Posts: 1904
Joined: Fri Sep 29, 2017 3:22 pm
Location: OOOOOOKLAHOMA WHERE THE WIND COMES SWEEPING DOWN THE PLAIN
Karma: 527
Contact:

Re: Introducing Country Weighting

#6 Post by TrPrado » Mon Feb 19, 2018 6:19 am

Thanks so much to everyone involved for helping improve the quality of the site.

Durga
Posts: 9486
Joined: Fri Sep 29, 2017 6:01 pm
Location: Canada
Karma: 5120
Contact:

Re: Introducing Country Weighting

#7 Post by Durga » Mon Feb 19, 2018 6:37 am

Wow thanks everyone! You're all awesome. Any chance we can get a "pick your country" game option? :)

Claesar
Posts: 1965
Joined: Tue Oct 03, 2017 10:34 am
Karma: 1490
Contact:

Re: Introducing Country Weighting

#8 Post by Claesar » Mon Feb 19, 2018 6:38 am

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.

Yonni
Silver Donator
Silver Donator
Posts: 408
Joined: Thu Oct 19, 2017 6:55 pm
Karma: 368
Contact:

Re: Introducing Country Weighting

#9 Post by Yonni » Mon Feb 19, 2018 2:55 pm

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?)

Condescension
Posts: 79
Joined: Fri Sep 29, 2017 5:09 pm
Karma: 19
Contact:

Re: Introducing Country Weighting

#10 Post by Condescension » 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.

Claesar
Posts: 1965
Joined: Tue Oct 03, 2017 10:34 am
Karma: 1490
Contact:

Re: Introducing Country Weighting

#11 Post by Claesar » 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.

Condescension
Posts: 79
Joined: Fri Sep 29, 2017 5:09 pm
Karma: 19
Contact:

Re: Introducing Country Weighting

#12 Post by Condescension » Mon Feb 19, 2018 5:44 pm

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?

Mercy
Posts: 257
Joined: Thu Oct 19, 2017 4:03 pm
Karma: 220
Contact:

Re: Introducing Country Weighting

#13 Post by Mercy » Mon Feb 19, 2018 6:02 pm

I agree with Condescension.

CommanderByron
Silver Donator
Silver Donator
Posts: 217
Joined: Mon Dec 18, 2017 10:56 pm
Location: On an Island. In an Ocean. Surrounded by Water.
Karma: 165
Contact:

Re: Introducing Country Weighting

#14 Post by CommanderByron » Mon Feb 19, 2018 6:14 pm

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.

Condescension
Posts: 79
Joined: Fri Sep 29, 2017 5:09 pm
Karma: 19
Contact:

Re: Introducing Country Weighting

#15 Post by Condescension » Mon Feb 19, 2018 6:31 pm

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.

Octavious
Posts: 3844
Joined: Fri Sep 29, 2017 4:16 pm
Location: The Five Valleys, Gloucestershire
Karma: 2605
Contact:

Re: Introducing Country Weighting

#16 Post by Octavious » Mon Feb 19, 2018 6:57 pm

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?

Yonni
Silver Donator
Silver Donator
Posts: 408
Joined: Thu Oct 19, 2017 6:55 pm
Karma: 368
Contact:

Re: Introducing Country Weighting

#17 Post by Yonni » Mon Feb 19, 2018 6:58 pm

Nobody worth their salt is gaming the system like that and the effect it would have is minimal. Stop building strawmen.
1

Tom Bombadil
Gold Donator
Gold Donator
Posts: 2927
Joined: Tue Oct 03, 2017 1:52 pm
Location: Detroit, MI
Karma: 2524
Contact:

Re: Introducing Country Weighting

#18 Post by Tom Bombadil » Mon Feb 19, 2018 7:31 pm

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.
2

Deeply_Dippy
Posts: 83
Joined: Sun Dec 31, 2017 4:19 pm
Location: Britannia's First City
Karma: 64
Contact:

Re: Introducing Country Weighting

#19 Post by Deeply_Dippy » Mon Feb 19, 2018 9:00 pm

Well said, sah!

Durga
Posts: 9486
Joined: Fri Sep 29, 2017 6:01 pm
Location: Canada
Karma: 5120
Contact:

Re: Introducing Country Weighting

#20 Post by Durga » Mon Feb 19, 2018 9:17 pm

Yeah, I'm sick of having 20 games as France when I fucking hate France.

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests