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

This Month's Specials

The Falklands War: 1982- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
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
  #2  
Old February 17th, 2005, 03:54 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?

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)
Reply With Quote
  #3  
Old February 17th, 2005, 04:38 PM
Kristoffer O's Avatar

Kristoffer O Kristoffer O is offline
General
 
Join Date: Aug 2003
Location: Sweden
Posts: 4,463
Thanks: 25
Thanked 92 Times in 43 Posts
Kristoffer O is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

I learned that Bone Daddy is a nerd
__________________
www.illwinter.com
Reply With Quote
  #4  
Old February 17th, 2005, 04:39 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?

Thats funny because i'm not bone daddy and Ivan's posts where nerdier. No offense intended Ivan.
Reply With Quote
  #5  
Old February 19th, 2005, 04:11 PM

Ivan Pedroso Ivan Pedroso is offline
Corporal
 
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Ivan Pedroso is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
BigDaddy said:
Thats funny because i'm not bone daddy and Ivan's posts where nerdier. No offense intended Ivan.
Hehehe none taken

"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 ?
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
Reply With Quote
  #6  
Old February 19th, 2005, 04:56 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:
Ivan Pedroso said:
"20 sages in a row - 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.

7/8 probability means that you will get one of a "good" paths, but repeating the roll 20 times does not guarantee that you'll get each of "good" paths at least once. Thus 7/8 ^ 20 is probability of missing "bad" path (and maybe some of the "good" paths), not one path exactly. If you write your 20 random picks, using digits from 0 to 7 to indicate different paths, 8^20 is a total number of possible numbers (outcomes). Not getting one particular path means getting number without particular digits. There's total of 7^20 such digits. However, there're numbers like 111...1, 222...2 etc amongst them. Those numbers indicate outcomes where 7 paths are missing. Other numbers will represent outcomes with various number of paths missing.

Quote:
Ivan Pedroso said:
General formula:
(chance of one good)^(number in a row) * (ways to make a good pool)

Getting 20 in a row without exactly 2 paths:
(6/8)^20 * 28 = 0.0888
(28=(8!)/(6!2!) is the number of ways of taking 6 from a sample of 8)

Same problem as above, it's probability of missing 2 paths or more.

Quote:
Ivan Pedroso said:
Getting 20 in a row with 1 or more paths missing:
~65%

Surprisingly high ? or ?
Reply With Quote
  #7  
Old February 19th, 2005, 06:11 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?

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!
Reply With Quote
  #8  
Old February 19th, 2005, 06:28 PM

Ivan Pedroso Ivan Pedroso is offline
Corporal
 
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Ivan Pedroso is on a distinguished road
Default 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 )
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
Reply With Quote
  #9  
Old February 17th, 2005, 04:46 PM

Turms Turms is offline
Corporal
 
Join Date: Jan 2004
Location: Finland
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Turms is on a distinguished road
Default 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
Reply With Quote
  #10  
Old February 17th, 2005, 04:53 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?

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.
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 03:59 PM.


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