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

AbstractEvolutionEngine Design Coupling Issue #23

Open
hansinator opened this issue Mar 16, 2015 · 1 comment
Open

AbstractEvolutionEngine Design Coupling Issue #23

hansinator opened this issue Mar 16, 2015 · 1 comment

Comments

@hansinator
Copy link

Hi Dan,

I am am running into some design limitations of the EvolutionEngine classes. I'll try to explain my concrete problem to highlight the issue. My project requires a population of genetic programs to be run on a shared state such that all programs are executed in parallel for a couple thousand iterations before their fitness is known. Shared state access is done between the iterations and needs to be synchronized. The AbstractEvolutionEngine design can not support this, because it implements a different concurrency scheme. A program can not easily suspend the evaluation to let others execute until all have reached the synchronization point to do the shared state access and continue the evaluation. Apart from some ugly hacks to work around the problem a proper solution would require my own EvolutionEngine implementation to support my execution scheme. However, I would end up with a GenerationalSharedStateEvolutionEngine, SteadySharedStateEvolutionEngine and SharedStateEvolutionStrategyEngine. This suggests that the AbstractEvolutionEngine and its subclasses represent a coupling between the functionality needed to produce offspring and the execution scheme.
A more flexible approach that improves reusability would be to implement the different nextEvolutionStepmethods using a strategy pattern rather than the template method pattern. If you agree to this I could implement the necessary changes and send you a pull request.

@virl
Copy link

virl commented Jan 31, 2017

Also see #29

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