taterchimp's c-blog
Fronts 3Posts 2303Blogs 129Following 0Followers 55

# Raging Chart On: A Tale of Two Swords

0
So a while ago, I was browsing some site on the internet, probably pornagrophy of some sort.  I guess I must have become side tracked, because I encountered a hypothetical videogame situation:  after slaying 1000 hyperdemons, you have been given a choice of rewards.  You can either select the Red Sword, or the Blue Sword.  The red and blue sword both deal the same amount of damage, but here is the catch:  the Red sword hits 100% of the time, Blue hits 50% of the time but can attack twice as often.  Which sword do you take, and why?

Oh sweet Jesus, normal distribution.

This is where things get amazing!  Because bell curves have already been analyzed to death, I don’t have to do any dirty work, and can just spit out numbers from any statistics textbook and/or website!  The average for this curve, based off 100 coin flips, is going to be at the center with a value of 50.  The chart can be broken down by standard deviations to figure out what percent of the area is made up by what values.  If we know the standard deviation of the data, we can figure out how much area is under each section of the curve, and so, how unlikely it would be to see that value come up.  As it turns out, for 100 random trials the standard deviation would be somewhere in the ballpark of 5. For the first 5 in either direction from the median, we cover 34% of the area under the curve, because math.  Neat stuff, right? (You can say no...I don't mind...but I think its neat)

So how does this affect our two swords?  Well, it means that there is only a 32% chance for us to be outside of 1 standard deviation of hits, so either above 55 and below 45.  It also means that there is only a .26% chance of being outside of the 45 to 65 range.  In fact, out of 10,000 simulated trials done in excel, only 360 were outside of +/- 10 from the average, as we would expect with the math.

So with that somewhat explained, how does it apply to the situation at hand?  First, you would need to know how many rounds you have against each monster, and how much health they have.  Then, you have to figure out your level of risk.  So assuming that we are only fighting monsters that kill us at exactly at our previously selected arbitrary limit of 100 turns.  If they have 500 health, in the long run, it doesn’t matter which sword we pick... but half the time, we will probably die.  Not looking great for the blue sword.  It can take out enemies with 45 health 85% of the time, though, but that is nothing compared to Red’s 100% win rate!

...but what happens if a monster has 505 health?  Red’s win rate drops to 0%, while Blue’s is just barely under 50 percent.  Suddenly, we made up a ton of ground.  Or if we have to deal the same damage within a shorter time limit?  Again, Red suddenly has no choice but to resign to never beat the game without better gear, whereas Blue can suddenly begin to shine.  In fact, if we had infinite time, we could kill a monster that has a full 1000 health!  It would be like winning the lottery while getting eaten by a rabid shark that was just struck by lightning, but theoretically...it could happen!

Maybe just as likely as seeing this exact arrangement of cards

Now, you won’t always get 100 rounds against your opponent, which affects some of these numbers.  As the number of rounds increase, the effect of the variance decreases thanks to the Law of Large Numbers.  This means that as the number of turns decrease, the variability is more pronounced. So lets look at what happens with ten turns instead of 100.  The average damage is still where we would expect it to be at 5, but the standard deviation changes to be 1.5.  This means that our 68% is now within 3.5 to 6.5, and our .26% is now at .5 to 9.5.  Suddenly, it doesn’t look like quite the best option yet.

Now here is one final thing to consider about the two swords, and is something that I have yet to mentally reconcile, to be honest.  If you have 2 attacks at 50% to hit, the expected result would be that, on average, 1 attack hits each time.  But consider this:  each turn has 4 possible outcomes, each with equal odds of happening:  both miss, only the first hits, only the second hits, or both hits.  3 of the 4 outcomes are equal to or better than the Red sword, so you have 3:1 odds of Blue being the same or better!

But ultimately, math cannot make this decision.  In the end, you have to go with your gut as to what ‘feels’ the best, and a lot is to be said for the context.  However, I hope that this has helped in your consideration when encountering similar scenarios.  Or at least you’ll have an ethos.

taterchimp

### About taterchimpone of us since 6:01 PM on 06.06.2008

My Belmont Run for Dark Souls can be seen

HERE
HERE
HERE
HERE
AND HERE

I also did a blind run of the DLC, which you can view

Here
Here
And here

I also covered the progress of building my own gaming PC. I had no experience, and overall, it wasn't all bad! If you are on the fence about it, I suggest you read about my efforts

Here
And here

The series never had a part 3, because I was having waaaaay too much fun playing it. Suffice to say that it does alright these days.

Thanks for stopping by my blawg!
 Xbox LIVE: Taterchimp

Featured

Posts

Blogs

Support