Author Topic: Hiya and wiki  (Read 7596 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hiya and wiki
« Reply #15 on: April 13, 2008, 04:18:45 AM »
When you start or load a simulation, the random number generator is seeded.  The way computers do random numbers, it actually produces a list of numbers that's always the same for the given seed.  So yes, you could run two simulations, with identical seeds, on two computers, for years, and in theory they should always behave exactly the same even down to which mutations occur when.

If you don't want this behavior, try turninig off the random number seeding in the options panel, saving, and reloading the game.  This will seed the generator with your computer's time, which should be different every time you run the program.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Hiya and wiki
« Reply #16 on: April 13, 2008, 04:53:47 AM »
What EricL is saying is that the "random" seed number is the same for both sims. Therefore everything else should follow along the same path as before(mutations, motion, etc.).

It's both weird and cool to see in action. You can even use it to sim what parallel universes would look like, changing the physics or just moving a single bot and watching how the different sims evolve.

There's a seed number setting in the menu, if you want to specify a number yourself. Assuming the rest of the conditions are the same, you can restart a sim and have the same simulation.
« Last Edit: April 13, 2008, 05:02:58 AM by Endy »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Hiya and wiki
« Reply #17 on: April 13, 2008, 04:58:08 AM »
But that seed got to be limited, right? ..which means after it has gone through the list, in this case a number of mutations to occur, it must start over again doing the same mutations? Because a computer can't generate an endless list of instructions to continue forever, like an unlimited amount of different mutations.

Quote
If you don't want this behavior, try turninig off the random number seeding in the options panel, saving, and reloading the game. This will seed the generator with your computer's time, which should be different every time you run the program.

The random number seeding is already turned off.
« Last Edit: April 13, 2008, 05:13:08 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hiya and wiki
« Reply #18 on: April 13, 2008, 12:57:42 PM »
Quote from: Testlund
But that seed got to be limited, right? ..which means after it has gone through the list, in this case a number of mutations to occur, it must start over again doing the same mutations? Because a computer can't generate an endless list of instructions to continue forever, like an unlimited amount of different mutations.
A seed is just a place to start, a way to "randomize" the random number generator.  The code "seeds" the random number generator at the start of a new sim, either with the time or with a human specified number.   The random function is then used in various places in the code when needed in an ongoing manner and it returns a supposedly random number every time it is called.  It can be called a jillion, zillion times and each time, it returns a supposed random number.  The problem is that software is deterministic and it takes something comign from "outside" a determinisitc program to make it not so.  Call the random() function a thousand times in a row and you will get a thousand numbers but that sequence of thosuand numbers will be the same if you start with the same seed I.e. the 12th number will be X every time, the 13th number will be Y every time, etc.   This is why replaying sims with the same seed result in the same outcomes.  Call it a jillion, zillion times and you will get the same sequence of a jillion, zillion numbers for any given seed.

To get true random numbers, you need random influences from outside the program such as teleportation from other sims runnign on other computers at other rates with potential human and other non-deterministic influeneces.  True random generators use non-deterministic hardware based means such as heat noise for generating random numbers.  It's bascially impossible to generate truly random numbers in software alone, at least not when running on deterministic hardware.    

Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hiya and wiki
« Reply #19 on: April 13, 2008, 01:36:09 PM »
One thing I could do is to optionally use clock time to influence random numbers.  This would mean you could optionally choose to continue a saved sim in a non-deterministic manner.  When excatly you restarted it as well as what else was going on on the computer as it ran would influence random number generation.  Other running programs would have an influence on DB exectuion speed which would influence the specific time when random numbers are generated making things more non-deterministic.  Differences would accumulate over time.  Choosing this option would bascially mean replayed sims would not repeat...
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Hiya and wiki
« Reply #20 on: April 13, 2008, 03:26:40 PM »
Sounds like a cool idea to me.   As I got similar outcomes of the same sim I don't think it matters right now if the seed is checked or not.
« Last Edit: April 13, 2008, 03:28:05 PM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hiya and wiki
« Reply #21 on: April 13, 2008, 04:14:22 PM »
I think what happens is that even if "use seed" is unchecked, it generates a seed from the computer time at the start and saves that seed to the save data.  So even with it unchecked, you still get a deterministic game.