![]() |
#21 |
Scout
Join Date: Oct 2017
Posts: 32
![]() |
|
![]() |
![]() |
![]() |
#22 | |
Apprentice
Join Date: Mar 2010
Location: UK
Posts: 78
![]() |
Quote:
I beleive the Angband RNG is random in the mathematical and statistical sense; but often it seems "unfair" or "streaky" to humans.
__________________
Playing roguelikes on and off since 1984. rogue, hack, moria, nethack, angband & zangband. |
|
![]() |
![]() |
![]() |
#23 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
![]() |
Um. No pseudorandom RNG is "random in the mathematical sense." And there are a whole lot of statistical ways to analyze a sequence for randomness. I suspect the angband RNG is good under some of the basic ones, which is usually good enough.
|
![]() |
![]() |
![]() |
#24 |
Scout
Join Date: Jan 2010
Posts: 31
![]() |
Well, 1 in 18593 is slightly less probable than flipping a coin and having it come up heads 14 times in a row. I think any intelligent being would look upon that coin with suspicion. That said, I was glad to hear that this RNG had been tested for correlation. Serial correlation analysis is just as important as uniformity analysis when evaluating a RNG and is often neglected.
|
![]() |
![]() |
![]() |
#25 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
![]() |
When evaluating likelihood of an event like repeated fails on a 5% throw, it's better to ignore the first failure, as you are looking at a case where there is at least one failure. So the first failure should be considered a prior. 1 in 18000 isn't all that unlikely when integrated over all games and players.
|
![]() |
![]() |
![]() |
#26 | |
Swordsman
Join Date: May 2016
Posts: 336
![]() |
Quote:
I skipped the formulas, of course (maybe Nick can verify them ![]() I guess there is a useful lesson here - always be prepared for the worst ![]() |
|
![]() |
![]() |
![]() |
#27 |
Scout
Join Date: Jan 2010
Posts: 31
![]() |
Here is a prettied up version of a python script for calculating this that I found on a link on that site.
Code:
import argparse argparser = argparse.ArgumentParser(description='Calculate the probability of run of n events in m trials where p is the probabilty of an event') argparser.add_argument('-n', type=int, required=True, help='run length') argparser.add_argument('-m', type=int, required=True, help='number of trials') argparser.add_argument('-p', type=float, required=True, help='probability of an event') args = argparser.parse_args() N = args.n M = args.m p = args.p q = 1-p #probability of failure #setting up P_i (P[i] will be the probability that we see a run of length n in i flips) P = [None for i in range(0,M+1)] #initialize list to all Nones for i in range(0,N): #set boundary conditions, (not including P_N (r) P[i] = 0 P[N] =p**N #P_N (r) is now equal to p^N #now for main recursion (using a loop here instead) for i in range(N,M): P[i +1] = P[i] + (1-P[i-N]) * q * P[N] print 'A run of',N, 'events of probability',p, 'has a chance of 1 in',1.0 / P[M], 'of occuring in',M, 'trials' |
![]() |
![]() |
![]() |
#28 |
Swordsman
Join Date: Jun 2010
Posts: 309
![]() |
The other thing people often lose track of (or don't think about in the first place) is just how many trials are really being run in a typical game. I'll bet it's a *lot* more than most people realize, so when you do the math and come up with a 1 in 18,000 chance of something, you think "come on, that'll never happen" when in fact there are so many trials that it's to be expected a lot more than you think.
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accuracy | CivBesch | Vanilla | 3 | November 6, 2017 19:53 |
Best way to deal damage | Angrist | Vanilla | 13 | January 15, 2015 14:43 |
Damage bonuses that don't provide extra damage? | Egavactip | v4 | 2 | May 27, 2012 01:51 |
Estimated damage | fizzix | v4 | 6 | January 3, 2012 10:30 |
It did how much damage? | Raggy | Vanilla | 27 | June 26, 2011 21:12 |