Code center > Darwinbots Program Source Code

My DB2 non-optional changes, what do people think?

<< < (3/5) > >>

Numsgil:
Actually that's probably a reasonable enough idea.  You should be able to power through millions of random calls in no more than a second or two, and it's easy enough to wrap calls to rand inside a wrapper.

Botsareus:
Seeds:

Cool, but here is a par of problems:

I guess in the simulation structure we will also need to add a pointer of what is the current random number...

1.) What if you do not want the sim to continue in the same way?

2.) What if your sim is running long enough that we run out of random numbers? If you can give me about how much 200 hours of simulation time (10 day limit) doubles it will take,  and how much ram we are consuming, then we go for it. Remember think big bc a robot with lots of dna will consume more 'randomizeddoubles' (new word  :P) when it mutates.

My idea is to save a sim every minute. Then restart the sim knowing the seed if there is a crash or you need to turn off the PC. This may take a while but, If within that first minute the sim crashes then bingo: I know the seed and I can debug the sim for that minute through vb.

View point or Cameras: PLAN B
Nice, but we need a fix now, so everyone is running the same simulation across all resolution ratios, especially if we go with the new randomizer idea.

How about this: The mdiforms size will not be permanently fixed, instead it will fetch its current size and if it is maximized. Then the system will temporarily resize to the size I set for my "fix." Then after the simulation starts it will resize back to the size set by the user  and a user can zoom-in if needed.

Botsareus:

--- Quote --- What if your sim is running long enough that we run out of random numbers?
--- End quote ---

Hey, Numsgil I just did a pritty sweet proof of consept:

Private Sub Form_Load()
Randomize 10 'initial seed
Dim randob(50) As Double 'only 50 for proof of cosept
For e = 1 To 50
randob(e) = Rnd(randob(e - 1))
Next
For e = 0 To 50
Debug.Print randob(e)
Next
'reloop consept (should be endless) a.k.a. next 50
randob(0) = randob(50)
For e = 1 To 50
randob(e) = Rnd(randob(e - 1))
Next
For e = 0 To 50
Debug.Print randob(e) & " is next"
Next
End Sub

All the wait time will be only when the simulation starts, and when we have like 500000 doubles instead of my 50...

Numsgil:

--- Quote from: Botsareus on November 30, 2010, 03:35:37 PM ---1.) What if you do not want the sim to continue in the same way?

--- End quote ---

Then you load the sim and change the seed.  If you really want to have a way to override the saved seed, maybe we can play with command line options?


--- Quote ---2.) What if your sim is running long enough that we run out of random numbers? If you can give me about how much 200 hours of simulation time (10 day limit) doubles it will take,  and how much ram we are consuming, then we go for it. Remember think big bc a robot with lots of dna will consume more 'randomizeddoubles' (new word  :P) when it mutates.

--- End quote ---

You can't run out of random numbers.  Random number generators just end up repeating if you go too long (known as the random number generator's "period").

I don't have performance specs, but random numbers are simple enough that I imagine you can generate tens of thousands to millions per second.  Since you'd only have to do that when you load the sim, I imagine it shouldn't add more than a second or two to load times.  Might be a reasonable way to get something working, anyway.


--- Quote ---My idea is to save a sim every minute. Then restart the sim knowing the seed if there is a crash or you need to turn off the PC. This may take a while but, If within that first minute the sim crashes then bingo: I know the seed and I can debug the sim for that minute through vb.

--- End quote ---

Sure, a reasonable enough goal.


--- Quote ---View point or Cameras:

Nice, but we need a fix now, so everyone is running the same simulation across all resolution ratios, especially if we go with the new randomizer idea.

--- End quote ---

The aspect ratio is a display bug only; it shouldn't affect the simulation at all.

Botsareus:

--- Quote ---The aspect ratio is a display bug only; it shouldn't affect the simulation at all.

--- End quote ---

It will not affect a simulation.

It will affect "the" simulation when you start a new one...

 :sleepin:
And I thought college will be the thing that will tire me out this week.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version