https://github.com/corentinth/smartrockets-geneticalgorithm
Genetic Algorithm to find optimal path for rocket to take.
https://github.com/corentinth/smartrockets-geneticalgorithm
genes population smart-rockets smartrockets-geneticalgorithm
Last synced: 6 months ago
JSON representation
Genetic Algorithm to find optimal path for rocket to take.
- Host: GitHub
- URL: https://github.com/corentinth/smartrockets-geneticalgorithm
- Owner: CorentinTh
- License: mit
- Created: 2017-09-21T19:50:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-04T08:38:25.000Z (about 8 years ago)
- Last Synced: 2025-02-13T11:35:23.116Z (8 months ago)
- Topics: genes, population, smart-rockets, smartrockets-geneticalgorithm
- Language: JavaScript
- Homepage: http://divers.corentin-thomasset.fr/smart-rockets/
- Size: 673 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SmartRockets-GeneticAlgorithm

Try it: [live demo](http://divers.corentin-thomasset.fr/smart-rockets/).
## Description
A population of rectangle learn to reach a goal (the circle at the top) over time. A basic Genetic algorithm is used to make the population evoluate. The best performing rectangles have more chance to see their "genes" in the next generation.If a rectangle reach the goal, it has 10 times more chance to be in the next generation. In the rectangles that have reached their goals, the quicker ones has also 10 times more chances to be in the newt generation. On the other hand, a rectangles that dies on an obstacle has 10 less chance to be part of the next genration than one that dies due to timeout.
Rectangles have a chance of mutating, which causes them to acquire a new, completely random set of genes. That why they will always be some rectangles that deviate from the trajectoire. It permits to optimize the path to reach the goal.
## Credit
Made with [p5.js](https://p5js.org/) and inspired by [The Coding Train](https://github.com/CodingTrain/Rainbow-Code) lesson.