![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Great Dragon ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Dumpshocked Posts: 5,088 Joined: 3-October 09 From: Kohle, Stahl und Bier Member No.: 17,709 ![]() |
I'm currently trying to calculate the probabilities of successfully hacking a node on the fly, in other words beating the Firewall threshold AND not raising an alarm.
But with the "I roll once, node rolls once" mechanic things get a little more complicated than a simple threshold roll (or maybe I'm too stupid to find an easy formula), so here's the best I came up with: FW = Node's Firewall ST = Hacker's Stealth P(succeeding on the n-th roll) = P(hacker accumulated >=FW hits on the n-th roll) * P(node accumulated <ST hits on the n-th roll) * P(hacker accumulated <FW hits on the n-1-th roll) P(having accumulated >=X hits on the n-th roll) is trivial, just sum up the dice rolled on tests 1 to n and look at the CDF. Total chance of the hacker succeeding is the sum for n=1 to n=(attacker's DP), assuming you use the "-1 dice on each successive test" rule. ------ Am I getting somewhere, or should I just go back to reading probability theory for dummies? |
|
|
![]()
Post
#2
|
|
Moving Target ![]() ![]() Group: Members Posts: 881 Joined: 13-November 11 From: Vienna, Austria Member No.: 43,494 ![]() |
In excel you calculate it using the "BINOMDIST" function, eg. to get 5 or more Hits with 4 dice on turn #1 etc.
=1-BINOMDIST(4;TURN*4;1/3;1) [Calculate 100% minus the chance to get 0-4 hits] BINOMDIST(X;Y;Z;M) X = Number of Hits needed -1 Y = Dice rolled (TURN*DICEPOOL or if you use degrading dicepools the sum of all dice on turn #) Z = Chance to get a hit with one die (1/3) M = Not Cumulated/Cumulated (0/1) -> set to 1 How to calculate both things in one is not that easy ... |
|
|
![]()
Post
#3
|
|
Neophyte Runner ![]() ![]() ![]() ![]() ![]() Group: Validating Posts: 2,492 Joined: 19-April 12 Member No.: 51,818 ![]() |
|
|
|
![]()
Post
#4
|
|
Moving Target ![]() ![]() Group: Dumpshocked Posts: 587 Joined: 27-January 07 From: United States Member No.: 10,812 ![]() |
If you're using excel, couldn't you calculate the chances of the player getting in each round in one column, and the chances of getting caught in a second column?
I think the chance of getting in without getting caught would be something like (chance of getting in)*(1 - chance of getting caught), but I signed up for statistics on 2 hours of sleep and ended up in statics. |
|
|
![]()
Post
#5
|
|
Great Dragon ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Dumpshocked Posts: 5,088 Joined: 3-October 09 From: Kohle, Stahl und Bier Member No.: 17,709 ![]() |
If you're using excel, couldn't you calculate the chances of the player getting in each round in one column, and the chances of getting caught in a second column? I got access to a Matlab license, so stuff like "sum from 1 to n" is relatively easy. The question is just whether I'm conceptually on the right track... QUOTE I think the chance of getting in without getting caught would be something like (chance of getting in)*(1 - chance of getting caught), but I signed up for statistics on 2 hours of sleep and ended up in statics. Problem is that the chance of getting caught depends on how many attempts you need to get in, hence the whole act of breaking it down into what happens on the n-th roll For those interested, here is my ML code so far (nothing fancy, hence it should run on free alternatives like FreeMat or Octave) CODE function probability=matrix_stochastics(dicepool_att,firewall,dicepool_def,stealth)
probability = 0; for i = 1:dicepool_att temp=extendedtest(dicepool_att, firewall, i)*(1-extendedtest(dicepool_def, stealth, i))... * (1-extendedtest(dicepool_att, firewall, i-1)); %numbers go too small? if ~isnan(temp) probability = probability + temp; else break; end end end function probability=extendedtest(dicepool, threshold, max_attempts) if max_attempts > 0 total_dice = sum(dicepool-max_attempts+1 : dicepool); probability = (1-binocdf(threshold-1,total_dice,1/3)); else probability = 0; end end |
|
|
![]()
Post
#6
|
|
Moving Target ![]() ![]() Group: Dumpshocked Posts: 587 Joined: 27-January 07 From: United States Member No.: 10,812 ![]() |
I got access to a Matlab license, so stuff like "sum from 1 to n" is relatively easy. The question is just whether I'm conceptually on the right track... Problem is that the chance of getting caught depends on how many attempts you need to get in, hence the whole act of breaking it down into what happens on the n-th roll Ah Matlab, so using a separate row for each round won't work so well. I did have a math professor trying to teach us how to use it, but he was the only one with a copy. Are the free Matlab alternatives any good, or are they as hopelessly gimped as excel alternatives/excel home version (they took out the data analysis tools out of excel home - like taking punctuation out of word)? |
|
|
![]()
Post
#7
|
|
Target ![]() Group: Members Posts: 6 Joined: 29-November 12 Member No.: 64,892 ![]() |
Ah Matlab, so using a separate row for each round won't work so well. I did have a math professor trying to teach us how to use it, but he was the only one with a copy. Are the free Matlab alternatives any good, or are they as hopelessly gimped as excel alternatives/excel home version (they took out the data analysis tools out of excel home - like taking punctuation out of word)? You can use GNU Octave (Heres the sorceforge site: http://octave.sourceforge.net/ ). It's basically a Matlab clone. And to the authors problem: Do you need just a result? Or do you need an analytical formula? If you only need a result just simulate it and use the "law of great numbers". |
|
|
![]()
Post
#8
|
|
Great Dragon ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Dumpshocked Posts: 5,088 Joined: 3-October 09 From: Kohle, Stahl und Bier Member No.: 17,709 ![]() |
You can use GNU Octave (Heres the sorceforge site: http://octave.sourceforge.net/ ). It's basically a Matlab clone. I can only offer second-hand opinions, but those agree that Octave does a good job. QUOTE And to the authors problem: Do you need just a result? Or do you need an analytical formula? If you only need a result just simulate it and use the "law of great numbers". I want to plot the chances of hacking something OTF depending on attacker's and defender's pool size, Firewall, and Stealth ratings (well, not all four in one plot (IMG:style_emoticons/default/wink.gif) ). So simulating a sufficient number of trials would probably not be very efficient, plus I know even less about Simulink than Matlab. That's also the reason why I don't simply test my formula in a simulation, the correctness of the simulation itself would be rather questionable... |
|
|
![]()
Post
#9
|
|
Shooting Target ![]() ![]() ![]() ![]() Group: Members Posts: 1,930 Joined: 9-April 05 From: Scandinavian Union Member No.: 7,310 ![]() |
Why are you doing this exactly? Seems like an awful lot of work to do just for the sake of it... Asking out of genuine curiosity.
|
|
|
![]()
Post
#10
|
|
Neophyte Runner ![]() ![]() ![]() ![]() ![]() Group: Validating Posts: 2,492 Joined: 19-April 12 Member No.: 51,818 ![]() |
Some people like math, for the sake of math itself. (IMG:style_emoticons/default/smile.gif)
|
|
|
![]()
Post
#11
|
|
Great Dragon ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Dumpshocked Posts: 5,088 Joined: 3-October 09 From: Kohle, Stahl und Bier Member No.: 17,709 ![]() |
Why are you doing this exactly? Seems like an awful lot of work to do just for the sake of it... Asking out of genuine curiosity. Originally just as an exercise to get started with Matlab, now mostly because a) I simply want to figure it out b) there's an idea in my head how R. 2 commlinks would no longer be open books without making that R. 4 camera impossible to hack, and I'm not making a gazillion dice rolls to see if it works (IMG:style_emoticons/default/wink.gif) |
|
|
![]()
Post
#12
|
|
Running Target ![]() ![]() ![]() Group: Members Posts: 1,018 Joined: 3-July 10 Member No.: 18,786 ![]() |
|
|
|
![]()
Post
#13
|
|
Immortal Elf ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 10,289 Joined: 2-October 08 Member No.: 16,392 ![]() |
Some people like math, for the sake of math itself. (IMG:style_emoticons/default/smile.gif) Have I mentioned on the forums that I calculated the odds that a character I have in this one game will end up screwing a direct decedent of his? That is, if he were to have sex, the odds that it would be incest (although it would be very distance incest; equivalent to the fact that you and your significant other are ~200th cousins). Turns out, it's pretty much guaranteed, due to the number of generations that separate him from his initial offspring point from his current position in the timestream.* (The % of shared DNA is something like 1 part in 10,000 though). I wasn't able to model population group separation (e.g. non-decedents isolating themselves), but it's largely irrelevant, as if there was even just one decedent in the original group they didn't know about, or anyone from another group migrating in, the pool would be permanently polluted. Math is fun. *55 generations, give or take. After 15, the entire world population would be related (based on a number 100 times bigger than the GM gave me for starting population size). GM's guess was "about two-thirds" which turned out to be low. |
|
|
![]()
Post
#14
|
|
Shooting Target ![]() ![]() ![]() ![]() Group: Members Posts: 1,930 Joined: 9-April 05 From: Scandinavian Union Member No.: 7,310 ![]() |
Some people like math, for the sake of math itself. (IMG:style_emoticons/default/smile.gif) Math is the reason I don't get a science degree, I struggled to get through math in school and I would need to read two more courses to qualify to the basic year of natural science education... I enjoy it when it clicks, but Im just not wired to deal well with numbers... |
|
|
![]()
Post
#15
|
|
Runner ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,654 Joined: 29-October 06 Member No.: 9,731 ![]() |
|
|
|
![]()
Post
#16
|
|
Moving Target ![]() ![]() Group: Members Posts: 881 Joined: 13-November 11 From: Vienna, Austria Member No.: 43,494 ![]() |
Math is the reason I don't get a science degree, I struggled to get through math in school and I would need to read two more courses to qualify to the basic year of natural science education... I enjoy it when it clicks, but Im just not wired to deal well with numbers... When you deal with numbers, it is not called math - it is calculating. |
|
|
![]()
Post
#17
|
|
Shooting Target ![]() ![]() ![]() ![]() Group: Members Posts: 1,930 Joined: 9-April 05 From: Scandinavian Union Member No.: 7,310 ![]() |
|
|
|
![]()
Post
#18
|
|
Running Target ![]() ![]() ![]() Group: Members Posts: 1,018 Joined: 3-July 10 Member No.: 18,786 ![]() |
Have I mentioned on the forums that I calculated the odds that a character I have in this one game will end up screwing a direct decedent of his? That is, if he were to have sex, the odds that it would be incest (although it would be very distance incest; equivalent to the fact that you and your significant other are ~200th cousins). Turns out, it's pretty much guaranteed, due to the number of generations that separate him from his initial offspring point from his current position in the timestream.* (The % of shared DNA is something like 1 part in 10,000 though). I wasn't able to model population group separation (e.g. non-decedents isolating themselves), but it's largely irrelevant, as if there was even just one decedent in the original group they didn't know about, or anyone from another group migrating in, the pool would be permanently polluted. Math is fun. *55 generations, give or take. After 15, the entire world population would be related (based on a number 100 times bigger than the GM gave me for starting population size). GM's guess was "about two-thirds" which turned out to be low. For comparison, Genghis Khan is the predecessor of about 1 in 200 men, and he is from 30 generations ago. Unless the starting population for that was really low, no way are you related to everybody after 15. |
|
|
![]()
Post
#19
|
|
Immortal Elf ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 10,289 Joined: 2-October 08 Member No.: 16,392 ![]() |
For comparison, Genghis Khan is the predecessor of about 1 in 200 men, and he is from 30 generations ago. Unless the starting population for that was really low, no way are you related to everybody after 15. It was really low. (IMG:style_emoticons/default/wink.gif) The GM stated the initial population size of 100, 3 of them mine. But I know that that is unsustainably low (for humans, 250 is the absolute minimum in terms of genetic diversity). I think my largest model peaked at 100,000 initial individuals (3 of them mine). Above that my computer ran out of memory before hitting the 100% saturation threshold. The higher the initial population, the longer it takes, but even at 100,000, it was taking an average of 14 to 16 generations (at 100 it was fully saturated in something like 8 to 10). This is, of course, assuming completely random mate selection (ignoring direct siblings), which is not true in the real world. Edit: Located the simulator. 3 in 100 finishes at 15 generations. 3 in 10,000 finishes at 16 (these take too long to run multiple times, it was at 96% after 15 and a final population size of 880,000) 3 in 100,000 finishes.....this may take a while. (IMG:style_emoticons/default/nyahnyah.gif) Edit 2: Ah, 100k is the one that crashes. |
|
|
![]()
Post
#20
|
|
Running Target ![]() ![]() ![]() Group: Members Posts: 1,018 Joined: 3-July 10 Member No.: 18,786 ![]() |
Also, now that I look at my source again, that "1 in 200" is only for direct male descendants, which obviously lowers the number by a lot.
|
|
|
![]()
Post
#21
|
|
Immortal Elf ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 10,289 Joined: 2-October 08 Member No.: 16,392 ![]() |
Also, now that I look at my source again, that "1 in 200" is only for direct male descendants, which obviously lowers the number by a lot. That it does, heh. I could have modeled something like that, but I didn't. Mainly because my character is male, and he'd be knocking up the girls. (IMG:style_emoticons/default/nyahnyah.gif) (And there's a reason why he's called "The Defiler." ;D ) |
|
|
![]()
Post
#22
|
|
Shooting Target ![]() ![]() ![]() ![]() Group: Members Posts: 1,930 Joined: 9-April 05 From: Scandinavian Union Member No.: 7,310 ![]() |
Also, now that I look at my source again, that "1 in 200" is only for direct male descendants, which obviously lowers the number by a lot. Believe that has something to do with genetic markers that are only passed down from male to male, similarly you can do the same for women to find the last common ancestor. |
|
|
![]()
Post
#23
|
|
Running Target ![]() ![]() ![]() Group: Members Posts: 1,018 Joined: 3-July 10 Member No.: 18,786 ![]() |
That it does, heh. I could have modeled something like that, but I didn't. Mainly because my character is male, and he'd be knocking up the girls. (IMG:style_emoticons/default/nyahnyah.gif) (And there's a reason why he's called "The Defiler." ;D ) That'd actually be a reason for modeling it. Check how many of your offspring were male, then how many of those males were male and so on. |
|
|
![]()
Post
#24
|
|
Immortal Elf ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 10,289 Joined: 2-October 08 Member No.: 16,392 ![]() |
|
|
|
![]()
Post
#25
|
|
Awakened Asset ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 4,464 Joined: 9-April 05 From: AGS, North German League Member No.: 7,309 ![]() |
I got access to a Matlab license, so stuff like "sum from 1 to n" is relatively easy. The question is just whether I'm conceptually on the right track... Canīt help you with Mathlab (dabbled for a while, but a decade ago). P(succeeding on the n-th roll) = P(hacker accumulated >=FW hits on the n-th roll) * P(node accumulated <ST hits on the n-th roll) * P(hacker accumulated <FW hits on the n-1-th roll) Hacking on the Fly is an extended opposed test. Under your conditions: 1st turn P(attacker win (1 turn)*(1- P(defender win (1 turn)) 2nd turn [1-P(attacker win (1 turn)*(1- P(defender win (1 turn))] * P(attacker win (2 turns)*(1- P(defender win (2 turns)) And so on. Should be over after 4 turns in most situations, but your math will likely not care for total turns (IMG:style_emoticons/default/wink.gif) For a given players stats, a matrix of odds (stealth vs target dp) could be VERY cool: Firewall 3-8, target dp 6-16. Please? *ducks* |
|
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 24th April 2025 - 07:42 AM |
Topps, Inc has sole ownership of the names, logo, artwork, marks, photographs, sounds, audio, video and/or any proprietary material used in connection with the game Shadowrun. Topps, Inc has granted permission to the Dumpshock Forums to use such names, logos, artwork, marks and/or any proprietary materials for promotional and informational purposes on its website but does not endorse, and is not affiliated with the Dumpshock Forums in any official capacity whatsoever.