pabloduque0 / genetic_algo_scratch

Simple genetic algorithm to optimize real functions of multiple variables from scratch in Julia.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

genetic_algo_julia

Simple genetic algorithm to optimize real functions of multiple variables from scratch in Julia.

Algorithim parameters are given in algo_inputs.txt:

  • num_generations
  • population_size
  • number_genes
  • variable_range_low
  • variable_range_high
  • function_param: Functions available are sphere and schwefel.

Results examples:

Graphs on the left show fitness average on population and on the right fitness maximum.

Schwefel function

Sphere function

Demo

You can simply run genetic_algo.jl

Make sure you make any changes you would like according to plotting your results.

About

Simple genetic algorithm to optimize real functions of multiple variables from scratch in Julia.


Languages

Language:Julia 100.0%