Last week, I started a discussion about a problem a client had with unique IDs generated by random numbers. They expected some collision, but the expected benefits of scalability outweighed the rare conflicts which would be lost in the insignificant digits of their analytics. In practice, the collisions were much more frequent and polluting their data. They needed to know why.
Having convinced the engineers and engineering managers about the underlying mathematics, they were actually pleased to see that their intuition about a very large random number (256 bits!) was a good solution. In fact, the chances of conflict was much lower than they expected. As they continued digging through the data, however, they found more and more evidence of duplication that they could not explain.
The millions of users coming in as flash crowds were real. The next thing to look at was the size of the random number.
Generally speaking, humans beings have a poor intuitive sense for randomness. That poor intuition is exploited all the time in gambling, games, markets, and business. Here’s a personal experience I had where the difference between random numbers and pseudo-random numbers made all the difference.
Zugzwang is a great word for people who like games, particularly competitive strategy games. German for “compulsion to move”, a player in zugzwang is forced to make a move even there is no good move to make; no move at all would be a better alternative, but because of game rules they are compelled to do something. The word appears in chess literature in the mid 1800’s and in English by 1905. There is a formal definition of this term from a branch of mathematics called combinatorial game theory, but the practical definition is what I will focus on here. In this post, I will take other concepts from game theory and apply them in a practical way to analyze a classic game and make it better (more fun, more exciting, etc.). In particular, I made Floating Four to address a zugzwang problem with its predecessor. Continue reading “Got Zugzwang? – The Inspiration for Floating Four”