Page 1 of 1

Country choice question

Posted: Mon Feb 17, 2025 5:37 pm
by DiploValencia
Hello everyone,

I’ve tried searching for an answer to this question but haven’t found it. I’m in my first game on this site and I have started a game that is waiting for players. I’m wondering how players choose countries to play or is it all random? I was the last player, I think, in the game that is started and I am Italy. Not a popular country, but I thought I got it by virtue of being last to join. But then when I started the game, I didn’t see any place I could indicar a country preference. Did I just miss it or is it just rando or do I need to do something else?

Thank you in advance,

D.C. Robeline

Re: Country choice question

Posted: Mon Feb 17, 2025 5:45 pm
by echidna
Welcome! It's random.

Re: Country choice question

Posted: Sun Feb 23, 2025 7:35 am
by kestasjk
If you're interested in the specifics (and how could you not be?) it isn't totally random, as people used to complain that there's no way they could be randomly getting the same country again and again.

To make it seem more random, and give people a better chance of more variety, the system gives you a chance/weight for being each country (which is 1/7 when you first join), then when you get allocated a country your chance/weight of being that country is (if memory serves) halved.
Next time you have a lower chance of being that country you were assigned last.

So it's still random, but it tries to make it seem more random by giving you a higher chance of being countries you haven't played as much.

Re: Country choice question

Posted: Sun Mar 09, 2025 6:27 am
by echidna
Thank you kestasjk for the correction to my mis-statement. I believe I found the WedDip code that allocates players to countries, at https://github.com/kestasjk/webDiplomacy/blob/master/gamemaster/adjudicator/pregame.php
What I think it does is as follows:
It calculates the "weight" of an assignment of players to countries by summing, for each player, the number of times that player has played their assigned country before in the same kind of game.
Of all the possible assignments of players to countries, it finds the assignment that minimizes its sum of weights.
(If there are several assignments with minimum sum, one of those is chosen, presumably at random).
The code implements something called the "Hungarian algorithm" to do this.
I have not found the code for replacement players to see whether taking over a country as a replacement player adds to that player's country counts.

Re: Country choice question

Posted: Sun Mar 09, 2025 12:17 pm
by learnedSloth
echidna wrote:
Sun Mar 09, 2025 6:27 am
I have not found the code for replacement players to see whether taking over a country as a replacement player adds to that player's country counts.
Chances are that it doesn't, and not only because forgetting it doesn't make a notable difference. Taking over countries is voluntary so not counting them is a reasonable design choice.