Genetic Algorithm Tutorial

In this section titles Algorithmic Intelligence, we explores some of the features of Machine Learning (ML) and Artificial Intelligence (AI). Both AI and ML have strong connotations which have varied definitions and usages. All the talk of AI, ML and Data Science is rooted in algorithms, hence the name Algorithmic Intelligence. This tutorial gets you started on a journey to discover what exactly AI and ML are, what is happening behind the scenes. It is done, hopefully, in a fun, entertaining and visual way to help you understand the mechanisms involved so that you can develop your own journey.

Module C

Module C is a bit more challenging, it is looking at a type of Reinforcement Learning through the use of Genetic Algorithms. The algorithm we will be using is a Neural Evolution approach which means that we put a neural network in a car and a bird respectfully. We allow them to reproduce and over time we select the ones that perform best according to their fitness scores.

Module C Unit #1 coding snippets part 4 (p5.js)

These snippets will help you when you are working through the next set of units for neuroevolution smart cars and flappy bird game.

Module C Unit #2 introduction to genetic algorithms

Although we will be using a neural network which means that it is a neural evolution approach, the fundamentals are based on genetic algorithms where we select the fittest and mate them to reproduce a better next generation. This is offers a bit more explanation.

Module C Unit #3 smart cars

This is the first example where cars are given their own brain and through a process of selection chase a target that is moving randomly according to perlin noise. They don’t know that they are meant to do that but only that they are rewarded for doing so.

Module C Unit #4 bird brain

In this example we create a simple version of the famous Flappy Bird game and then give the bird a brain. Then using a neuroevolution approach allow successive generations to play the game until a bird can navigate the pipes without hitting them.