Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1.08 KB

File metadata and controls

23 lines (15 loc) · 1.08 KB

My first genetic algorithm made in vanilla javascript

Remember game Pong? Now we can watch how genetic algorithms can handle it!

Genetic algorithm's short explanation from wikipedia:

In computer science and operations research, a genetic algorithm (GA) is a metaheuristic inspired by the process of natural selection that belongs to the larger class of evolutionary algorithms (EA). Genetic algorithms are commonly used to generate high-quality solutions to optimization and search problems by relying on biologically inspired operators such as mutation, crossover and selection.

Ui params explanation:

  • Generation - stands for number of reproduction
  • Best fitness - best score in it's generation
  • Worst fitness - worst score in it's generation
  • Average fitness - average fitness from whole population
  • Best ball hit - the best number of the number of balls to be bounced
  • Mutation ratio - chance for mutations for a single unit in the population

Live

https://patryk-rozwadowski.github.io/genetic-algorithm-toy-in-javascript/

Todo:

  • Create some blocks to be destroyed with ball