-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect formula for mutation size #53
Comments
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.The text was updated successfully, but these errors were encountered: