Skip to content

JsGA is a simple example on how to optimize a multimodal function by using a canonical Genetic Algorithm implemented with JavaScript

License

Notifications You must be signed in to change notification settings

altinodantas/jsga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JsGA

is a simple example on how to optimize a multimodal function by using a canonical Genetic Algorithm implemented with JavaScript. The algorithm performs over the Function F6, which is formally defined as:

with the follow landscape:

By considering above information, optimize function F6 consists of finding values for x and y that archive the mininal score for z, i.e, f(x,y).

Characteristics

  • Solution is represented as a binary vector with 44 bits, 22 for each variable x and y;
  • One-point crossover;
  • Bit flip mutation;
  • Parents selection based on a tournament between k individuals;
  • Merging population and offspring based on total ranking;

Parameters

The page presents some parameters through which one may notice their impact in the algorithm behavior. Such parameters and their default values are:

  • Population size: 100
  • Mutation rate: 0.05
  • Crossover rate: 0.80
  • Maximal of generations: 200
  • K-tournament: 3

External libs

About

JsGA is a simple example on how to optimize a multimodal function by using a canonical Genetic Algorithm implemented with JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published