Open boothby opened 2 months ago
Not sure if this is related, but something seems off with the simulation. After a while, a whole bunch of the cars seem to share the exact genes, so much so, that you can't make out individual profiles further down the track (they're all interacting the exact same way with the environment with regards to their wheel size, wheel mass, body shape, etc) - in other words, half the cars look like one car.
Another run: 18 our of 20 cars are exactly the same.
In
mutateNormal
, themutation_range
is handled strangely; the resulting formula isoriginalValue-0.5 + random() * mutation_range
(clamping omitted for clarity). The result of this is that when mutation_range is small, every mutated value is reduced to the range [0, mutation_range] within a couple of generations. A more appropriate formula would beoriginalValue + (random() - 0.5) * mutation_range
so that the resulting distribution stays centered atoriginalValue
when unclamped.