In the last lesson, we learned that AI is software that learns from experience. But how does that actually work? How does a machine go from knowing nothing to recognising your face or recommending your next favourite song?
Let's explore the secret behind smart software.
Every machine learning system follows the same basic cycle:
Think of it like learning to cook. You follow recipes (data), notice what works (patterns), try your own variations (predictions), taste the result (feedback), and adjust the seasoning next time (improvement).
Google's AI for detecting spam email processes over 10 million suspicious messages every minute. Each time a user marks something as "spam" or "not spam," the system learns and updates its patterns - getting smarter with every click.
The most common type of machine learning is called supervised learning. It works exactly like studying with a teacher who gives you the answers.
Here's how it works:
Imagine you show the machine 100,000 emails. Each one is labelled either "spam" or "not spam" by humans.
The machine notices patterns:
After studying enough examples, it can look at a brand new email it's never seen and predict whether it's spam - without anyone writing specific rules.
Supervised learning depends on labelled data - someone has to provide the correct answers for the machine to learn from. Who do you think labels all that data? In many cases, it's thousands of human workers carefully tagging images, text, and audio. The "intelligence" of AI often starts with a lot of human effort.
What does 'supervised learning' mean in machine learning?
What if you don't have the answers? What if you just have a big pile of data and you want the machine to find interesting patterns on its own?
That's unsupervised learning. There's no teacher, no labels, no correct answers. The machine explores the data and groups similar things together.
Imagine a supermarket has purchase data for millions of customers, but no labels. The AI analyses the data and discovers natural groups:
Nobody told the machine these groups existed. It found them on its own by spotting patterns in the shopping data. The supermarket can now send each group relevant offers.
How does unsupervised learning differ from supervised learning?
The third type is reinforcement learning, and it works a lot like training a dog.
When a dog sits on command, you give it a treat (reward). When it chews your shoe, you say "no" (penalty). Over time, the dog learns which behaviours lead to treats and which lead to trouble.
Reinforcement learning works the same way:
Google's AlphaGo learned to play the ancient board game Go by playing millions of games against itself. Each win was a reward; each loss was a penalty. It tried wild strategies, learned from failures, and eventually became better than any human player in history.
The same approach is used to train robots to walk, teach self-driving cars to navigate, and optimise energy use in data centres.
AlphaGo played over 30 million games against itself during training. A human playing one game per day would need about 82,000 years to play that many games. The AI compressed all that experience into just a few weeks.
| Type | Has Labels? | Analogy | Example | |------|------------|---------|---------| | Supervised | Yes | Studying with an answer key | Spam filters, medical diagnosis | | Unsupervised | No | Sorting a messy drawer | Customer grouping, anomaly detection | | Reinforcement | No (uses rewards) | Training a dog with treats | Game AI, robotics, self-driving cars |
Think about how you learned to ride a bicycle. Was it supervised (someone told you exactly what to do), unsupervised (you figured out balance on your own), or reinforcement (you fell, adjusted, and tried again)? Most human learning is actually a mix of all three. AI learning styles are inspired by how we learn ourselves.
Which type of machine learning is most like training a pet with treats and commands?
You don't need to be a mathematician or programmer to understand machine learning. At its core, it's about learning from experience - something every human does naturally from the day they're born. AI just does it with data instead of life experiences.
Now that you understand how machines learn, the next lesson reveals the AI that's already in your pocket. Your smartphone is packed with intelligent features - let's uncover them.