Help - Search - Members - Calendar
Full Version: TN Success Chances
Dumpshock Forums > Discussion > Shadowrun
Ranneko
After reading through http://forums.dumpshock.com/index.php?showtopic=7319 and more specifically that the inability to easily determine the chances for success in a given test, I was inspired to do a little coding.

So I made this simple program, text only interface, admittedly, but I think that it is fairly easy to use, it will give you the chance of getting a given number of successes, on a given TN, with a given number of dice. It also will if you desire, give you either the chance of getting at least that number of successes, or at most that number of successes.

It can be found at http://www.ug.cs.usyd.edu.au/~adel3746/Sha...wrun/TNChance.c

You will need a c compiler to compile and then use it.
It is mostly intended for use by GMs, but hey, I can't stop players from using it.

Hopefully it will come in handy.
Da9iel
Is it like this?
Tarantula
Would you mind just putting up a compiled version of the code? I think you'd get a much better reception with that little effort on the part of the person using your cool little prog.
Veracusse
Ditto;

Not all of us are CS majors, and I have a hell of a time trying to compile c-code on my own. But I would like to try your version, and Da9iel version is good too.

Veracusse
Charon
Just use Excel and you can quickly determine odds.

Set up rows and column indicating number of dice and number of successes, set up a space to indicate TN and reference all that appropriately using the binomial function and voilą.

It's should be easy. Now, that Qbasics program, that's chinese to me! wobble.gif
Charon
0 1 2 3 4
1 83.33% 16.67% #NOMBRE! #NOMBRE! #NOMBRE!
2 69.44% 27.78% 2.78% #NOMBRE! #NOMBRE!
3 57.87% 34.72% 6.94% 0.46% #NOMBRE!
4 48.23% 38.58% 11.57% 1.54% 0.08%
5 40.19% 40.19% 16.08% 3.22% 0.32%
6 33.49% 40.19% 20.09% 5.36% 0.80%
7 27.91% 39.07% 23.44% 7.81% 1.56%
8 23.26% 37.21% 26.05% 10.42% 2.60%
9 19.38% 34.89% 27.91% 13.02% 3.91%
10 16.15% 32.30% 29.07% 15.50% 5.43%
11 13.46% 29.61% 29.61% 17.77% 7.11%
12 11.22% 26.92% 29.61% 19.74% 8.88%

This is with a TN of 6, number of dice rolled left and successes on top. You could set a board to show cumulative odds instead (i.e. the odds of scoring 2 successes or more with 6 dice)

That's an example of what you can get in mere minutes. Do the function once, lock the variables correctly and you can copy paste for the whole board. Reference the probability to a specific space and you can change the whole board by adjusting the TN. It's a snap. It took me the 11 minutes you see between my two posts to get it right, including the time required to write these lines. It only took me more than 2 minutes because I'm not that good at conceptualizing and screwed up a bit while setting up variables.

EDIT : Well, it doesn't show up as well as on Excel, so use your imagination. wink.gif
Tarantula
1 die, vs TN 6, for 1 success = 1/6th probabilty. This = 16.6666666666 percent chance of getting a 6. You're flawed charon.

Edit: Unless your chart just sucks... heh.

CODE

  0      1      2        3         4
1 83.33% 16.67% #NOMBRE! #NOMBRE! #NOMBRE!
2 69.44% 27.78% 2.78% #NOMBRE! #NOMBRE!
3 57.87% 34.72% 6.94% 0.46% #NOMBRE!
4 48.23% 38.58% 11.57% 1.54% 0.08%
5 40.19% 40.19% 16.08% 3.22% 0.32%
6 33.49% 40.19% 20.09% 5.36% 0.80%
7 27.91% 39.07% 23.44% 7.81% 1.56%
8 23.26% 37.21% 26.05% 10.42% 2.60%
9 19.38% 34.89% 27.91% 13.02% 3.91%
10 16.15% 32.30% 29.07% 15.50% 5.43%
11 13.46% 29.61% 29.61% 17.77% 7.11%
12 11.22% 26.92% 29.61% 19.74% 8.88%
Tarantula
However, using Rann's program, I can duplicate you chart, as well as make other charts for other TNs. I sent him my modified code (made it C++ instead of C), and I'll wait for him to get back to me on posting the source and/or an executable.
Charon
QUOTE (Tarantula @ Mar 1 2005, 02:13 AM)
You're flawed charon.

Edit: Unless your chart just sucks... heh.

Hey, *I* am not flawed. I am god's perfect creature. biggrin.gif

Yeah, using code gives a cleaner look, doesn't it. looks good on Excel, it's all I want from it. I can make other charts for other TN too. I just change the TN and tadaa, everything adjust automatically.

Now, OTOH, how do I use Rann's program? I'm not even sure what I'm supposed to use to run it. ohplease.gif
Tarantula
After I get home from work today, I'll drop an exe of his program I made for everyone. I ended up converting his code to C++ (as thats what I code in) and compiling it that way into a nice, quick and easy executable. It asks for the TN, # of dice, # of wanted successes, and then what sort of probability you want. At least # of successes, at most # of successes, or exactly # of successes. I have a modified one that just shows all three, removing a prompt.
mmu1
QUOTE (Charon)
0This is with a TN of 6, number of dice rolled left and successes on top. You could set a board to show cumulative odds instead (i.e. the odds of scoring 2 successes or more with 6 dice)


Am I reading this wrong, or does this chart actually indicate that chances of success start dropping once you start using more than 6 dice? indifferent.gif

