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

Graph GA "reproduce" operations seem to modify parent mol objects #11

Open
AustinT opened this issue Aug 3, 2021 · 0 comments
Open

Comments

@AustinT
Copy link

AustinT commented Aug 3, 2021

After playing around with this code as a starting point for my own GA algorithm, I think that the reproduce function of the graph GA modifies the parent mol objects, so that the parent mols will actually change over time, which shouldn't happen. Here are the lines where the bug happens, although I'm not sure exactly which part has the error:

new_child = co.crossover(parent_a, parent_b)
if new_child is not None:
new_child = mu.mutate(new_child, mutation_rate)

As a simple fix, for my own purposes I'm storing the SMILES strings instead of the mol objects, but as my code is a heavily modified version of the graph GA algorithm here I can't be bothered to make a PR at the moment. Thought I would just post this here if anybody encounters a similar issue in the future.

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

1 participant