|
![](/i/fill.gif) |
On Wed, 21 Feb 2001 08:44:11 -0500, "Greg M. Johnson"
<gre### [at] my-dejanews com> wrote:
>I published scene files for a race track simulation. I changed the code
>to try an optimization of the parameters related to braking, steering,
>acceleration, etc. and ran into a problem that I do NOT understand.
>Here's pseudo code:
>
>----------------
>SHORT VERSION:
>-----------------
>LOOP: evaluate randomized parameters: if give desired results write to
>file, if bad try next set
>OPEN file of good parameters, insert to program, find that the code now
>give undesired results: tells me I have three car crashes!
If you're using random numbers in the simulation you'll need to use a
repeatable sequence of random numbers. Right now you grab random
numbers beginning at the position in the sequence where you left it in
the previous simulation and thus doesn't get the same sequence when
you try the same initial variables in a later run.
Erkki
Post a reply to this message
|
![](/i/fill.gif) |