Workshop code to teach GAs the hacker way
This is a repo for a workshop to show hackers how they might use a simply GA in a small project, such as when taking part in a hackathon. Feel free to check it out and take a look, everything should be well documented but if anything is unclear let me know.
There are two folders, a before and after.
The before code makes a set of 10 random spirograph images and cycles through them when you press any key.
The after code forces you to input a number between 1-9 but after the 10th image will apply a GA to create a new (and improved) population of images.
In both cases to run open the index.html file in your browser of choice (so long as it support JS and you allow the JS to run on the site).
This project used the P5 library to draw the graphics to screen + provide util functions such as a random number generator. Learn more about p5 here: https://p5js.org