Thread Tools
Old March 10, 2002, 14:57   #1
nbarclay
PtWDG Gathering StormInterSite Democracy Game: Apolyton TeamApolyton UniversityC4DG Gathering Storm
Emperor
 
nbarclay's Avatar
 
Local Time: 15:31
Local Date: October 31, 2010
Join Date: Dec 1999
Location: Huntsville, Alabama
Posts: 6,676
Random Numbers
In case no one's mentioned it before, I thought I'd explain a little about how "random" numbers on a computer work. Computers have no way of generating truly random numbers. Rather, they generate what are called "pseudorandom" numbers - numbers that are generated using a mathematical formula but in such a way that they look random.

Each sequence of random numbers is defined by a "seed" number fed into the random number generator at the beginning. If you start from the same seed every time, you get the same sequence of numbers every time. If you start from different seeds (for example, by basing the seed on the date/time when the program is started), you get different sequences.

What Firaxis appears to be doing is saving the current state of the random number generator in the save file so when the game is reloaded, the random number generator picks up right where it left off. That provides a simple yet elegant way of making sure if people reload a game and do the same things, they will get the same results. Assuming I'm right, all they have to store is about one or two numbers, and two entire games will go the same way from 4000 BC to 2050 AD if the player does exactly the same things. Whether that's a good thing or a bad thing, of course, is a matter of personal taste .

Nathan
nbarclay is offline  
Old March 10, 2002, 16:32   #2
Oligarf
Warlord
 
Oligarf's Avatar
 
Local Time: 22:31
Local Date: October 31, 2010
Join Date: Aug 2001
Posts: 160
It sounds like some sort of predestination, and that sounds like something bad.
Oligarf is offline  
Old March 10, 2002, 16:51   #3
Salvor
Apolyton University
Chieftain
 
Salvor's Avatar
 
Local Time: 16:31
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Chicago
Posts: 67
Re: Random Numbers
Quote:
Originally posted by nbarclay
In case no one's mentioned it before,
Nathan


Sorry, couldn't resist.
Salvor is offline  
Old March 11, 2002, 00:30   #4
nbarclay
PtWDG Gathering StormInterSite Democracy Game: Apolyton TeamApolyton UniversityC4DG Gathering Storm
Emperor
 
nbarclay's Avatar
 
Local Time: 15:31
Local Date: October 31, 2010
Join Date: Dec 1999
Location: Huntsville, Alabama
Posts: 6,676
Quote:
Originally posted by Oligarf
It sounds like some sort of predestination, and that sounds like something bad.
I suppose someone could call it "bad" in some metaphysical sense, but in practical terms, the only difference it makes is that you can't change the results by reloading. (That and tournament games presumably go the same way for different players until their actions start creating divergences, which probably makes things a little fairer.)

If you think about it, the deal in a card game is similarly predestined by the shuffle. But since no one knows the results of the shuffle until the cards are dealt, why does it matter? Think of the calculation of the "seed" as the shuffle and the actual calculation of the numbers as the deal.

Nathan
nbarclay is offline  
Old March 11, 2002, 03:32   #5
Apolex
Warlord
 
Apolex's Avatar
 
Local Time: 16:31
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Bel Air, MD
Posts: 140
Quote:
[If you think about it, the deal in a card game is similarly predestined by the shuffle. But since no one knows the results of the shuffle until the cards are dealt, why does it matter? Think of the calculation of the "seed" as the shuffle and the actual calculation of the numbers as the deal.

Nathan
That's a good analogy with the cards Nathan. I noticed the same thing one time when I called b.s. on my tank losing to a spearman. Upon reloading, the tank kept getting killed. I found that if I attacked with units in a different order after reloading, the spearmen no longer had the Rambo-type explosives spears and my tank didn't die.

-Apolex

[edited to include quote]
Apolex is offline  
 

Bookmarks

Thread Tools

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 17:31.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team