Skip to content
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

Open
boothby opened this issue Apr 30, 2024 · 1 comment
Open

Incorrect formula for mutation size #53

boothby opened this issue Apr 30, 2024 · 1 comment

Comments

@boothby
Copy link

boothby commented Apr 30, 2024

In mutateNormal, the mutation_range is handled strangely; the resulting formula is originalValue-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 be originalValue + (random() - 0.5) * mutation_range so that the resulting distribution stays centered at originalValue when unclamped.

@opyate
Copy link

opyate commented May 16, 2024

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.

Screenshot from 2024-05-16 14-06-13

Another run: 18 our of 20 cars are exactly the same.

Screenshot from 2024-05-17 13-31-08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants