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

Simplify create_new_parent_population in mu_plus_lambda #170

Conversation

jakobj
Copy link
Member

@jakobj jakobj commented Jul 1, 2020

Seems like this function can be significantly simplified. I don't think there's a danger of sharing references, as each offspring is created via clone, which avoid specifically that.

@jakobj jakobj added the maintenance Fighting the second law label Jul 1, 2020
@jakobj jakobj added this to the 0.2.0 milestone Jul 1, 2020
@jakobj jakobj requested a review from mschmidt87 July 1, 2020 20:35
@jakobj jakobj changed the title Simplify create_new_parent_population in mu_plus_lambda Simplify create_new_parent_population in mu_plus_lambda Jul 1, 2020
cgp/ea/mu_plus_lambda.py Show resolved Hide resolved
@mschmidt87
Copy link
Member

Actually, it seems that without this PR, the tracking of lineage of individuals across the evolution made possible via #167 and #168 , would not be possible, because in the current implementation, we are cloning individuals to create a new parent population which would destroy the provenance tracking. Right?

@jakobj
Copy link
Member Author

jakobj commented Jul 3, 2020

Actually, it seems that without this PR, the tracking of lineage of individuals across the evolution made possible via #167 and #168 , would not be possible, because in the current implementation, we are cloning individuals to create a new parent population which would destroy the provenance tracking. Right?

yes, this is true. of course only if we don't copy the idx in the clone operation. ;)

@jakobj jakobj force-pushed the maint/refactor-create-new-parent-pop branch from f1837ea to 1348a3c Compare July 3, 2020 17:26
Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@mschmidt87 mschmidt87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mschmidt87 mschmidt87 merged commit 2fce8bd into Happy-Algorithms-League:master Jul 4, 2020
@jakobj jakobj deleted the maint/refactor-create-new-parent-pop branch July 5, 2020 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Fighting the second law
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants