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.
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: pre-trained 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: transformers
Module C the world thinks that AI is just Large Language Models (LLM‘s) such as ChatGPT, Gemini or Claude. Although many would claim (including myself) that it is not Artificial Intelligence but more like a stochastic parrot, guessing the next word in a sequence based on probability. However, it can still be very useful and is very powerful in its own right. These models are proprietary, they cost a lot of money because they are enormous. The alternative is to use what are called Small Language Models (SML‘s). These are smaller, free (open source) and work in your browser. They are still powerful and useful. The ones we will look at use the Transformers.js library which works brilliantly with p5.js.
Module C Unit #1 introduction to transformers
This introduces you to transformer.js, a library that works with p5.js in your browser.






















