Skip to content

pkacp/genetic_algorithm_oe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

genetic_algorithm_oe

Function optimizing with genetic algoritm, can optimize any function in any dimension, can search for minimum and maximum in given range. Implemented binary and real chromosomes.

Sample functions:

  • Levy function
  • Michalewicz function
  • Bukin function
  • Damavandi function

Parameters to configure:

  • Optimizing function
  • Searching value min or max
  • Chromosome representation RealChromosome or BinaryChromosome
  • Number of chromosomes in individual, corresponds with number of dimensions in function
  • Accuracy for BinaryChromosome
  • Range in which function optimum will be searching for. range_start and range_end
  • Number of epochs
  • Size of population
  • Selection type with proper parameter:
    • Roulette with number to select parameter,
    • By best value with number to select parameter,
    • Tournament selection with tournament size parameter
  • Chromosome crossover type depending on chromosome representation
    • Binary Chromosome
      • one point crossing
      • two points crossing
      • three points crossing
    • Real Chromosome
      • arithmetic crossing
      • heuristic crossing
  • Chromosome mutation
    • Binary Chromosome
      • one point mutation
      • two points mutation
      • three points mutation
      • border mutation
    • Real Chromosome
      • even mutatation
      • mutation by index change
  • Inversion operator only for Binary chromosome
  • Elite strategy with number parameter, keeping number of best individuals in whole evolution process.

Run

Run with main.py as console application or MainPage.py to run as window application.

Implementation

Chromosome representation and most calculations are implemented with numpy arrays.

About

Function optimizing with genetic algoritm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published