Genetic algorithms


#1

I was wondering if anybody worked on/with GA implementations in Julia lately. I found three packages, but none of them seem to have been updated lately:



https://wallacejl.readthedocs.io/en/latest/

Can anybody recommend a good GA package? Ideally, one which can also plot the solutions (I need it for a job-shop problem solver). Otherwise, for plotting, I’m thinking of using a plotting package to render some stacked bars. The end result should look like:

Thanks!

Any help appreciated – otherwise it looks like it’s gonna be MATLAB for this one :unamused:


#2

Have you seen BlackBoxOptim.jl? It doesn’t have GA, but other nice algorithms. There are also simulated annealing, particle swarm and Nelder-Mead of Optim.jl. PyCall.jl and MATLAB.jl are also options if you want to explore other languages through Julia.


#3

Thanks! BlackBoxOptim.jl looks great, I didn’t know about it. However, I am required to use GA.


#4

NLopt.jl has some genetic algorithms.


#5

Developer of BlackBoxOptim.jl (BBO) here (so slightly biased). Depends on what you mean with GA, BBO has Differential Evolution (DE) which is an Evolutionary Algorithm, like GA. BBO is geared towards optimizing Float64-based vectors though so if you need to optimize Int’s it is not the most natural choice, but see:

Cheers!


#6

I’ve just uploaded by CMA-ES prototype:

Not sure it works on v1.0 though.


#7

https://github.com/wildart/Evolutionary.jl was updated four months ago and is passing tests on Julia 1.0, does it have to be updated more recently?


#8

Thanks @robertfeldt. I’m looking for a “textbook” GA implementation, covering: population generation, parent selection, crossover, mutation, selection (fitness measure) and termination criteria. In the line of https://www.mathworks.com/help/gads/examples/genetic-algorithm-options.html. It’s for an assignment so I don’t have wiggle room in regards to the choice of algorithms.


#9

Yes, I noticed. I was wondering/hoping that anybody can recommend other packages as Evolutionary doesn’t have docs and it does not seem to be actively developed.


#10

Have you checked the tests? https://github.com/wildart/Evolutionary.jl/tree/master/test

They seem to be quite good examples, and lack of development might indicate that the package is mature and working well?


#11

Good idea with the tests, I haven’t thought about checking them. Yeah, some nice use cases, this might be just the thing :+1: