# Three ways to learn · AI in Bed

Beginner level · 5 min · https://www.aiinbed.com/learn/beginner/three-ways-to-learn

*Learning with answers, learning without answers, and learning by trial and error.*

Not every problem comes with an answer key. Depending on what data you have, machine learning comes in three main flavours.

*Figure: Supervised learning has labels, unsupervised finds structure on its own, reinforcement learns from rewards.*

### Supervised learning

Every example comes with the right answer, called a **label**. Photo → "cat". House details → price.

Predicting a category is **classification**. Predicting a number is **regression**.

Most practical ML today is supervised.

### Unsupervised learning

No labels at all. The model looks for **structure** by itself.

Example: grouping customers into types by shopping habits (**clustering**), without anyone saying what the types are.

### Reinforcement learning

An **agent** takes actions in an **environment** and gets **rewards** or penalties.

No one tells it the right move; it learns which actions pay off over time. This is how AlphaGo learned to beat world champions at Go.

**Quick check:** You have 50,000 photos of skin spots, each labelled by a doctor as harmless or worrying. Which kind of learning fits?

A. Supervised
B. Unsupervised
C. Reinforcement
D. None, you need rules

Answer: A. Each example has a label (the doctor's verdict), so this is supervised classification.

### Self-supervised: the secret behind chatbots

A clever trick: make labels out of the data itself. Hide the next word of a sentence and ask the model to guess it.

The internet becomes one giant answer key. This is how large language models are pre-trained.

**Quick check:** A robot learns to walk by trying moves and getting points for staying upright. That's…

A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. Clustering

Answer: C. Actions + rewards + trial and error = reinforcement learning.

**Key takeaways**

- Supervised: learn from labelled examples (classification or regression).
- Unsupervised: find hidden structure without labels.
- Reinforcement: learn actions from rewards.
- Self-supervised: make labels from the data itself, which is how LLMs pre-train.

**Go deeper (free sources)**

- [Elements of AI, chapter 4: Machine learning](https://www.elementsofai.com/) by University of Helsinki & MinnaLearn
- [Kaggle Learn: Intro to Machine Learning](https://www.kaggle.com/learn) by Kaggle
