Chapter 1: What Does It Mean to Learn?
Have you ever wondered how you learned to do something really well? Maybe it was learning to ride a bike, or to tie your shoes, or to play your favorite video game. Think about it for a moment—what happened the very first time you tried? You probably fell down a few times with the bike, got the shoelaces tangled up, or couldn't figure out which button to press in the game. But then something amazing happened. You tried again. And again. And eventually, you got better! That's what learning is all about.
What Exactly Is Learning?
Learning is something we all do every single day, often without even thinking about it. Scientists and researchers who study how learning works have discovered that learning is essentially the process of making decisions, getting feedback about whether those decisions were good or not, and then improving over time based on that feedback. It's like having a conversation with the world around you—your brain sends out signals (decisions or actions), the world responds (feedback), and your brain adjusts (learning).
Let's break this down into simpler terms. Imagine you're playing a new video game for the first time. You press some buttons and see what happens. When you press the right button, your character jumps over an obstacle—success! When you press the wrong button, your character walks into a wall—failure. Both the success and the failure are giving you information. This information is called feedback, and it's the most important ingredient in learning.
The psychologist Edward Thorndike studied this exact phenomenon over a hundred years ago. He observed that when an action is followed by a satisfying result, the learner is more likely to repeat that action in the future. Conversely, when an action leads to an unpleasant result, the learner tends to avoid that action. Thorndike called this the Law of Effect, and it remains one of the foundational principles in understanding how all learning systems work—whether those systems are human brains, animal minds, or artificial intelligence.
The Three Essential Ingredients
Every single learning system in the universe—from the simplest bacteria to the most complex human brain, and from basic computer programs to sophisticated artificial intelligence—shares three essential ingredients. These three things must be present for any kind of learning to occur.
The first ingredient is observation. Before you can learn anything, you need to be able to perceive and understand what's happening around you. When you look at the world, you gather information through your senses—your eyes see colors and shapes, your ears hear sounds, your skin feels textures. This information is the raw material that your brain uses to understand the situation and figure out what might be happening.
The second ingredient is action. Once you have observed what's going on, you need to do something about it. You make a choice and take action. You might decide to walk forward, press a button, say a word, or think a thought. The action doesn't have to be physical—it can be mental too, like deciding which problem-solving strategy to try. But there must be some kind of action or decision for learning to happen.
The third ingredient is feedback. After you take an action, you need to find out what happened as a result. Did your action work? Did it fail? Was it good or bad? Feedback tells you whether you made the right choice, and this information is what allows you to adjust and improve. Without feedback, you would never know if your actions were helping you or hurting you—you would just be guessing in the dark.
These three ingredients work together in a continuous cycle that never stops. You observe, you act, you get feedback, and then you start again with your new and improved understanding. This cycle is sometimes called the learning loop, and understanding it is the key to understanding how learning works in every system imaginable.
Meet the Agent and the Environment
Scientists who study learning often use two special words to describe what's happening: agent and environment. These words help them talk about learning in a way that applies to all kinds of different situations.
An agent is simply the learner—the thing that is doing the observing, acting, and learning. You are an agent! A dog learning tricks is an agent. A robot learning to navigate a room is an agent. Even a computer program learning to play chess is an agent. The agent is the "decision maker" that takes in information from the world and decides what to do.
The environment is everything else—the world that the agent is interacting with. The environment includes all the things that the agent can observe, all the possible actions the agent can take, and all the consequences that follow from those actions. The environment is like the playing field where learning happens.
The beautiful thing about these concepts is that they apply to so many different situations. Let's look at a few examples to see how agents and environments show up everywhere.
The Child on the Playground
Imagine a young child playing on a playground for the first time. This is a perfect example of an agent-environment system, and it helps us understand all the pieces of learning.
The child is the agent. The child can observe many things—the bright blue sky, the green grass, the colorful playground equipment, the sounds of other children playing. The child can take many actions—walking, running, climbing, jumping, asking questions. And the child can receive feedback from all these actions—when you climb up the ladder, you get higher and can see more; when you jump off the swing, you land on the soft wood chips; when you push too hard on the merry-go-round, it spins too fast and makes you dizzy.
Now, what happens when the child first tries to climb the jungle gym? At first, the child might not know which bars to grab, which direction to move, or how to coordinate arms and legs. The child observes the bars and the height. The child takes an action—maybe reaching for a bar that's too high. The feedback comes quickly—the child doesn't reach it, and maybe even falls back down a little. That's feedback! Now the child knows that particular bar was too high.
So the child tries again, maybe grabbing a lower bar this time. Success! The feedback tells the child that lower bars work better. The child is already learning, even after just one or two tries. Over time, through many observations, actions, and feedback cycles, the child gets better and better at climbing. Eventually, the child can climb all the way to the top without even thinking about it.
The Musician Learning a Song
Think about learning to play a musical instrument. You're the agent, and the environment includes your instrument, the music you're trying to play, the room you're in, and even the sound of your own playing.
When you first try to play a new song, you observe the notes on the page (or the way your teacher plays it). You take an action by pressing keys or drawing the bow or blowing into the mouthpiece. And then you receive feedback—the sound that comes out tells you whether you played the right note or the wrong note, whether you played it too loudly or too softly, whether it sounded smooth or choppy.
This feedback loop continues endlessly as you practice. Each time you play a note, you get information. Each time you adjust based on that information, you get better. This is exactly why musicians spend so many hours practicing—the more you go through this observe-act-feedback cycle, the more you learn.
The Self-Driving Car
Even machines can be agents that learn! A self-driving car is an agent. The car has cameras and sensors that let it observe the road, other cars, pedestrians, traffic lights, and signs. The car takes actions—it can steer, accelerate, and brake. And the car receives feedback—it can tell if it stayed in its lane or drifted, if it stopped safely or