Following on from recent posts on the “XCOM” game (here and here), I wanted to write about people’s perception of probability. A huge amount of posts on XCOM are from people accusing the random number generator of being broken. A few are not realising that the numbers are partly deterministic, but others accuse the probabilities of being plain broken. While I can believe there are one or two bugs, it’s not hard to make sure that the actual odds match with the displayed odds. Instead, it’s likely that there is a huge dose of confirmation bias, where players remember shots that go against them. But there’s also other problems to do with probability, randomness, and people’s conception of them, which is what this post is about.
The Dice Have No Memory
One famous problem with probability versus people’s expectations is known as the gambler’s fallacy. A simple phrase to sum it up is “the dice have no memory”. If you have a fair six-sided die, and you roll four sixes in a row, the chance of getting a fifth six is… one in six. It’s no more likely (the streak continuing) or less likely (some sort of cosmic balance) than at any other time. But people do tend to believe that streaks shouldn’t happen in random events, or should be somehow balanced out by a reverse streak.
I think that part of the problem is that we tend to look at odds from a historical perspective, not based on our current knowledge. The chances of getting five sixes in a row is slim (), but once you’ve observed four sixes, the chance is down to one in six. However, we keep thinking of how unlikely it would have been at the start — that doesn’t matter now! What’s happened has happened, and in the case of independent events, it has no bearing on the future.
The wikipedia article mentions a famous case in Monte Carlo where a roulette wheel turned up black 26 times in a row. Lots of people lost money betting red during the streak, reasoning that red must come up soon. But red was no more likely than at any other time, so they lost their money while the streak continued. (The story is an example of confirmation bias, the event was partly reported because the black streak went on so long, but roulette is played all over the world every day without this streak happening, so we only collectively make note of a long streak.)
This has implications for playing a game like XCOM. Let’s say you have an alien in sight, with soldiers lined up to shoot it: one with 85%, one with 75% and one with 65% chance. The alien is dead, surely! You shoot with the 85% first, and miss. You shoot with the 75%, and also miss. So you line up the 65% — it must hit, right? The chances of all three shots missing was — about 1%. So I think many people choose to take that final 65% shot, effectively thinking that it must have a 99% chance to hit. But it doesn’t: it has a 65% chance to hit! What has already happened doesn’t matter: the events are independent, so by now you only have exactly a 65% chance to hit.
Shuffle The Deck
This problem of streaks and randomness cropped up in software design a few years ago. People complained that their iPod shuffle algorithm was not random enough: they were getting streaks of songs by the same artist, or somehow related songs. Steve Jobs said Apple would change the algorithm: “We’re making it less random to make it feel more random.” The problem is that the human brain is an amazing pattern recognition system. It can find patterns incredibly well, but also finds patterns when sometimes there are none. Presented with a stream of random numbers, the brain can probably pick out a pattern. So what people usually mean by “I want it to be random” is actually “I want there to be no discernible patterns” — different thing!
One way to “fix” a game like XCOM to aggravate the users less would be to alter the random number generator algorithm, to remove streaks of high numbers (or of low numbers). Technically, this makes it less random, and removes the independence of events. The advantage is that players would feel happier that the game wasn’t out to kill their soldiers — but the disadvantage is that players could start gaming the system. If you hit three unlikely shots in a row, you could know that the next shot is becoming likely to miss, and act accordingly. Much like the save-scumming strategies, a deviation from truly random events is an invitation to play the system. Plus, as soon as you actually deviated from truly random numbers, investigative players would decry the broken random numbers. Players want to win, but they want to win against a fair challenge. And no-one suspects foul play more than an aggrieved player.
Make It Explicit
Rather than fiddle the random number generator in the background, you could build anti-streak protection into the game mechanics. You could introduce a bonus into the game, called something like “Justice” or “Concentration” or “Determination”. Whenever any soldier misses a 90%+ hit, the next soldier to shoot receives a 10% bonus to hit. Miss two 90% shots in a row, and the third soldier gets the cumulative bonus of 20% (and so on). This protects against streaks of bad shots (by altering the probability of subsequent hits during a bad streak), and softens the blow of a high-probability miss. (It’s not even totally unrealistic: a team taking consecutive shots at an alien are probably not independent.)
Obviously, you would need to reduce your overall chance of hitting slightly to balance out this bonus, but it could make the players happier, while keeping the probabilities explicit and completely accurate. I wonder if there is some more mileage in this idea of using game design to balance out people’s flawed cognition — I can’t immediately think of any existing examples, but feel free to comment below if you know of tricks like this.
I also wonder about altering probabilities in cases like RPG collection quests. In games like World of Warcraft, or Borderlands, you are often given a quest to collect 10 of a particular item, like a hyena pelt. So you head out to the hyena grounds and start killing them. If every hyena dropped a pelt, you’d know exactly how long the quest would take: for 100 pelts, you’d need 100 hyenas. The games don’t tend to do this, perhaps to introduce variability into how long the quest would take, so instead they get you to collect 10 pelts, but each hyena has a probability to drop a pelt when you kill it: say, 0.1.
This is another kind of probability in a game that just frustrates players. The last pelt never seems to drop (confirmation bias again), and people get annoyed at not knowing how long the quest might take. The variance in how long it takes to complete the quest is worse for collecting fewer rare items than greater common items. If you want to collect one magic gem that drops every hundred beasts, you have about a 13% chance of still being there after killing two hundred beasts. And here’s the thing: after you’ve killed 200 beasts without a gem, your chance of getting one on the next beast is still 1 in 100!
If I was a game designer, I’d not make this a random drop with independent probability for each beast. Rather, pick a maximum number of beasts that you want the player to have to kill, say 150. At worst, the gem will drop on the 150th beast. You don’t want the gem to drop on the very first beast — you want the player to have a challenge. So you maybe pick a number between 50 and 150, and upon killing that many beasts, the magic gem will drop. Still random in a sense, but not as frustratingly random as a series of independent drop chances. We should be able to make less frustrating games through more careful use of probability.