https://github.com/scriptraccoon/evolution-of-points
Demonstration of an evolutionary algorithm
https://github.com/scriptraccoon/evolution-of-points
Last synced: over 1 year ago
JSON representation
Demonstration of an evolutionary algorithm
- Host: GitHub
- URL: https://github.com/scriptraccoon/evolution-of-points
- Owner: ScriptRaccoon
- License: mit
- Created: 2020-06-08T18:14:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-26T00:03:24.000Z (over 2 years ago)
- Last Synced: 2024-05-30T16:49:53.068Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Evolution of Points
This is a demonstration of an evolutionary algorithm.
Demo: https://rvfr9.codesandbox.io/

The blue points have to learn how to walk from the yellow circle to the green circle. When they reach obstacles like the gray rectangle in the middle, they die. They also die after a certain amount of time. The fittest points (with the least distance to the goal) produce the most offspring, which means that slowly the generation becomes better and better. When they have reached the goal, they also optimize the way to that goal, because the required distance actually also enters the fitness function.
The point with the largest fitness from the previous generation is drawn red. You can hide all other points by pressing the key 'o' (like opacity).
The rectangle class here also deals with moving rectangles: just change the vel-attribute and uncomment the update-function.
This project is inspired by [Code Bullet](https://www.youtube.com/channel/UC0e3QhIYukixgh5VVpKHH9Q/).