POV-Ray : Newsgroups : povray.general : Going nuts: racetrack optimization : Re: Going nuts: racetrack optimization Server Time
8 Aug 2024 06:17:05 EDT (-0400)
  Re: Going nuts: racetrack optimization  
From:
Date: 22 Feb 2001 16:47:41
Message: <3a957eec.1511200@news.povray.org>
On Wed, 21 Feb 2001 08:44:11 -0500, "Greg M. Johnson"
<gre### [at] my-dejanewscom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.