Preferred color not chosen

Discussions about BGA (all languages)
Forum rules
Warning: challenging a moderation in Forum = 10 days ban
More info & details about how to challenge a moderation: viewtopic.php?p=119756
TheOtherJason
Posts: 8
Joined: 08 May 2020, 01:08

Preferred color not chosen

Post by TheOtherJason »

Something wonky is happening with preferred color choices. In this game:
https://boardgamearena.com/gamereview?table=148655241
It says: "The colors of Chuck Dice, Earl of Essence, dhc3po, TheOtherJason have been chosen according to their preferences." Change my preferences.
But it chose orange for me and red for Earl of Essense. My #1 color is red and #3 is orange (Edit: actually, yellow). I had Earle of Essence check and orange was near the bottom of his preferences (Edit: I don't think he was right on his memory of this, probably due to colorblindness). Yet the next game we played (with all the same player and with the exact same colors), it picked properly.

I paid for premium mainly because I wanted to support the site. But the #1 feature I thought was appreciated was the player colors. It played a big part in convincing me to pay. This isn't the first time lately I've seen it not pick my color even though it was available and no one else in my group has it as their #1 preference.
Last edited by TheOtherJason on 24 February 2021, 15:54, edited 1 time in total.
User avatar
Jest Phulin
Posts: 1856
Joined: 08 July 2013, 21:50

Re: Preferred color not chosen

Post by Jest Phulin »

The algorithm for color choice is a bit non-optimal. If PlayerA's preferred color is blue and secondary color is red, while PlayerB's preferred color is red with a secondary color of blue, there is a chance that PlayerA will be assigned red and PlayerB assigned blue. This is especially true if PlayerC had one of them as their primary choice, with any other color as their secondary choice.
TheOtherJason wrote: 18 February 2021, 03:05 But it chose orange for me and red for Earl of Essense. My #1 color is red and #3 is orange.
Your preferred color was in fact chosen. It just wasn't your most preferred color.

