Algorithmic Intelligence 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.
Coding Language
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).
Machine Learning Library
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.
Programme of Study
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.
Module A: This modules takes you through the steps of building a variety of simple models
Module B: Introducing some pretrained models we can use them for powerful creative effect
Module C: Using Genetic Algorithms how we can use a Neural Evolution in different scenarios
Table of Contents
- Algorithmic Intelligence Tutorial
- Coding Language
- Machine Learning Library
- Programme of Study
- Table of Contents
- Module A
- Module A Unit #1 introduction to AI
- Module A Unit #2 introduction to p5.js
- Video #1: web editor
- Video #2: buttons
- Video #3: the default
- Video #4: files
- Module A Unit #3 introducing ml5.js
- Module A Unit #4 code snippets part 1 (p5.js)
- A template
- Module A Unit #5 linear regression
- Module A Unit #6 sine wave regression
- Module A Unit #7 mouse gesture
- Module A Unit #8 code snippets part 2 (p5.js)
- Module A Unit #9 cluster classification
- Module A Unit #10 cluster regression
- Module A Unit #11 colour predictor
- Module A Unit #12 pixel predictor
- Module A Unit #13 how to save and load
- Module B
- Module C
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 #5 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
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
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 #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.






















