DEV Community

Joshua
Joshua

Posted on

Lunar Lander Simulation

Hey! I recently made an implementation of the NEAT algorithm in JavaScript! It's an evolutionary algorithm originally introduced in 2002 by Kenneth O. Stanley and Risto Miikkulainen in their paper Evolving Neural Networks Through Augmenting Topologies.

This basically allowed me to make some cool visual demos showcasing how AI learns which can all run in the browser!

If you want to learn more about the project, or see this and more simulations in action, you can look at the GitHub repo! https://github.com/joshuadam/neat-javascript
Or the full website: https://neat-javascript.org

If you want to learn more about the algorithm I highly recommend reading the original paper or watching a youtube video explaining everything! It is called the NEAT (Neuroevolution of Augmenting Topologies) algorithm.

It is a beautiful algorithm that is quite easy to follow and understand, it is based on evolution. The algorithm starts off with tiny networks, and slowly adjusts and grows these networks. Adds nodes, connections, "mutate" weights etc.

It's very interesting to see this happening in real time.

The algorithm basically consists of:

  1. Generate AIs
  2. Evaluate the AIs and see how well they perform against a given problem
  3. Generate new AIs by "evolving" the best (expand upon, combine and make changes to them hoping they get better) and copy these into a new "generation"
  4. Go back to step 2 and repeat until a satisfactory solution has been found.

There is of course more to it but this is what it comes down to!

It is a very interesting and cool algorithm to me. Evolution has been a core aspect of our own development, it would only make sense to prove useful for Artificial Intelligence as well. It's awesome to see others feel the same!

Thank you!

Top comments (0)