## Probability in Games: XCOM

31 Oct 2012

The dash-missing XCOM: Enemy Unknown is the subject of a new editorial on The Sinepost regarding the game's usage of probability to determine combat success and the design process that likely went into each decision. Math ahead:
Each turn, each soldier has two actions, one of which can be to shoot at an alien. Thereâ€™s all sorts of other abilities that override this simple rule, but thatâ€™s the basic rule: at most, one shot per turn. When you go to shoot, the game tells you the exact probability of your shot connecting:

Your shot either hits or it doesnâ€™t, and then damage is randomly calculated thereafter. But the key thing is whether the shot connects. Waste your chances with 25% shots, and youâ€™ll soon get overpowered. Itâ€™s better to maneuver around, destroy the aliensâ€™ cover, and then shoot with an 85% chance. And when it misses, you can exclaim stupid things like â€œMy 85% shot missed! Whatâ€™s the chances of that!â€ (Spoiler: 15%).

The turn-based game is a mixture of moving carefully to cover, and managing your odds. Different soldiers may have different odds of hitting the same alien, so you choose who to take which shot on which alien in which order to maximise your chances of success. Effectively, youâ€™re navigating a probability tree, and the skill is in finding the optimal path. Of course, itâ€™s all still random, so even your best strategy can go horribly awry: when your 95% shot misses, and your backup 85% shot misses, you feel slightly aggrieved (exercise for the reader: whatâ€™s the chances of that, eh?)
Â
Â