POV-Ray : Newsgroups : povray.general : Going nuts: racetrack optimization : Going nuts: racetrack optimization Server Time
8 Aug 2024 06:18:36 EDT (-0400)
  Going nuts: racetrack optimization  
From: Greg M  Johnson
Date: 21 Feb 2001 08:50:13
Message: <3A93C62B.F8828CAE@my-dejanews.com>
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!

--------------------
LONG VERSION:
----------------
#declare years=0;
#while(years<1750)
1. declare my 7 PARAMETERS as random variables
2. initialize positions and velocities of actors.
3. Run a race where I count the number of crashes as per
     #if (cars get too close)
     #declare carcrash=carcrash+1;
     #end
4.  #if (carcrash<1)
     write to file my 7 parameters plus current value of carcrash
     #end
#declare years=years+1;
#end

So as you can see, I try 1750 different combinations of variables and
store the ones with zero crashes to a file. Then I open the file to read
the combinations of parameters that give zero crashes. I then paste one
of these data sets back into the car race file (replacing step 1
above).  I run the simulation (effectively trying the perfect conditions
1750 times if I were to let it run all day.)  I GET CRASHES!

Going nuts.


Post a reply to this message

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