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

Built in operator support #30

Open
orhanbalci opened this issue Feb 7, 2018 · 4 comments
Open

Built in operator support #30

orhanbalci opened this issue Feb 7, 2018 · 4 comments

Comments

@orhanbalci
Copy link

Hi there.
It would be nice to have pluggable crossover and mutation operators and implementations of well known operators.

@m-decoster
Copy link
Owner

Could you give an example of what you would like to see?

@orhanbalci
Copy link
Author

User should be able to use same phenotype implementation with different crossover or mutation operators. With the current state of the library one should write separate phenotype implementations for each operator.

@m-decoster
Copy link
Owner

m-decoster commented Feb 11, 2018

I understand where you're coming from. Implementing this feature could potentially impact the API of the library a lot, and in my opinion (feel free to disagree or persuade me otherwise) is better suited for a version 2.0 of the library (see also #23).

In the meantime, I just pushed an example (7e2b959) of how you can work around this in a fairly ergonomic manner.

I would gladly implement your suggestion, but I don't think I'll find the time to do it very soon.

@orhanbalci
Copy link
Author

You are right. This would require API breaking changes. One implementation idea is to use associated types for these operators.

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

No branches or pull requests

2 participants