Thursday, March 6, 2008

Probability in DotA?!?!

Yes, you may have known that Mr Guay is currently a little into the game of DotA. And here are some interesting items in DotA that poses some mathematical questions!

There is an item in the game called Vanguard. Here are the details, taken from DotaPortal:

Vanguard



Description:+5 HP regen/second
+250 Hit Points
65% to block 40 damage

What's interesting is that the amount of damage it blocks is actually a probability! Now...what if you have 2 Vanguards? What is the effect? Some choices:

a) 65% chance to block 80 damage
b) No additional effect i.e. same as having one Vanguard. Which means you just wasted valuable gold!
c) 65%+65%=125% (or rather 100%, since probability can not exceed 100%) to block 40 damage. This means that you get a permanent block of 40 damage.
d) The 2 Vanguards are mutally independent, and hence we need to recalculate the probability.
e) I don't care cos games and maths don't mix! Stop spoiling it!

use your mouse and highlight the space below for answer....

Although Mr Guay can't be 100% sure as he is not the games programmer, it will most likely be (d). So to calculate the probabilty, we can do the direct method, i.e.

P(both Vanguard activating) + P(1 Vanguard activating and the other not)
= (0.65 x 0.65)+[(0.65x0.35)+(0.35x0.65)]
= 0.8775
= 87.75%

Or indirectly,
1 - P(both Vanguards not activating)
= 1 - (0.35x0.35)
= 0.8775
= 87.75%

So, when we buy 2 Vanguards, we increase the probability from 65% to 87.75% of blocking 40 damage. Pls note that Mr Guay is not sure how much damage 2 Vanguards will block when both activate but my guess is only a block of 40 damage instead of 80 damage.

That's all well and good but in the game, the amt of gold is quite limited. There is another item which is one of the material used to make a Vanguard and has similiar properties. Let's compare them and their price:

Vanguard ($2275)



65% to block 40 damage

Stout Shield ($300)



30% to block 30 damage



So which is more worthwhile? How many Stout Shields do we need to buy to obtain the same probability of damage reduction of 1 Vanguard? I know the amt of damage reduction is lesser but disregard that for now. Also disregard the additional porperties Vanguard gives you such as HP regeneration, as we're only concern about blocking damages.

use your mouse and highlight the space below for answer....

Probability of shield NOT activating = 1 - 0.3 = 0.7 (or 70%)

P(2 stout shields)
= 1 - P(both shields do not activate)
= 1 - (0.7 x 0.7)
= 0.51
= 51%

P(3 stout shields)
= 1 - P(3 shields all do not activate)
= 1 - P(0.7 x 0.7 x 0.7)
= 0.657
=65.7%

Hence, with 3 Stout Shields we can have the same blocking probability as a Vanguard, but 3 Shields only cost $900! Something to think about....


There are some other items in DotA that deals with probability, such as Butterfly, Basher, Buriza etc. Have fun!

1 comment:

Anonymous said...

Thanks for the explanation. I was having trouble getting my head around how Cranium Bashers stack.