Gradivex
  • Home
  • Academy
  • Arena
  • Visualizer
  • Models
Log in
AI Fundamentals/How Machines Learn/Lesson 1

What is machine learning?

Module 2 · Lesson 1 of 5 · 8 min read
Theory

Training is not a mystery. It's a loop.

Last lesson landed on this: the AI predicts based on patterns baked into its weights by training. But we never opened up what "training" actually does, we just used the word. Let's open it, before we put any more vocabulary on top.

Forget neural networks and billions of parameters for a second. Every machine learning system, from the simplest to the most advanced, runs the exact same three-step loop: pick a task, define a way to measure how wrong the current guess is, then adjust some internal number so the guess gets a little less wrong, using data.

You're about to run that loop yourself, by hand, on a problem small enough to see clearly, before we put a name on any of it.

Interactive

You be the training algorithm

Four apartments. You know their size. You're guessing their price using one number: price per square meter. Drag the slider, watch your error, find the best number you can, then lock it in.

Predict apartment prices from size

40 m²you: €40kactual: €115k
60 m²you: €60kactual: €170k
90 m²you: €90kactual: €255k
120 m²you: €120kactual: €330k
Avg error: €140.0k
€1k / m²€5k / m²
Theory

That's it. That's training.

What just happened: you had a task (predict price from size), a score (how far off you were), and you nudged one number based on data until the score improved. That, in its entirety, is what "training a model" means.

The only differences in a real system: instead of one number, there can be billions of them (weights, same word from last lesson). Instead of a human dragging a slider, an algorithm computes exactly which direction to nudge every single number, automatically, and repeats it millions of times. Instead of 4 hand-picked apartments, there might be trillions of examples.

Mechanism identical. Scale different. This is why last lesson's "prediction machine" got that way, through exactly the loop you just ran with your own hand.

Theory

"Machine learning" is not one thing, it's three

Everything above described HOW a number gets adjusted. It didn't say WHERE the "how wrong are you" signal comes from. That's the one detail that splits machine learning into its three families, and it's the single most useful distinction you can learn about ML.

  • Supervised learning: for every example, the correct answer already exists, and the system is trained to match it. (The apartment exercise you just did was exactly this, you had the real price for every example.)
  • Unsupervised learning: no correct answer is given at all. The system just looks for structure, groups, patterns, similarities, hidden in raw data. Nobody tells it what the groups should be.
  • Reinforcement learning: still no per-example correct answer, but there IS a signal, a reward or penalty, that shows up after the system takes an action. It learns from consequences, not from matching a known answer.
Interactive

Where does the feedback come from?

Same question for every scenario: is there a correct answer already attached to the data, no answer at all just structure to find, or a reward that shows up after acting?

A spam filter trained on millions of emails that humans already tagged as spam or not spam.

An online store groups its customers into segments based on purchase behavior, without ever being told what the segments should be.

A robot learns to walk by trying different movements and getting a small reward every time it moves forward without falling.

A model learns to recognize handwritten digits using thousands of images, each already tagged with the correct digit.

A chess AI improves by playing millions of games against itself, with no human telling it which individual moves were correct.

An astronomer feeds raw star-brightness data into an algorithm that finds groups of similar stars, with no categories defined in advance.

0/6 chosen
Theory

One mechanism, three signals, and now you can tell them apart

You now have the map: the same underlying loop (task, score, adjustment via data), but three different sources for that score signal.

Recognizing which one is at play resets your intuition instantly. No labels? Expect the system to be discovering categories, not "knowing" ones. A reward involved? Expect trial-and-error behavior, not instant correctness.

Next lesson goes deep on the first and most common of the three: supervised learning, the exact mechanism you already practiced by hand, this time with the real vocabulary the field uses: features, labels, loss.

Takeaway

What you learned

  • ✓Machine learning is always the same loop: a task, a way to score how wrong the guess is, and adjusting internal numbers using data to shrink that score.
  • ✓"Training": from one slider to billions of weights, is exactly that loop, run at massive scale and speed by an algorithm instead of a human hand.
  • ✓The three learning paradigms differ only in where the "how wrong" signal comes from: labeled correct answers (supervised), no labels at all, just structure (unsupervised), or a reward that arrives after acting (reinforcement).
  • ✓The apartment exercise you did by hand was, technically, supervised learning, you had the ground truth for every example.
Mentor-0

Stuck on something in this lesson? Ask.

0/1000

Every lesson is free to read. Log in to save your progress, complete lessons, and earn Compute and XP.

Log in free
Supervised learning
Gradivex

Understand AI from the inside, read it, see it, prove it.

Platform

AcademyVisualizerRoadmapsModels

Community

DiscordLeaderboard

Company

PrivacyTerms

© 2026 Gradivex. All rights reserved.