Algorithmic Intelligence Tutorial
Algorithmic Intelligence 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.
The coding language used is p5.js. This is a JavaScript library that lends itself to creative and visual coding. This is very people friendly and can be used by anyone of any age and skill set. It is web based, that means that you don’t have to download anything, you can do all this in your browser. It is also free to use and doesn’t require any sign up unless you want to save your work (recommended).
To enhance the learning we need a machine learning library to handle all the maths and heavy lifting. You can build a machine learning model from scratch but why re-invent the wheel. for this we use ml5.js which as the name suggests is also a JavaScript library that dovetails beautifully with p5.js.
To get started I will take you step by small step through the process. I will include short videos as well as downloadable pdfs. They are free to use as you wish, either have them on a separate monitor (tablet or smartphone for instance) or print them off.
Each unit is a separate unit of work, with a specific focus. The modules are collections of units that have a similar focus. It is expected and assumed that you have worked through each unit of each module as next one often builds on the previous one. If you jump ahead you may miss some key elements that could be significant.
The pace you go at will depend on your abilities, skill and experience. So feel free to go as fast as you want or as slow as you feel. I would recommend doing some each day to build up memory muscle, the more you do the better you become and the more intuitive it becomes. also play, experiment, try to break it, enhance it, change something and see what happens. This is the best way to learn.
Introduction
This first section is important. especially if you are new to this. Take the time to read them, also watch the videos, they are quite short (5 mins-ish). These will give you the background necessary to tackling the units to come.
An Exploration of p5.js
To access this tutorial you will need a basic understanding what p5.js is and also how the web based editor and all its buttons and settings work and benefit you.
Videos
video #1: how to start using the editor
video #2: some of the buttons used in the editor
video #3: looking at the editor in a little more detail
video #4: creating a new file

Module A
Building a model
Module A is where we start our journey, work through each unit and I recommend that you don’t skip a unit. The coding snippets have been kept as brief as possible so that when you are working through the AI units you have some understanding of p5.js while attempting to grasp the concepts of AI. This module uses ml5.js and explores some simple examples that will demonstrate key features.
Module A Unit #2 Linear Regression
In this first unit we plot points for a straight line with some variance (randomness). The neural network (ml5.js) will be trained on these data points and will approximate to the line. This is a regression task where you will train it on some synthetic data and then predict the outcome.

Module B
Pretrained models
Module B looks at some pretrained models which means that they have done all the hard work of collecting the data and training the models. The reason for this module is that you can use these pretrained models to develop other applications and creative endeavours. It is also quite fun.
Module C Neuro Evolution
Module C is a bit more challenging, it is looking at Reinforcement Learning through the use of Genetic Algorithms. The algorithm we will be using is a neuro 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 #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.




















