Show how to use basic functions to write custom EA by hand
jakobbossek opened this issue · 3 comments
So far we force the user to plugin all his components into the control objects and pass both the objective function and the control object to our main entry point. However, despite doTheEvolution
being quite flexible, it cannot (and will never) be able to cover all possible scenarios. Thus, we should provide an example of how to build an EA by hand with all the helper functions of ecr.
Principally we need to export all functions which form the main loop of doTheEvolution
.
Moreover, we should change some function calls.
- it should be necessary to call evaluateFitness after offspring generation by hand. Otherwise there is no possibility to evaluate, e.g., a surrogate model of the fitness function instead.
- There should be a lot of helper functions for the central optimization state object.
However, we should stick to the usage of the control and opt.state objects.
Exported a lot of internal functions and added example on how to implement a basic EA loop without doTheEvolution
.
Done (see inst/examples/custom_ea_loop.R)