.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old February 16th, 2005, 04:14 PM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default 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.
Reply With Quote
  #2  
Old February 16th, 2005, 04:46 PM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default 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.
Reply With Quote
  #3  
Old February 16th, 2005, 08:57 PM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default 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

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.
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
Reply With Quote
  #4  
Old February 16th, 2005, 11:08 PM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default 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.
Reply With Quote
  #5  
Old February 17th, 2005, 07:49 AM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default 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?

Code:

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;

__________________
Cherry
Reply With Quote
  #6  
Old February 17th, 2005, 02:06 PM
The_Tauren13's Avatar

The_Tauren13 The_Tauren13 is offline
First Lieutenant
 
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
The_Tauren13 is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

roflmfao
__________________
Every time you download music, God kills a kitten.
Reply With Quote
  #7  
Old February 17th, 2005, 02:28 PM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default 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.
Reply With Quote
  #8  
Old February 19th, 2005, 01:30 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
Saber Cherry said:
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.

0.0692 is probability of not getting particular path. Then 1-0.0692 is probability of getting that particular path. Then you consider that events of getting/not getting some path are independent from each other. But those events are not independent. Consider, that your first event (getting blood path has happened on your serie, but that serie happened to have astral too). This makes the probability of your second event (getting astral) = 1, not 1-0.0692.

Code:

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.


This comes to around 46.94%, which is even "relatively higher"
Reply With Quote
  #9  
Old February 19th, 2005, 03:36 PM
bone_daddy's Avatar

bone_daddy bone_daddy is offline
Private
 
Join Date: Jan 2005
Location: Indiana, USA
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
bone_daddy is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

So has anybody here managed to create an infinite improbability drive yet?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:57 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.