PC   |   SWITCH   |   PS4   |   XBOX   |   SCORPIO   |   3DS   |   VITA   |   VR   |   JP   |   FILM   |   TOYS   |   MOB

Contest: Win a Nintendo Switch from Destructoid
taterchimp
Fronts 2Posts 329Blogs 95Following 12Followers 35

# Raging Chart On: Psuedo Random Distribution

0
I was going to ask a friend of mine if he thought that today’s topic would be interesting, then I remembered that interesting is highly subjective.  Many people couldn’t care less about how and why a game works than if a game is fun or not.  I am not one of those people.  Once I get hooked into a game, I want to get an understanding of each of the systems behind it, and today I decided to indulge that curiosity as it applies to Psuedo Random Distribution, or PRD for short.

So what is PRD?  If you are diagnosed with PRD, how can you still behave like a normal human being?  Many times in games, the game will make a check on whether an attack hits, an effect ‘procs’ (activates or happens...get with the lingo!), you dodge, all sorts of neat stuff.  Now if you were playing a pen and paper game, this would be done with an evenly weighted die, and would be subject to random chance.  If you observed 100 coin flips 100 times, you would see that you expect to have 50 heads and 50 tails, but some of those trials would be 60/40 in either direction.  Given enough observations, you could see it being 30 heads out of 100.  Now consider the effect of this on a highly competitive game - if you have an ability with a 10 percent chance of activating, it can happen 10 times in a row, or it can not happen 29 times in a row.  Why 29 specifically?  Because I have the numbers, of course!  The odds of missing a 10 percent chance 29 times in a row with random distribution are about 5%.  Ouch.  Obviously, either example is going to produce a bad time for someone, and isn’t refined for a competitive environment.

So what can be done?  Remove random chance?  That’s one avenue.  The other is to introduce PRD into your game!  So what exactly is it?  It is any system that replaces a random event with a new system that works similarly to a random event, but has controls build around it, preventing it from being truly random.  Instead it is kind of random. Semi random.  The diet coke of random.  Not quite random enough.

In DOTA (of course) the PRD system has a ‘seed’ value for the odds.  That value is what gets used the first time you attack.  The second time you attack, the seed is added to your current odds.  If the seed was 5%, by 20 attacks, you would be guaranteed to see the ability happen.  So lets get some concrete examples of what the system would do.  If you wanted to emulate a 10 percent chance using this PRD method, you would need a seed of ~1.48%.  By the 68th attack, you are guaranteed to activate the ability - although we will later see that you expect it to happen by the 23rd attack.  Here’s how the math works (I think)....

Your first attack has a 1.48% chance of hitting.  Your second attack has a 2.96% chance of hitting, but that only is relevant 98.52 percent of the time - when you miss the first attack.  Taking the 1.48 plus the 2.96 x 98.52 gives your cumulative odds of the attack procing by that point.  Using the 2.96 x 95.52 x 2 (the second observation) gives what I’m calling the EV for the observation.  When you do this across 68 records, you finally reach a 100% chance to proc, given cumulative percentage of 100% and an EV of 10 - which is what we want for a 1 in 10 chance.  Using this same logic for the random distribution means that we start with 10% instead of 1.28, but do not tick it up each observation, and also we never ever stop.  If you were truly unlucky, you could miss 1,000 times in a row.  But thats in ‘killed by a feral gerbil while being struck by lightning on the way to claim your winning lotto ticket’ territory.  Theoretically possible.  When you take the total EV for the random numbers, you get close to 10 as well, meaning the two systems are just about equal.  Neat, huh?  So what are the major differences?  Lets look at our first chart:

This chart is showing the odds of the ability activating on the Nth hit.  So the random attack has a 10 percent chance to happen on hit one, then a 9 percent chance to be on hit number two - you miss ninety percent of the first hits, then you have a ten percent chance.  If I were to show the chart all the way out, the random distribution would never actually hit zero.  It has an asymptote!   (Ok, you got me, that word is just fun to say).  Because we are messing with the percentages for the PRD, it actually forms a curve instead of just declining.  This curve actually does reach zero by the 68th point, but as I mentioned before, it is practically zero after 36, so I cut off the scale there.

So now that we know what the chart means, what is it telling us?  There are 2 places where the lines intersect, so lets talk about what that means.  Before the first intersection at the 5th observation, Random has a significantly higher chance to proc over PRD.  You are giving up 8% odds on the first attack, which is pretty crazy, actually.  After the 5th observation though, PRD is significantly more likely to proc, up until the 20th attack. After that, random is more likely to activate - however, that is actually not desirable in this case, as you don’t want your 1 in 10 chance ability to hit on the 70th attack.  So basically, the PRD set up makes it so that your attack is more likely to activate between the 5th and 20th attack than it would randomly.  This is enough of a range where it still feels random, but is less likely to happen repeatedly.  Imagine a randomized stun hitting three times in a row!

Now for a different view on the same data:

This chart shows the cumulative chance to proc by the Nth attack (instead of on the Nth attack), and is mostly included because I thought it looked cool.  Here the inflection point is at about the 12th observation.  Up until that point, your odds are actually better of procing the ability with random distribution, but after that, the PRD is better.

Now with all the numbers out of the way, it all becomes a question of philosophy.  From the perspective of a designer, I think it is a really cool idea that makes it so that chance has less to do with the game than it would otherwise.  As a player though?  I don’t think I like it anymore.  It feels like it negates the effect until the item has ‘warmed up’ a bit.  After I see the ability, I know I have a much longer wait than I should to see it again, even though it is for the intention of being fair.

Finally, this is just one method of creating a psuedo random distribution.  The numbers can be changed in pretty much any way that you want to as long as you create a system that has the same EV score.  For instance, 100% of activating on the10th attack would produce the same results, but is obviously less desirable in a competitive scene, as you can prime it with 9 previous attacks.  You could even weight it so it is more likely to happen between attacks 1 through 5, then through attacks 15-20 if you really wanted to.  Is that a good idea?  No.  But its the same outcome, and that’s what really matters.  So what are your thoughts?  Totally lost?  Intrigued?  Angry?  Suspiciously aroused?

### LOOK WHO CAME:

taterchimp
Mike Martin   1
ponderingsloth   1
Old Lion   1

### 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