Lizzie Allan Miller said:
Here’s a simple experiment one can actually try. Take a bag of M&M’s, and without peeking reach in and grab one. Eat it. Then grab another and return it to the bag with another one, from a separate bag, of the same colour. Give it a shake. I guarantee (and if you tell me how big your bag is I’ll have a bet on how long it’ll take) that your bag will end up containing only one colour. Every time. I can’t tell you which colour it will be, but fixation will happen.
I’ve written an interactive browser based version you can explore this idea with.
You can change the bag size, number of colors, speed of each round and graph the results, as well as see in real time the number of each color that remains and watch the end-game in detail.
You start with a bag size of 1950, containing 150 colors. Click reset to rerun the simulation with the same parameters, or change them and it automatically restarts with the new parameters.
You’ll probably need a relatively up to date browser.
Some explanations, from top to bottom. But just go press the buttons, that’ll make more sense 🙂
Unique Color # is the number of colors that remain in the bag. This updates in real time.
The trial number is how many times we’ve reached into the bag, ate one, picked one and replaced two.
The generation is the number of trials divided by the bag size. Fairly arbitrary.
The two squares show, on the left, a representation of the bag. Items are removed and inserted at random places. On the right are the colors in the bag and superimposed on them are the numbers of those colors in the bag.
You can resume, pause and reset the simulation. Reset uses the current values and generates a new random bag.
Warp factor is how many trials are run between each update of the screen. The default is one, so “real time”. Increase and decrease that with the buttons as you like.
Bag size is the bag size you ended up with after some constraints relating to number of colors were satisfied (if you want equal numbers of colors the bag size has to be a multiple of that). There may be some faulty logic here!
The number of colors is, well, the number of colors you’ve set to be in the bag. It’s actually the range of possible colors that the bag can choose from so sometimes you might end up with fewer in the bag at the start of a round then you set in the “unequal number of colors mode”. But bigger bags will of course usually use up all possible colors. And equal color mode (the default) always starts with all colors in the bag.
You can change the size of the bag, subject to some lower limits (e.g. the number of colors) and the number of colors can also be changed, up to 350 currently.
Clicking “change color start distribution” sets either equal numbers of colors at the start of the round (so no one color will obviously ‘win’ due to a starting advantage) and random numbers of each color at the start. The default is to have equal numbers.
You may find some weirdness with very large bag sizes.
Finally the graph shows a count of colors over time, if you change the warp factor the timing of the graph does not update accordingly however (I had to finish this up!). So change the warp speed then click reset and the graph will be ok for that round.
I’ll add a “add a single black one” button in the next couple of days, but in the meanwhile just pick a color and root for that!
So I hope this is useful/interesting/whatever, and if you have feature requests, bugs, questions or ideas for further such toys please feel free to note them as a comment in this thread.
Please keep comments regarding the original discussion etc to the relevant threads, not this one.