Closed GiggleLiu closed 4 years ago
I like the idea to isolate algorithm step as a separate function. It is long overdue and pave the way to a parallel implementation. The iterator interface is logical continuation of this idea, but I still would prefer one optimization call to a loop.
It would be appreciated if both interfaces are implemented. ‘One call’ is simple, and ‘iterator’ is flexible enough to support call back supports and complex break condition. Both interfaces are straightforward if an isolated step function is available.
See version 0.4.0, and some dev notes in docs
This is a very neat repo for evolutionary algorithms! I really like it, but please allow me to give two advices to make the interface better
these changes have practical importances
populate!
be a function like in PR #26 can help people implement parallelism (e.g. MPI) much easier. Let functions short is helpful to open issues #15 and #2 , so that people can overload shorter functions likeselect(::ProblemType, current_population, current_fitness)
to custom the strategies of selecting parents, orgenerate(::ProblemType, parents)
to generate new generation in bounds.call_back
function, many people want to inspect their program during optimization, and iterator provides full access to the runtime information.iterations
,tol
andverbose
, because people can decide when to break the program intuitively inside a loop.See this PR for detail (this is a demo, not a real PR, a PR requires more discussion) https://github.com/wildart/Evolutionary.jl/pull/26