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

Elitism doesn't work as it should #5

Open
leshchenko1979 opened this issue Feb 16, 2020 · 2 comments
Open

Elitism doesn't work as it should #5

leshchenko1979 opened this issue Feb 16, 2020 · 2 comments

Comments

@leshchenko1979
Copy link
Contributor

Originally discussed at #4 (comment)

After introducing elitism which pushed bestHuman from the previous generation as the first element of the new one, I would expect the first human in the list always to have the score not worse than the best score of the previous generation. However, it's not happening.

I blamed it on the motorNoise but after reducing it to zero the incorrect behavior of the system still persisted.

Can it be some floating point errors? Any bugs in BOX2D?

@adityathebe
Copy link
Owner

adityathebe commented Feb 17, 2020

I am suspecting it's due to the variance in the time the creatures actually start to walk in each new generation.

The creatures spawn in the air (little bit above the ground). While it's in the air it starts moving. It's not guaranteed that in the next generation the best creature will start moving in the exact same position. This inconsistency, while small, can have multiplying effect I think.

A solution would be to first let the creatures settle down and then make them walk so that the seed environment remains consistent.

I am not sure if I made that concise 😕

@leshchenko1979
Copy link
Contributor Author

leshchenko1979 commented Feb 17, 2020

Understood.

But why should there be a variance if every human in every generation is initialised at config.initialPosition.x and config.initialPosition.y?

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