Large Programs

Home / Start Here

Start Here

What Is Machine Learning? The Idea Behind Modern AI

Machine learning means computers find patterns in examples instead of following hand-written rules. A worked spam example, the three main types, a short history and the limits.

27 November 2026 · 4 min read

Machine learning is the idea behind most of the AI you meet today. Instead of a programmer writing every rule, the computer is shown examples and works out the pattern for itself.

Rules versus learning

Two boxes: a traditional program takes rules and data to give answers; machine learning takes data and answers to find rules.

Two boxes: a traditional program takes rules and data to give answers; machine learning takes data and answers to find rules.

Take spam email. The old way is to write rules by hand: "if the message contains these words, mark it as spam". The trouble is that spammers change their words, and nobody can write enough rules.

The machine learning way is to collect thousands of emails that people have already marked as spam or not spam, and let a program find which features (certain words, odd links, strange senders) tend to go with each label. The result is a model: a set of numbers that turns a new email into a guess. Nobody wrote the rules. They came out of the data.

Wikipedia's definition says machine learning is about statistical algorithms that can learn from data and generalise to unseen data, so they can perform tasks without being explicitly programmed. The key words are unseen data. A model that only remembers its examples is not much use.

A more precise definition

Tom Mitchell's definition, from his 1997 book Machine Learning (McGraw-Hill) and quoted in university course notes, says a program learns from experience E for a task T, measured by performance P, if its performance at T, measured by P, improves with E. In the spam example: the task is sorting email, the experience is the labelled emails, and the performance is how many new emails it sorts correctly. If the score goes up with more experience, the program is learning.

Training and testing

To check that a model has really learned, people keep some examples back. The model trains on one set, then is tested on examples it has not seen. If it does well on the training set but badly on the new ones, it has been overfitting, memorising rather than learning. Our lesson on overfitting shows this with a picture.

Three common types

  • Supervised learning: examples come with answers, such as emails labelled spam or not spam. See supervised learning.
  • Unsupervised learning: the computer finds structure in data without labels, such as groups of similar customers. See unsupervised learning.
  • Reinforcement learning: a program learns by trying things and getting rewards. See reinforcement learning.

A short history

  • 1959: Arthur Samuel, an IBM employee and pioneer of computer games and AI, coined the term "machine learning". His 1950s checkers program calculated each side's chance of winning.
  • 2012: AlexNet, built by Alex Krizhevsky, Ilya Sutskever and Geoffrey Hinton, scored much better in the ImageNet image-recognition contest and helped deep neural networks spread.
  • 2013: Tomas Mikolov and colleagues introduced word2vec, a way of learning numerical representations of words.
  • 2016: AlphaGo became the first program to beat a professional human Go player on a full-size board without a handicap, using deep neural networks and reinforcement learning.
  • 2017: Ashish Vaswani and colleagues introduced the Transformer, the design behind today's chatbots.

Machine learning is not the same as AI

Deep learning is a subset of machine learning, which is itself a subset of artificial intelligence. Wikipedia notes that since the late 2000s and early 2010s machine learning has become so dominant in AI that the two terms are often used interchangeably, even though they are not synonymous. Older AI used hand-written rules, as in expert systems.

Where large language models fit

LLMs are first trained to predict the next word in a large amount of text. The text itself supplies the right answer, because the next word is already known. See how LLMs learn.

The limits

A model is only as good as its data and its test. Wikipedia warns that models trained on biased or poorly checked data can give skewed or unwanted predictions, which can harm people. Our page on AI bias gives examples. A good habit with any machine learning claim is to ask: what data was it trained on, and how was it tested on examples it had not seen?

Sources