Something is seriously wrong with this thing...
Tarantula
Chance of 0 succeses, or of failing drops with more dice, chance of 1 success rises. First column is 0 succesess a.k.a. failing.
Kagetenshi
Don't suppose we could get a manpage off of you? This one's going in the $PATH.

~J
GrinderTheTroll
QUOTE (Tarantula)
Would you mind just putting up a compiled version of the code? I think you'd get a much better reception with that little effort on the part of the person using your cool little prog.

It's justified paranoia.

Many people won't "just download" some executable code, who really knows what it does? Alot of forums will chastise you for not posting source code so the user can compile and run on their own.

That's why I run the "VBA" disclaimer when I posted my stuff, macros and malicious code can really run your day. dead.gif
mmu1
QUOTE (Tarantula)
Chance of 0 succeses, or of failing drops with more dice, chance of 1 success rises. First column is 0 succesess a.k.a. failing.

So why does the chance of success in column 2 (chance of one success) start to drop off when you're using more than 6 dice? And why is the chance for getting one success on 5 dice listed the same as on 6 dice? (which value is, BTW, the wrong for both 5 and 6 dice - they should be at around 60 and 67% respectively, unless I'm way off somewhere).
Charon
QUOTE (mmu1)
So why does the chance of success in column 2 (chance of one success) start to drop off when you're using more than 6 dice?


Chances of only one success eventually drops. Odds are you will score more than one successes past a certain point.

The binomial gives you the exact odds for a precise number of successes and that little chart was a essentially a distribution of odds. Add all the odds of one row and it equals 1 (100%).

While wasting time away, I made it cumulative instead, so that you get the odds of scoring X amount of successes or more. It's more useful.

CODE

Failure 1+ 2+ 3+ 4+ 5+ 6+
1 66.67% 33.33%    
2 44.44% 55.56% 11.11%    
3 29.63% 70.37% 25.93% 3.70%  
4 19.75% 80.25% 40.74% 11.11% 1.23%  
5 13.17% 86.83% 53.91% 20.99% 4.53% 0.41%
6 8.78% 91.22% 64.88% 31.96% 10.01% 1.78% 0.14%


That's for TN 5.

EDIT : man, there's no way to get those damn columns to line up, is there?

Anyway, on that chart you could read that the odds with TN 5 and six dice are that you'll get at least 2 successes 64.88% of the the time as opposed to 32.92% odds of getting exactly 2 successes. You wil fail altogether 8.78% of the time.

On the first chart I made, you would have read the odds of getting an exact number of successes, not X+ successes. Understand?
Tarantula
Yes, and this program gives you the odds for all of that, its nice. I can do TN(200) with 1000 dice if I felt like it, and get the odds for all of that, at once, in one quick and easy thing.
Charon
QUOTE (Tarantula @ Mar 1 2005, 03:27 PM)
Yes, and this program gives you the odds for all of that, its nice.  I can do TN(200) with 1000 dice if I felt like it, and get the odds for all of that, at once, in one quick and easy thing.

Well, good. I'm eager to see it work.

But I can roughly tell you the odds of getting any successes on a TN of 200 with 2000 dice right now ; approximately zero. wink.gif
GrinderTheTroll
How do you plan on using this in SR other than being able to tell you runners (with conviction) they have no chance in hell, LOL.
Charon
It's only really useful for planning a mission.

Like, how likely is the Shaman to banish that spirit or the infiltrator to break that security? How will that affect the likley flow of events? That sort of thing. Also, PC might like to tinker a bit with that kind of tool to have a better idea of what they can or can't do.

Obviously, I only just drew up my chart generator. I was getting by fine without it for years. If you have a good handle on statistics, you don't really need that kind of tools but if you are math challenged it can help.

GM looking up these numbers have to remember they'll use karma pool, though. A TN 12 with with 10 dice is likely only 24.55% likely to succeed... unless the PC is willing to use 3 karma pool to reroll thrice. Then you are I think 57.05% likely to succeed. Big difference. Most people graps that intuitively, though.
Tarantula
I have an executable compiled from the code, I sent it to Rann and I'm hoping he can mirror it.
Ranneko
I have been busy of late, I will upload the code and the executable this afternoon.
Kagetenshi
Incidentally, what is this licensed under? I'm going to tweak some things for my own use, but I've got a PPC7450-optimized copy that I'd be glad to send people if it's permittable and desired.

~J
Ranneko
Hmm, consider it to be under a copyleft. You can modify it and the like, but just please acknowledge me and anyone else who originally modified the code you then tweaked and modified.

And alas, I am not going to get the time to do the upload tonight, perhaps in a less busy section of O-week tomorrow.
Pinel
Since the last computer I was able to program was a Commodore 64 (LOGO - now that was a language), I recently prepared a set of Excel tables to print so that my players can resolve tests of 4 to 15 dice (TNs 2 to 19) using 1d000 (actually a probability table using 1d000,000 but the first 3 dice are enough for 99% of the rolls). I figure it will speed up group combat a bit and extend the lifespan of our gaming table...

I'll happily send the Excel file (340Kb) to anyone interested, as long as you don't mind the few French column titles ! beret.gif
torzzzzz
yes please!

torz x
Toshiaki
QUOTE (Pinel @ Mar 2 2005, 12:14 PM)
Since the last computer I was able to program was a Commodore 64

Glad to see I'm not the only one with fond memories of that old thing. wobble.gif
Ranneko
I have uploaded the c++ code and the .exe that tarantula gave me, and a couple of other things. Just look in http://www.ug.it.usyd.edu.au/~adel3746/Shadowrun
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Dumpshock Forums © 2001-2012