What happens when we bring the foundations of artificial intelligence to an 8-bit machine? This book takes a learning-by-building approach: write the algorithms, observe their results and understand the decisions behind each program. BASIC turns ideas into instructions that can be followed, changed and run on a Spectrum, a Spectrum Next or an emulator.
The journey begins with AI history and a practical question: how to make the most of a computer with limited memory and speed. Comparing sorting algorithms and measuring their execution times prepares the ground for expert systems, an ELIZA-inspired chatbot and a tic-tac-toe player using Minimax and alpha-beta pruning.
Knowledge then moves from rules to data. Linear regression works with real CO₂ measurements; k-NN and Naive Bayes classify role-playing characters; k-means discovers groups without labels. The perceptron and multilayer networks take learning as far as digit recognition, explaining weights, errors, activation functions and backpropagation.
The Game of Life closes the book with another kind of complexity: behavior emerging from simple rules, without training. Complete listings and experiments invite readers to change parameters and see what happens. The narrative can be followed from beginning to end, with the code available whenever a closer look is useful; the programs are also available in the book’s repository.