Saturday, July 21, 2012

EV for Hardcore Gamers

EV (statistical Expected Value) is very much practical for hardcore video gaming. I've always been a big video game buff, and lately it's been Dungeons & Dragons Online. With every battle, the player deals out damage, and takes some too. Of course to win battles on average, a +EV damage dealt/received must be achieved; and maximizing these values is where the math/fun lies.



Examples:
 
A Bastard Sword has a base damage die of 1d10 (10 sided die), and has a 1/20 chance of landing a critical attack for 2x damage. Assuming the dies are fair, the expected base damage is then:

[5.5 * 19 + 11 * 1] / 20 = 5.775/ swing of Bastard Sword

A Khopesh has a base damage die of 1d8 (8 sided die), and has a 1/20 chance of landing a critical attack for 3x damage. Assuming the dies are fair, the expected base damage is then: 

[4.5 * 19 + 4.5 * 3 * 1] / 20 = 4.95 / swing of Khopesh

So based on the minimum damage, the average player would assume that the Bastard is superior than the Khopesh over all. That is not so, the Khopesh is the most powerful single handed melee weapon in the game.

Due to the various damage bonuses, the seasoned player could significantly increase the Khopesh DPS (Damage Per Second) as its critical damage grows at a significantly faster rate than the Bastard Sword. So let's find the damage threshold where the Khopesh becomes superior than the Bastard Sword.

let x = damage bonus per swing of weapon


(5.5 + x)19 + (5.5 + x)2 = (4.5 + x)19 + (4.5 + x)3
     104.5 + 19x + 11 + 2x = 85.5 + 19x + 13.5 + 3x
     16.5 = x

The above is relatively simple to achieve in the game. So there's math for gaming.





0 Reflections: