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

A Little Issue #1

Open
Cherifi-Houdaifa opened this issue Jul 22, 2022 · 1 comment
Open

A Little Issue #1

Cherifi-Houdaifa opened this issue Jul 22, 2022 · 1 comment

Comments

@Cherifi-Houdaifa
Copy link

https://github.com/codewmax/neat-chrome-dinosaur/blob/169846d256d570b8141d4192f5b8739c52bdb634/main.py#L136

I Think you should move that line up before appending the genome to the List

@MartinKlefas
Copy link

I made the same mistake as you have here: Genomes are mutable, so any changes to the genomes effect the "version" in the list as well as the one in the wild. it's all the same genome - it's similar to "pass by reference" vs "pass by value" in other programming languages.

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