# Genetic algorithms

**URL:** https://discourse.julialang.org/t/genetic-algorithms/18792
**Category:** General Usage
**Created:** [December 18, 2018, 10:15am UTC](https://discourse.julialang.org/t/genetic-algorithms/18792 "2018-12-18T10:15:52Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [December 18, 2018, 10:15am UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/1 "2018-12-18T10:15:52Z")

</div>

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:

> **[GitHub - WestleyArgentum/GeneticAlgorithms.jl: A lightweight framework for...](https://github.com/WestleyArgentum/GeneticAlgorithms.jl)**
>
> A lightweight framework for writing genetic algorithms in Julia - GitHub - WestleyArgentum/GeneticAlgorithms.jl: A lightweight framework for writing genetic algorithms in Julia

> **[GitHub - wildart/Evolutionary.jl: Evolutionary & genetic algorithms for...](https://github.com/wildart/Evolutionary.jl)**
>
> Evolutionary & genetic algorithms for Julia . Contribute to wildart/Evolutionary.jl development by creating an account on GitHub.

[https://wallacejl.readthedocs.io/en/latest/](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:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/e/be6b04591f5ced13f2167a7ee6f006d3b77104f8.png)

Thanks!

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

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [December 18, 2018, 10:51am UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/2 "2018-12-18T10:51:07Z")

</div>

Have you seen BlackBoxOptim.jl? It doesn’t have GA, but other [nice algorithms](https://github.com/robertfeldt/BlackBoxOptim.jl#existing-optimizers). 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.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [December 18, 2018, 10:54am UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/3 "2018-12-18T10:54:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [December 18, 2018, 12:29pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/4 "2018-12-18T12:29:19Z")

</div>

NLopt.jl has some genetic algorithms.

---

<div class="post-metadata">

### Author: ![robertfeldt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertfeldt/32/239_2.png) [@robertfeldt](https://discourse.julialang.org/u/robertfeldt)
#### Post date: [December 18, 2018, 12:44pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/5 "2018-12-18T12:44:00Z")

</div>

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:

[https://github.com/robertfeldt/BlackBoxOptim.jl/issues/108](https://github.com/robertfeldt/BlackBoxOptim.jl/issues/108)

Cheers!

---

<div class="post-metadata">

### Author: ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)
#### Post date: [December 18, 2018, 1:13pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/6 "2018-12-18T13:13:26Z")

</div>

I’ve just uploaded by CMA-ES prototype:

> **[GitHub - jonathanBieler/CMAES.jl: Optim.jl compatible CMAES](https://github.com/jonathanBieler/CMAES.jl)**
>
> Optim.jl compatible CMAES. Contribute to jonathanBieler/CMAES.jl development by creating an account on GitHub.

Not sure it works on v1.0 though.

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [December 18, 2018, 1:32pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/7 "2018-12-18T13:32:23Z")

</div>

> [@essenciary](#):
>
> none of them seem to have been updated lately

[GitHub - wildart/Evolutionary.jl: Evolutionary & genetic algorithms for Julia](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?

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [December 18, 2018, 4:10pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/8 "2018-12-18T16:10:29Z")

</div>

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 [Effects of Genetic Algorithm Options - MATLAB & Simulink](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.

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [December 18, 2018, 4:17pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/9 "2018-12-18T16:17:32Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [December 18, 2018, 4:27pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/10 "2018-12-18T16:27:32Z")

</div>

Have you checked the tests? [Evolutionary.jl/test at master · wildart/Evolutionary.jl · GitHub](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?

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [December 18, 2018, 4:44pm UTC](https://discourse.julialang.org/t/genetic-algorithms/18792/11 "2018-12-18T16:44:12Z")

</div>

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