DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.87k stars 1.13k forks source link

Implement elitism #682

Closed leocus closed 1 year ago

leocus commented 1 year ago

I implemented the possibility to add elitism in algorithms.eaSimple by using a new attribute of the toolbox ("replacement"), whose operators are defined in tools/replacement.py

EyalWirsansky commented 1 year ago

Any idea why this was not merged? was there any feedback?

leocus commented 1 year ago

Nope, no feedback at all

EyalWirsansky commented 1 year ago

Nope, no feedback at all If you would like to further discuss this issue between us, please connect with me on LinkedIn (just search for my name).

leocus commented 1 year ago

Can't message you, I sent you a connection request!

fmder commented 1 year ago

I'm not in favour of modifying the base algorithms. The modo of DEAP is to force users to open the box and implement their own algorithms (which I'm very happy you did!).

Small comment, in the replacement function you are comparing fitnesses to individuals.