Skip to content

36 of 114 topics ready

Artificial Intelligence

A hands-on handbook that takes you from the mathematics underneath to transformers, robots and models on a phone. Every topic is explained in plain prose, built from scratch in Python and checked against the libraries used in practice.

12parts
36topics ready
114topics planned
215runnable examples

Twelve parts, one path

Start with the core, then branch out by interest.

FoundationsThe mathematics and classic algorithms every later part leans on: vectors and matrices, probability, derivatives and optimization, information theory and search.5 of 5 topics readyMachine learningClassical supervised and unsupervised learning, built from scratch and then checked against scikit-learn.13 of 13 topics readyData at scaleWhat changes when data no longer fits on one machine: the MapReduce model, distributed storage and compute, link analysis, pattern mining and recommendation.2 of 7 topics readyNeural networksFrom a single perceptron to a trained multilayer network, with backpropagation derived in full and then computed by hand and by code until the two agree.7 of 7 topics readySignal processingHow sound and images become numbers, how those numbers are cleaned up and compressed, and which of these ideas machine learning still relies on.1 of 7 topics readyComputer visionClassical image processing and geometry first, then convolutional networks and object detection, so the learned methods are seen against what they replaced.2 of 15 topics readyNatural language processingLanguage before transformers: text processing, statistical language models, classic classifiers, word representations and recurrent sequence models.0 of 10 topics readyTransformers and large language modelsAttention computed by hand, a small GPT trained from scratch, and the techniques that turn a pretrained model into a useful system: decoding, fine-tuning, preference tuning, retrieval and efficient inference.3 of 12 topics readyReinforcement learningLearning from rewards: Markov decision processes, tabular Q-learning worked by hand, deep Q-networks and learning to navigate.2 of 5 topics readyRoboticsMobile robots end to end: middleware, kinematics, sensing, localization, mapping and navigation.1 of 12 topics readyEdge AIRunning models where the data is produced: microcontrollers, gateways and phones.0 of 17 topics readyResponsible AIPrivacy, fairness, accountability and honest reporting, with code where code helps: re-identification risk, federated learning and measured rather than claimed results.0 of 4 topics ready

Inside every topic

Every topic has the same shape, so once you know one you can find your way around all of them.

Readable theoryPlain prose, with formulas and diagrams drawn as images.
From-scratch codeA package of small modules, one idea per file, fully commented.
Runnable examplesShort scripts, each showing one idea or one library comparison.
A sample projectAn end-to-end command line project on a realistic task.
A guided notebookA tour that imports the package and shows results inline.
TestsChecks for every worked example and every property the page claims.

Learning path

Start with the core and branch out by interest. Each part lists what it builds on.

How the parts of the handbook build on each other

Getting started

You need Python 3.11 or newer. The repository installs as one package, so every example and project script can import the topic it belongs to. Dependencies are grouped by subject in pyproject.toml, and each topic names the groups it needs near the top of its README.

With uv:

uv sync --group dev --group ml --group deep
uv run python neural-networks/backpropagation/examples/worked_step.py
uv run pytest

With pip 25.1 or newer:

python -m venv .venv
source .venv/bin/activate
pip install -e . --group dev --group ml
pip install torch --index-url https://download.pytorch.org/whl/cpu
python neural-networks/backpropagation/examples/worked_step.py
pytest