![]() |
Re: Random Magic Paths - is it truly random?
Quote:
"The more you repeat the random process the more the empirically measured frequencies approach the values of the ''true'' underlying probabilities" - repeatedly roll some eight-sided dies and your observed frequencies will get closer and closer to 1/8 as you go along. Quote:
Adding up any three empirical frequencies will (very likely) result in a value that is included in the interval [3/8-3*e ; 3/8+3*e]. Adding the three largest will make the value end up in the smaller interval above. (hehehe I could be a pedantic arse and state that the smaller interval is contained in the larger and still claim my statement to be true - but I simply just forgot about the obvious lower limit of 3/8 http://forum.shrapnelgames.com/image...es/biggrin.gif - made me look a bit foolish.) I made a crude program to empirically calculate the Duck_Number: (I like MatLab http://forum.shrapnelgames.com/images/smilies/cool.gif ) <font class="small">Code:</font><hr /><pre> clear %%% Clears stuff. rand('state',sum(100*clock)); %%% Random seed gets mixed up a bit. m=[0 0 0 0 0 0 0 0]; %%% A vektor is created: %%% The first entry could be FIRE %%% the second AIR, and so on. N=100000 %%% Number of mages to be generated. for I=1:N roll=randint(1,1,8)+1; %%% Random integer between 1 and 8. m(roll)=m(roll)+1; %%% The appropriate entry (FIRE, AIR... end %%% gets bumped up by one. f=m/N %%% The generated frequencies are computed. sf=sort(f); %%% Frequencies are sorted (ascending order). duck=sf(8)+sf(7)+sf(6) %%% The three highest values are added. </pre><hr /> Doing a handfull of runs (N=100000) resulted in: Duck_Number ~ 0.377 as a reference: 3/8 = 0.375 |
Re: Random Magic Paths - is it truly random?
Quote:
Quote:
What is wrong is that if you select N for epsilon, delta for the first path, using the same N for the second path is wrong, because after you've fixed one path, the distribution of the other remaining picks between paths is not the same as before. The interval didn't really matter, it was just a consequence of not considering that those variables became dependent. However, you can prove by applying your reasoning to the random variables X1...Xm (m = C(3,8)) which represent rolling one of the 3 picks (for each combination of 3 paths), with mean = 3/8 for each variable. Than applying your original logic, selecting such N that Probability( |"observed frequency of Xi" - mean| > epsilon ) < delta Here, max ("observed frequency of Xi") is a "duck number", so it proves it. So this case looks closed http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Random Magic Paths - is it truly random?
(Sure - "choosing a large N" was always meant as: "as large as needed for the stuff to be correct".)
Back to the original question - has anyone found any significant deviations that suggest any hokey-pokey in the randomness ?!? |
Re: Random Magic Paths - is it truly random?
It doesn't look likely to happen, the sample needed to find anything with a reasonable probability of correctness seems to be too big. My test with sample of 3000 wasn't even close to the point when the distribution significantly condenses, in your 100000 sample result is still 0.5% off.
What is the size of the sample required to show that there's a problem (using duck number indicator) with a 99.99% probability? I think we'd need the code of RNG to test it on large samples... |
Re: Random Magic Paths - is it truly random?
I suppose there would be no way to create a program able to count the magic paths on Spectres? Getting high number of mages is not difficult, but counting them is (I currently have 4,000 spectres or so, with 128 spectres summoning a spectre every month). Of course, the game *will* crash sooner or later, but I think having as many mages as the game can handle should be good enough for this purpose. Or perhaps several such tests could be run?
Now, the question would be how to count all those magic paths without spending a lifetime on the matter. With further experimentation, I noticed the Nation Overview wouldn't work with that many commanders, and only one hundred commanders can be moved at once to another province. The game also hangs up sometimes when running a turn, but brute force seems to solve the problem, for now at least. |
Re: Random Magic Paths - is it truly random?
Err.. folks, I don't think, and the original claim wasn't about it either, that the RNG code is broken per se.
It's just that you e.g. get the "same" mage three times in a row in one game, say with earth/air as random pick, and in the next game, you only get nature and something, but never an air mage (while playing the same nation again). And sometime the behaviour changes suddenly mid-game. Would this be "singular" happenings, I woulnd't bother, but I have seen this way to often to write it off as Murphy's law or statistical effects or whatever. But the error is not with the RNG, but with either the seed that is fed to it (and not re-set for some turns, essentially resulting in the same random number again) or with the code that turns that random num into the actual commander (maybe using old data from the previous turn, or copying the last build commander or something). Wild guess: That bug about strangely ressurected commanders/heros, which turn up with other nations isn't fixed, too, as noone can figure out how and when it happens, right? Maybe there's some connection ??? |
Re: Random Magic Paths - is it truly random?
@Arralen
(As started by others) Just because something looks a bit funny doesn't mean that it isn't random. |
Re: Random Magic Paths - is it truly random?
The Duck_Number is not an easy tool to utilize in order to check if the distribution of random picks is in fact uniform. It is much easier to just count the different number of FIRE, AIR, WATER,… picks and then do a reduced_Chi^2 test to see if we can uphold the notion, that the random picks are uniformly distributed.
(Chi^2 is the square of the Greek letter Chi – looks like an X and is pronounced: “Kai”) How to do it: (1) Take your data-sample and group the measurements in some “bins” (intervals). (2) Decide on a distribution (or model) that you would like to check your measurements against. (3) Use your distribution to calculate the expected number of “hits” in each of the bins. (4) Calculated the reduced_chi^2 value. Formula: Reduced_chi^2 = (1/d) * SUM[ (O(i) – E(i))^2 / E(i) ] d = the number of degrees of freedom O(i) = observed number of hits in the i’th bin. E(i) = expected number of hits in the i’th bin. Depending on the reduced_chi^2 you can now determine the following: “How likely is it that my chosen distribution could be responsible for the observed data-sample.” If the reduced_chi^2 is close to one, then agreement is satisfactory. If it is larger, then the observed results do not fit the assumed distribution. “Larger” depends on the value of d, but it usually means larger than 2 or 3. I’ll do an example to illustrate the method: I use the sample that Alneyan showed some posts above. Fire:22, Air:22, Water:25, Earth:28, Astral:22, Death:31, Nture:17, Blood:27 Going through the steps above: (1) well… an obvious choice of bins would be bin1=FIRE, bin2=AIR bin3=WATER and so on. (You could test the ratio of elemental vs. sorcery by choosing just two bins. There could be other interesting bin’ings.) (2) I choose a model with equal probability (1/8) of getting the different paths. (3) The total number of mages generated were 194. So the expected value in each bin is 194/8 = 24.25 (4) We first need to explain the “d” in the formula. Here d = 7. That is because of the following constraint: O(1)+O(2)+…+O(8) = 194. There are eight different bins. If you fill up the first 7, then the rest will just go into the last one. Reduced_Chi^2 = (1/7)*[ (22 - 24.25)^2 / 24.25 + (22 – 24.25)^2 / 24.25 + (25 – 24.25)^2 / 24.25 + … + (27 – 24.25)^2 / 24.25 ] = 0.798 Apparently there is a nice level of agreement between Alneyan’s data and the hypothesis (probability of 1/8 of getting any of the paths). But beware of jumping to conclusions!!! This result just mean that we can’t reject the hypothesis. We can’t claim that the probabilities are in fact (1/8) for the different paths, just that the data-sample doesn’t give us any reasons to discard it. An example of a distribution that would be rejected by this data-sample is this: FIRE = AIR = WATER= EARTH = 0.25 * 60/100 = 0.1625 ATRAL = DEATH = NATURE = BLOOD = 0.25 * 40/100 = 0.0875 (Corresponding to a 65%-35% distribution between elementals an sorcery) O( i = 1,2,3,4 ) = 194*0.1625 = 31.525 O( i = 5,6,7,8 ) = 194*0.0875 = 16.975 Reduced_Chi^2 = (1/7)*[ (22 – 31.525)^2 / 31.525 + (22 – 31.525)^2 / 31.525 + (25 – 31.525)^2 / 31.525 + … + (27 – 16.975)^2 / 16.975 ] = 3.7852 With d=7 a result of 3.7852 indicates that it is highly unlikely that this new distribution is responsible for Alneyan’s data. |
Re: Random Magic Paths - is it truly random?
Quote:
This lack of independence is a typical problem in pseudo-RNG. They often tend to repeat certain sequences more often that others. So if we're looking for a problem in RNG, I'd expect to find something like if you've sequentially rolled 1,2 and 8, there's about 50% probability that the next number will be 3 or 5. |
Re: Random Magic Paths - is it truly random?
Ok I'm done being sick...
I finished my test to 100, the totals were: F 13 A 7 W 10 E 16 A 11 D 14 N 17 B 12 It took a little while, cause I wrote them down in the order I recruited them. The only thing that bothers me, is the streakyness of some picks. For example, I got my first air random on dwarf 17, then no more till #57. Or, I get 7 Earth randoms from Dwarf #8 to #21, and another grouping of 5 between #64 and #75. Astral and Water distribution look a little fishy to me also... Fire, Nature, Death and Blood *look* random, I guess. So maybe it has just been my perception. Plus everyone else seems to think everything is OK, for the most part. Thanks for the responses! |
Re: Random Magic Paths - is it truly random?
Quote:
|
Re: Random Magic Paths - is it truly random?
I'm inclined to believe the system IS random. I think anyone who doesn't think so, should just start a game and run a test with King of the deep or other applicable units. Hire like 200 of them and count them up. You may need 300 for checking all 8 paths. Don't play the game, just give yourself like 9 starting provinces and go to work. My results of 168 sea kings yielded 83 elemental picks and 85 sorcery picks. This yield no significant statistical difference from the null hypothesis.
Restrain yourself from trusting the tests of others if your test comes out more even. I apoligize in advance to anyone who feels insulted, but the probability of getting the 746 elemental paths to 675 sorcery paths is significantly <1%, so I had to either accept that the system wasn't random, or do a controlled test myself (whick i did, and drew my own conclusions). For instance, non controlled in game test may be skewed by using some random paths for blood hunting or less desireable one as troop ferries. |
Re: Random Magic Paths - is it truly random?
Quote:
I guess what I am saying is if you get 50 death mages in a row, then 50 blood mages in a row, etc, totalling them all up at the end will look like it is a random distribution, even though it was not. That was the main reason for my first post. I felt, and still do, that it is not completely random. I always seem to get "gaps" and 2-4 paths that have the majority of the random picks, at any given point. Testing on a large scale is somewhat irelevent, as you don't recruit 1000 mages (or I don't) Again, this seems to be my perception... |
Re: Random Magic Paths - is it truly random?
Perception is difficult with the study of randomness. You have to repeatedly see the same pattern before you can assume the either random number generator or pregenerated random number table is flawed. I'm not sure which this game uses. Anyway, strings of mages are entirely likely. . . Kind of like a couple having 4 girls and no boys. The likelyhood of that is .5^4 or (6.25%).
If you want to test your hypothesis you need to document patterns. . .BBF ... BBF... I don't think 1000 mages will produce much more significance than say 400, or even 300. Thats just the way significance works. I've misplace my statistics book, or I'd tell you exactly how to find significance, but trust me, you don't need 1000 mage, 300 will do. |
Re: Random Magic Paths - is it truly random?
Well, Bummer_Duck, you have to do larger scale tests to get any significance out of your test, like I said earlier about the likelyhood of a couple getting 4 girls and no boys, the likelyhood of getting a couple blood mages in a row is not that remote. The likely hood of getting 6 blood mages in a row is, however, quite remote .125^6=.00038%. Significance increase markedly for the first several units sampled, so you need a significant number of mages to make any judgement. If that doesn't suit your fancy, try hiring 20 mages after starting 10 new games and draw your results from there.
Even after 200 units 4 paths are very likely to have a "majority" of the picks, 2-3, however, are not. |
Re: Random Magic Paths - is it truly random?
I apologize for posting 3 time in a row, but I think I may need to expound on statistics and randomness, since it seems the topic may be misunderstood. Indeed parts of statistics are still theoretical, and it took until the middle ages before statistics was really a science.
First, remember that BEFORE you run a test you can estimate the probabilities of something happening, like 2 blood paths in a row (.125^2=1.54% chance), BUT in a random system the previous result does not effect the next result. So, after you recruit and get a blood path, the probability of the next recruit being a blood path is still 1/8. This is what makes next round projections impossible in a random system, and is why you need patterns to prove your hypothesis. Also, it appears that significance is misunderstood. So: Statistical Significance-the probability (P) that a sample (s) is representative of the population (S). More simply the probability that the mages you hired are representative of all the mages that have been and ever will be recruited. While demonstrating why large numbers of samples (recruits) are necessary is more difficult, a simple example can show why just a few recruits is not enough is quite simple. So, if you hire just 1 mage, and assume it is representative of the population you'll get a result of 100% of mages belong to 1 path. Similarly if you hire just 8, and don't get mages of 2 paths, you could conclude that some paths recieve 0% of random picks. In a random system the likelyhood of these results declines with sample size (the number of mages recruited). In conclusion, simply take our word for it that you NEED to recruit many mages to draw any conclusions. Significance (alpha) can be found given population constraints (even for infinite populations), however, I've misplaced my book. I am quite experienced (and educated) in statistics and trust me that you do not need 10000 or even 1000 recruits to test a sytem with 7 degrees of freedom, 300-400 will be just fine. I sincerely hope this helps. |
Re: Random Magic Paths - is it truly random?
You may be right, daddy, but you just quite don't hit the mark.
I'm 100% with Bummer here: There are odd patterns in the randomly generated commanders skills. But those patterns are so short, that they will not influence the overall result if you do several hundreds of test, e.g. 500 sages. I estimate the sample size, where those patterns could be observed, is about 20.. 30. After that, the alghorithm produced the next pattern. And the significance is not in the number of samples you get by buying sages in a test, but in how often this behaviour is observed in ongoing games. And I must state -again- that I have seen it way to often as to dismiss it as statistical oddities. Hey, I have even got commanders which had the very same randomly drawn name, additionally to having the same magic skills. And this behaviour is quite understandable, as we are not talking about a bunch of thown dice, but about complex programm code, whose behaviour isn't really suited to be discribed by statistical analysis but maybe by chaos theory http://forum.shrapnelgames.com/images/smilies/wink.gif What if the RNG works great, but is -because of some flaw somewhere else- fed with exactly the same seeding value turn after turn, unless the numbers of orders in a turn is odd, in which case it uses the cross summ of all player 1 commmander names as seed for it's next sequence of random numbers? You could buy sages for ages, and in the end you'll find perfect random skill distributions. But for 20 or 50 turns you may not get a single "blood" one, but alternating air and earth ones. |
Re: Random Magic Paths - is it truly random?
You have a 6.9% chance in any game to draw 20 random path mages in a row without getting a blood mage. An actual example of the strange behavior might be more helpful.
I must admit I'm skeptical about the odd behavior not being random. Random systems often spit out nearly patternlike garbage all the time, especially short patterns when the system has a low number of degrees of freedom. But then you never see that pattern again. If you just use a coin for instance you'll get lots of HHHT's, but that doesn't make the toss not random. A large number of degrees of freedom cut down significantly on the number of false patterns, but such a test is for the programmers not for us. Repeatedly getting commander with the same skills and names MIGHT be worrisome, but we were never told the name where random, plus I doubt much double checking was done on the naming system. On the technical side, it is possible that your computer or operating system is limiting the randomness of the RNG (which would explain why some people are certain of the problem and others aren't so sure). Has anyone using a non-windows OS witnessed this problem? Also, if the program uses a pregenerated random number list or table, you may very well find yourself in the midst of a pattern, but this type of problem is easily patched with a larger table and more complex seed starting position. This is an entirely plausible problem, but not one I have personally witnessed. People are not able to generate random numbers themselves, its been shown. They have tendency to just pick a number they haven't picked for a while. It is far more likely for a computer or die to pick 1,2,3 but it is highly unlikely a human would ever do that (unless they knew that was a problem of course). All I'm saying is that human preception of random and actual randomness are quite different. It is also quite unlikely that computers are entirely random, but they are a lot better than people. |
Re: Random Magic Paths - is it truly random?
Furthermore, unless I'm just up too late and should really go to bed now (probably true), it seems that the chances of 20 random picks missing a least one path (in other words, getting 20 consecutive sages and still not having 8 paths between them) is 43.6%, which is relatively high. Math:
1-((1-.0692)^8), where the .0692 is derived from the same calculation as above. As far as RNGs go, I found a really nice one, called the Mersenne Twister. It is a software RNG, but the software actually finds stray radioactive particles in the dust on your CPU and monitors them for randomness. If you clean your case a lot the randomness goes down, which may explain some of the problems in this thread. On the other hand... I just disassembled dom2.exe and got this little code fragment... maybe this is the problem? <font class="small">Code:</font><hr /><pre> public int rand(){ for(int i=0; i<100; i++){ if(seemsRandom(i)){return i;} } return secret_very_random_number; } public boolean seemsRandom(int x){ // note: add some stuff here before Dominions 3 is released return true; } private int secret_very_random_number=42; </pre><hr /> |
Re: Random Magic Paths - is it truly random?
roflmfao
|
Re: Random Magic Paths - is it truly random?
Arallen and Bummer_Duck, if you are actually seeing long strings of alternating air and earth mages, I would suggest that it is a bug, but with the sophistication of random number tables and RNG these days, I believe the flaw would be in the windows OS. If you're using a different OS, I almost can't comprehend the problem. Depending on the actual coding of course, it could be caused by an artifact in the memory of the computer, caused by windows clunky and inefficient memory management.
Reboot, and try again! But be warned random systems do do unexpected things, and thats the beauty of them. |
Re: Random Magic Paths - is it truly random?
Restarting the computer incessently is a dogmatic method of course, if you're not seeing a real pattern.
If the system wasn't random you could use and expert system (thats the engineers term for artificial intelligence) to predict the outcome. Of course with the turing machine's (a computer is a turing machine)inability to actually produce random numbers, with enough samples the expert system may eventually learn how predict the supposed randomness, but it would take quite a few samples and a very sophisticated expert system. Has anyone learned anything from reading these posts? (Corrected spelling) |
Re: Random Magic Paths - is it truly random?
I learned that Bone Daddy is a nerd http://forum.shrapnelgames.com/images/smilies/happy.gif
|
Re: Random Magic Paths - is it truly random?
Thats funny because i'm not bone daddy and Ivan's posts where nerdier. No offense intended Ivan.
|
Re: Random Magic Paths - is it truly random?
You reasoning is invalid BigDaddy. Johan Osterman already posted that Dominions II uses a pregenerated random number table. That means it's random number generator works exactly the same in any computer with any OS. If it didn't the battle replays wouldn't work.
I have still a question though: How is the seed for a new turn generation chosen? The normal way is to take it from the clock or something. That is the only place I could think that could somehow affect the randomness of picks (very unlikely). Turms |
Re: Random Magic Paths - is it truly random?
OK, I didn't notice Johan's post (I was wondering what method was used). Pre-generated number tables are very common (they are more efficient), but I think an artifact could still cause problems.
I don't think the seeding technique is likely to be the problem. I believe the seeds are used to select a starting point on the table and a "movement" pattern around the table, and it can be made even more comples. Repeats are highly unlikely in any case. |
Re: Random Magic Paths - is it truly random?
BigDaddy: But it was Bone Daddy that claimed that we and he and his whole family were nerds http://forum.shrapnelgames.com/images/smilies/happy.gif
Turms: Clock I believe. |
Re: Random Magic Paths - is it truly random?
(Removed joke) http://forum.shrapnelgames.com/image...es/redface.gif
|
Re: Random Magic Paths - is it truly random?
Chazar:
I would prefer to be quoted me, you would do it in such a way that it does not distort my words. It is no big deal, but if someone just checks your post one could draw the conclusion that I am whining because I believe that the random picks are not really random. Which is not what I was doing. Thank you, Turms |
Re: Random Magic Paths - is it truly random?
Umh, sorry, I did not see that: I did not distort anything in my quote and I left the quoted sentence intact and in full. Furthermore all I quoted from you looked to me like a mere, valid and purely technical question, which received an honest and purely technical answer from Illwinter in reply. So I didnt see any possible harm in my joking. Sorry!
|
Re: Random Magic Paths - is it truly random?
Sorry, It was me who overreacted.
Turms |
Re: Random Magic Paths - is it truly random?
Quote:
<font class="small">Code:</font><hr /><pre> p(missing at least one of the paths) = = p(missing path A) + p(missing path B) - p(missing path A and path B) + p (missing path C)+ ... = = sum[i=1..8]((-1)^(i+1)*C(i,8)*p(i)), where p(i)= ((8-i)/8)^20. </pre><hr /> This comes to around 46.94%, which is even "relatively higher" http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Random Magic Paths - is it truly random?
So has anybody here managed to create an infinite improbability drive yet? http://forum.shrapnelgames.com/images/smilies/smirk.gif
|
Re: Random Magic Paths - is it truly random?
Quote:
"20 sages in a row with exactly 1 path missing": (7/8)^20 *8 = 0.554 Explanation: the (7/8) is the chance of getting one of the 7 "good" paths when you hire a sage. ^20 is just 20 such sages in a row. *8 stems from the fact that you can choose your pool of 7 "good" paths from the 8 possible paths in 8 different ways. General formula: (chance of one good)^(number in a row) * (ways to make a good pool) Getting 20 in a row with exactly 2 paths missing: (6/8)^20 * 28 = 0.0888 (28=(8!)/(6!2!) is the number of ways of taking 6 from a sample of 8) Getting 20 in a row with 1 or more paths missing: ~65% Surprisingly high ? or ? |
Re: Random Magic Paths - is it truly random?
Quote:
Quote:
Quote:
|
Re: Random Magic Paths - is it truly random?
Based on his knowledge of statistics he made an estimate, thats what the ~ is for.
The exact value is given by ((7/8)^20 * 8c7) + ((6/8)^20 * 8c6) + ((5/8^20 * 8c5) + . . . + ((1/8^20 * 8c1) = .647163 If he didn't figure it out exactly he's a pretty good guesser. And he did say it properly: Probability of not getting 1 or more paths after recruiting 20 random paths. *8c5 = 8 combinataion 5 (ways to get 5 out of 8 with replacement) = 8!/5!3! |
Re: Random Magic Paths - is it truly random?
@Alexti
Ahhhh yeah - that was sloppy. (7/8)^20*8 is NOT the probality of getting exactly one path missing. You are absolutely right about it not garanteeing that the other 7 paths are present. Back when I have had time for a better look (sorry 'bout posting too hastilly http://forum.shrapnelgames.com/image...es/biggrin.gif ) |
Re: Random Magic Paths - is it truly random?
Quote:
Quote:
If you've missed my point, consider the case of getting random out of 3 magic paths and doing just 3 rolls. Ivan's formula gives (2/3)^3*3c2 + (1/3)^3*3c1 = 3*8/27 + 3/27 = 27/27 = 1 - probability of missing 1 or more paths, which is clearly wrong because you have positive probability of getting 3 different paths in 3 rolls. Note. Number of combinations of N out of M is notorious for having many different notations (like McN, C(N,M) (M,N) etc). So we're all talking about the same coefficients |
Re: Random Magic Paths - is it truly random?
Quote:
|
Re: Random Magic Paths - is it truly random?
Quote:
The alternating signs are introduced when probabilities of non-independent events are added. Same as when non-disjoint sets are unified: U(A,B) = A + B - I(A,B) U: unified I: intersection (written as an upside-down "U") With 3 sets A,B, and C you get: U(A,B,C) = A + B + C - I(A,B) - I(A,C) - I(B,C) + I(A,B,C) With 8: U(all eight) = A + B + ... + H - I(all with two) + I(all with three) - I(all with four) and so on with plus and minus alternating between the groups of intersections. One of the ones in the group called I(all with four) could be: I(A,B,C,D) or I(A,B,D,F) or ... well anyone with four letters http://forum.shrapnelgames.com/images/smilies/happy.gif - - - - we'll use the above stuff now - - - - "A" above could mean no FIRE pick in 20 sages in a row. "B" no AIR and so on. Then U(A,B,C,D,E,F,G,H) is all the sets that can be constructed with 20 sages where any one path is missing. P(getting one of the sets in U(A,B,C,D,E,F,G,H)) is then the probability of getting a row of 20 sages with any one path missing. But as Alexti said, if you add together P(A)+P(B)+ ...+P(H) you will NOT get P(getting one of the sets in U(A,B,C,D,E,F,G,H)). Because P(A) is the the probability of getting 20 sages without seeing any FIRE paths. But a series of 20 with all sorcery paths will then be a part of A, B, C, and D and would thus get counted 4 times instead of only once. The alternating signs ensures that these "extra countings" gets added and deducted correctly, in order to only count the relevant contributions once. The above describes how P(getting one of the sets in U(A,B,C,D,E,F,G,H)) should be calculated. P(A) = (7/8)^20 (so are P(B) and P(C) and so forth) so the first part (the one with A + B + C...) is thus: 8*(7/8)^20 P( I(A,B) ) = (6/8)^20 (and so are P( I(A,C) ) and bla bla) the re are 28 ways to make these parings, so the second part is: - 28*(6/8)^20 The third part is ( 8!/(5!3!)=8*7*6/(3*2)=56 ways to combine three letters from the eight available): + 56*(5/8)^20 And so on and so on... resulting in: ((7/8)^20 * 8c7) - ((6/8)^20 * 8c6) + ((5/8^20 * 8c5) - . . . + ((1/8^20 * 8c1) = 0.4694 As stated by Alexti and misunderstood by me, but now hopefully clear to all http://forum.shrapnelgames.com/image...es/biggrin.gif |
Re: Random Magic Paths - is it truly random?
That equation looks very familiar, but I've misplace my book... http://forum.shrapnelgames.com/images/smilies/fear.gif (not my advance statistics books with all their distributions and tests, just the basic one).
Anyway, for anyone who stumble across this with some arcane pattern and thinks it might not be random, remember that radomness is elusive even to statisticians. Understanding randomness could be likened to understanding the actual magnitude of infinite. We can use it and test it, just like infinite, but our perception of it will never be quite accurate. So, consider a random number off of an infinitely long number line. . . |
Re: Random Magic Paths - is it truly random?
Quote:
Quote:
<font class="small">Code:</font><hr /><pre> p=sum[i=1..m]((-1)^(i+1)*C(i,m)*p(i)), where p(i)= ((M-i)/M)^N </pre><hr /> where M is a number of picks and m <= M is number of picks in a subset, so the formula gives the probability of missing one (or more) of the paths out of subset of m paths. I've just substitued 8 for m and M for our case, which produced curious p(8)=0 http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Random Magic Paths - is it truly random?
So, does this have to do with true randomness not being possible within a system containing a limited number of variables?
|
Re: Random Magic Paths - is it truly random?
A computer can never make really random numbers, a computer scientist has ensured me that that is the case as I believed it was. Instead it uses the clock to produce seemingly random numbers. The numbers themselve seem very much random, in fact, you could call them "virtually random".
True randomness is a rather complicated term, but according to my text randomness is part of anything who's probability of occurence or omission is <100%. So, I'd say that the probability of failure of a device, or the probability of throwing heads on a coin are still random, regardless of their distribution. Distributions just describe some specific random systems. So, I'd have to say no. It's just easier to feel you've grasped random with a coin flip. Considering a random point on an infinitely long numberline is just a good way to illustrate a humans inability to truly understand certain concepts. Cosider a point on a numberline, if you take an infinitely small movement from that number to any other position on that numberline, there are an infinite number of uniques points between the first and the second, until the movement = 0. Similarly, we make do with random models and distribution that resemble the things we can test. So, consider this, the probability of flipping heads or tails on a coin 1000 times is 9.3326E-302. IF the coin is flipped an infinite number of times, the probability of this occuring is 1. In this example we have a demonstration of true randomness, with only two choices (heads or tails). |
Re: Random Magic Paths - is it truly random?
Via's CPU's produce random numbers, using special hardware. A Turing Machine cannot make random numbers, but modern computers don't have all the limitations of Turing machines (as shown by Via).
|
Re: Random Magic Paths - is it truly random?
Quote:
(It's a typical situation in math, until you get the point you are more or less in the dark, but when you get it, it really feels obvious afterwards. All teachers really could do with remembering their fumblings in the dark in their early days.) |
Re: Random Magic Paths - is it truly random?
Ok, so although the occurence of any given number within the set of variables will be random, there will be an emergent pattern (the distribution) which is not. Is my comprehension of what you are saying correct?
Please forgive my ignorance concerning stats and probs, but I've never taken any math courses beyond basic algebra and trig. Never really needed them. I have a tendency to only learn things as I need them, unless it's something I find interesting. :-/ |
Re: Random Magic Paths - is it truly random?
It is true that a computer can give numbers that have a nearly random distribution, BUT because they use a distribution (my brother called it an MT, for I think Marsenne Twist) and a seed (from the clock) there is an element of forecasting available that is completely impossible with true random systems. I think ANSI, which regulate random numbers I guess, has determined the the MT is the new method of choice! Still sophisticated software CAN match/nearly match random distributions, but it can't come up with random numbers. Nearly matching distributions is all you have to prove, and I don't believe that it was ever speculated that computers couldn't come close to random. In a logical system such as the computer, its impossible for the PC to pull a number out of it's B***, it's programmed how to follow a distribution.
Bone_daddy, yes, random systems have their own "patterns". Such as the normal distribution, where outliers of very high numbers are explained, but most number fall close to the average. |
Re: Random Magic Paths - is it truly random?
Interesting... is this device a miniature Geiger-Muller tube with some sort of radioactive isotope in a sealed chamber (similar to the technology used to make smoke detectors)? Is there a website where I can see a press release for it--I couldn't seem to find one in my own search (although I didn't look very long).
|
Re: Random Magic Paths - is it truly random?
That IS interesting. Basically, its like programming a robot to roll a die and then read the number, but it doesn't remove the theoretical limitation (that being that a computer is unable to come up with its own random numbers, in any case because you can forecast them knowing the time/function).
A very good use of it would be to make a pregenerated table or random numbers to seed your RNG. |
All times are GMT -4. The time now is 11:16 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.