I am unsure of how exactly the algorithm works, especially when multiple players have the same primary color choice, but I do know it is not optimized to give the most players their primary color.* If you dig through the suggestions, I think there is one in there for tweaking the code for this, and even for allowing different individuals to see their own color scheme on their own device. (IE, everyone could see themselves as Red on their own screen, but may appear as Blue on one opponent's screen and Green on yet another.)


----
*Absolute pure conjecture on how it works is that, starting with player 1, the system checks if the player is Premium. If so, it assigns color preference 1. Then, for the next premium player, it sees if the primary color is already assigned. If so, it moves to the secondary. This keeps happening until either all supported colors have been assigned, or until the list of preferred colors are exhausted.
MoiMagnus
Posts: 356
Joined: 17 March 2020, 20:15

Re: Preferred color not chosen

Post by MoiMagnus »

The text says you in which order colours got given.
"The colors of Chuck Dice, Earl of Essence, dhc3po, TheOtherJason have been chosen according to their preferences."
Means that you got the last pick for this game, and red was already chosen, so you were given Yellow (it looks slightly Orange, but I think that's the Yellow color). If Earl had Red above Yellow and Green, that's the expected behaviour. You said that Earl had Orange, chances that in games where Orange is not available, BGA randomly select Red or Yellow as a substitute for Orange (pure speculation from me).

And if you look at your second table with the same player, notice that the text was:
"The colors of TheOtherJason, Chuck Dice, dhc3po, Earl of Essence have been chosen according to their preferences."
So you got the first pick for this game, hence got Red.
User avatar
mavit
Posts: 36
Joined: 15 September 2016, 20:20

Re: Preferred color not chosen

Post by mavit »

Jest Phulin wrote: 18 February 2021, 04:50 *Absolute pure conjecture on how it works is that, starting with player 1, the system checks if the player is Premium. If so, it assigns color preference 1. Then, for the next premium player, it sees if the primary color is already assigned. If so, it moves to the secondary. This keeps happening until either all supported colors have been assigned, or until the list of preferred colors are exhausted.
A complicating factor is that in preferences you pick from a fixed list of twelve colours, but games define any colours they like. The algorithm must have to make some attempt at working out which is closest.

I think this leads to some odd results. I sometimes get assigned purple, even though it’s not one of my preferences; perhaps the algorithm thinks it is close to grey, even if my eyes do not.
Tokoloshe79
Posts: 30
Joined: 26 May 2020, 01:31

Re: Preferred color not chosen

Post by Tokoloshe79 »

For the record, the game Oh Hell does not respect preferred colour choices at all. Every player gets a random colour.
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: Preferred color not chosen

Post by Tisaac »

Tokoloshe79 wrote: 21 February 2021, 16:56 For the record, the game Oh Hell does not respect preferred colour choices at all. Every player gets a random colour.
Well it is not mandatory to support preferred colors for a game. This is something you have to handle as a dev if you want your game to be compatible
MoiMagnus
Posts: 356
Joined: 17 March 2020, 20:15

Re: Preferred color not chosen

Post by MoiMagnus »

Tisaac wrote: 21 February 2021, 17:04 Well it is not mandatory to support preferred colors for a game.
Indeed. This allows Chess (and other games for which colour have an actual effect on gameplay) to not apply colour preference. That would be quite annoying if BGA forced games like Chess to apply colour preference.
TheOtherJason
Posts: 8
Joined: 08 May 2020, 01:08

Re: Preferred color not chosen

Post by TheOtherJason »

Thanks for all the replies. I went back and asked each person to look at their actual settings. Everyone but Chuck Dice was able to give me what it said (he gave it to me from memory). Earl Of Essense had subsequently changed his, but he was pretty sure of what the previous setting was. Also, though I said "orange" earlier, apparently this is "yellow". It's that "yellow that's so close to orange" I've found people differ on it a bit:
Image

Okay, here are the preferences (with colors underlined that are available in Dragon Petz):

Chuck Dice (?):
  • blue
  • purple
  • yellow
Earl of Essence:
  • white
  • black
  • blue
  • red
dhc3po:
  • green
  • purple
  • yellow
  • white
TheOtherJason:
  • red
  • pink
  • orange
  • yellow
Being a programmer myself, it's an interesting problem. It probably even has a name in computer science but I've forgotten it if I ever knew it.

The question is, is it better to satisfy as many first choices as possible, or to try to at least give someone ONE of the choices in their "preferred" choices? It's hard for me to say exactly what algorithm they used. Was it simply: "For starting player, go from preference 1-4 and pick the first one that is available in the game. Then move on to the next player." Or was it something more complicated than that?

One approach would be "In player order, give as many people their first choice of color." That would assigned Chuck Dice=blue, dhc3po=green, TheOtherJason=red, Earl Of Essense=yellow. This would have given three people the top choice of their colors, but EoE a color that wasn't on his list at all.

This kind of highlights what the point of the list of preferences should be. Do most people care about color if it isn't their first choice? Or maybe first or second choice? Personally, if I can't pick something red or red-ish, I don't care. It's all going to be just as confusing to me. I know some players who have a "anything but ______" color choice. The only way you can get that with BGA is to pick four colors.

One problem is that there are a handful of colors in most games, with some like white, black, purple, etc. only appearing in a few. Thus someone who put their favorite colors as "white, black, purple, red" would probably get red only when they are starting player (or at least early in turn order) with what seems to be the current algorithm.

I wonder how it handles "None" as a preference. If I choose red, pink, none, none and am first player, and second player chooses blue, purple, white, gray in a game that has blue, yellow, black and orange, will it sometimes give me blue and the second player yellow/black/orange? I could see it doing this if it fully resolves the player colors one player at a time without looking ahead.

Personally, I'd prefer the method that gave as many people their top player color choice rather than one that just gave most people one of their four. I know I've never seen people pick player colors based on turn order in physical board game space. If anything, I'd give preference in reverse turn order. :D
MoiMagnus
Posts: 356
Joined: 17 March 2020, 20:15

Re: Preferred color not chosen

Post by MoiMagnus »

TheOtherJason wrote: 24 February 2021, 17:00Was it simply: "For starting player, go from preference 1-4 and pick the first one that is available in the game. Then move on to the next player."
My experience says that it is, and it works in this case, but I didn't check the code.

Chuck as first player takes Blue (1st pick)
Earl as second player wants Blue (3rd pick), but cannot so takes Red (4th pick)
dhc3po as third player takes Green (1st pick)
Jason as last player wants Red (1st pick), but cannot so takes Yellow (4th pick)

I agree that this is not the best solution, but I guess that's the easiest solution to code.
It probably even has a name in computer science but I've forgotten it if I ever knew it.
It is a variant of the stable marriage problem (https://en.wikipedia.org/wiki/Stable_marriage_problem).
TheOtherJason
Posts: 8
Joined: 08 May 2020, 01:08

Re: Preferred color not chosen

Post by TheOtherJason »

MoiMagnus wrote: 24 February 2021, 18:12I agree that this is not the best solution, but I guess that's the easiest solution to code.
Maybe. There's always possible ins and outs that I'm not forseeing without looking at the code, but I don't think the (different, also non-perfect) solution of a "breadth" before "depth" (slightly abused terms in this context) algorithm is that much harder. You'd just need to keep a list of players who haven't gotten their choice yet, remove everyone who gets their first preference, etc. until there are no preferences left and then you assign them randomly.
It probably even has a name in computer science but I've forgotten it if I ever knew it.
It is a variant of the stable marriage problem (https://en.wikipedia.org/wiki/Stable_marriage_problem).
I could be wrong, but I don't think that's it. That set of problems seem to involve two-way preferencing. In this case it's one-way, in that the colors don't prefer the players.
Locked

Return to “Discussions”