Daniel Li

Why doing the same work every day doesn’t make you better

Why doesn’t doing the same work day after day make you better? Why does a painful failure often carry more force than an ordinary success? What does human learning have in common with machine learning, and how can we borrow the way AI learns for ourselves?

Rewards and penalties in reinforcement learning

In reinforcement learning (RL), the thing we train is called an agent. An agent might be an AI that plays Go or a robot learning to walk. Based on its current state, the agent takes an action; the action changes the environment, which produces a new state. At the same time, the environment returns a number that reflects how good the action was: the reward. The agent uses this feedback to adjust the parameters of its neural network, known as its policy. Its ultimate goal is to earn the highest total score, the cumulative reward, over the long run.

Reinforcement-learning diagram: the agent takes an action on the environment, which returns a new state and a reward
The agent takes an action based on its current state. The environment returns the next state and a reward. Over repeated interactions, the agent learns to maximise cumulative reward.

A reward is, in essence, just a number. When the agent behaves as we hope, the reward is positive; the larger it is, the more generous the reward, and the more inclined the agent becomes to repeat that behaviour. When it does not, we impose a penalty, a negative number; the smaller it is, the harsher the penalty, and the harder the agent will try to avoid similar choices next time.

Put this way, reinforcement learning in a computer closely mirrors how people learn from the world. In a computer, though, the goal is plain to see: to approach a mathematical optimum through gradient descent, something that can be written down as numbers and formulas. But for us humans, what are we hoping “learning” will achieve? To answer that, we need to understand what learning is.

The brain is a prediction machine

The human brain is not a passive receiver but a prediction machine. Each of us carries a “mental model” of the world. Before you pick up a glass of water, your brain uses that model to estimate the glass’s weight, material and temperature, and sets your muscles accordingly. If the glass is as heavy as expected, the brain registers that nothing happened, and no learning takes place. If the glass is scalding, or surprisingly light, the brain notices at once that its model has made a wrong prediction. To remove this prediction error, it adjusts the strength of the connections between neurons. That is the essence of learning.

So real learning begins only when reality fails to match your expectations. That is why doing the same work day after day rarely makes you better: without error, the brain is on standby.

Go one level deeper, and a question follows. Why is the brain so tireless in trying to remove prediction error? What is it trying to reach?

In 1910, the return of Halley’s Comet became the focus of the world’s press. Scientists had found that the comet’s tail contained cyanogen, a highly poisonous gas. Modern science has since shown that the cyanogen in a comet’s tail is far less dangerous than the exhaust from a single car in a city, but at the time little was understood about such phenomena. Many people were gripped by panic, afraid the gas in the tail would poison the Earth or even wipe out humanity.

Fear comes from ignorance.

As astronomy advanced and knowledge of it spread, most people learned that Halley’s Comet is just a dusty ball of ice trailing a tail. When it returned again in 1986, people no longer felt uncertain about it, and few voices were raised.

For the brain, ignorance is the greatest unpredictability. Knowledge, by contrast, is compressed prediction: by turning unknown chaos into order we can understand, we fold the phenomena of nature into our mental model.

We learn to resist entropy

Still, we shouldn’t judge ourselves too harshly for disliking uncertainty. The trait goes back to ancestors who drifted in the ocean billions of years ago.

When an organism lives where nutrients, temperature and sunlight are comfortable and stable, it receives positive feedback: it keeps synthesising and reproducing. When the environment turns hostile, it receives severe negative feedback: its activity falls, and it may fall apart. Under so stark a system of rewards and penalties, organisms began to evolve (here meaning not single individuals but populations and groups of molecules). In a changing environment, fragile molecules disappeared, while stable ones suited to the environment survived and grew sturdier with each generation. Any ordered cluster of molecules that survived must have been able to lower its own internal entropy; otherwise it would have grown ever more disordered as the entropy around it rose.

As the most intelligent clusters of molecules on Earth today, we must be very good at shielding ourselves from the noise and turbulence of our surroundings. On one side, we use boundaries to keep outside uncertainty out: skin, cell membranes, the immune system. On the other, we use abstraction to compress outside complexity within: the nervous system, language, science, culture. Through a constant exchange of energy and information, we keep a low-entropy structure going in one small place. That is why evolution does not reward the strongest, but the systems best able to reduce surprise and raise predictability. Learning is not an ornament for acquiring knowledge. It is an instinct life has developed to keep itself going: in an uncertain world, it trades sharper predictions for more room to survive.

According to the free-energy principle in neuroscience, the ultimate goal of a living system is to reduce entropy, that is, to reduce surprise.

So when the brain turns unknown chaos into order it can understand, it removes the surprise a stimulus brings and lowers the entropy of the universe in one small place. That is the ultimate purpose of learning.

In other words, learning is turning unknown chaos into known order.

How to learn well, the way AI does

So how can we borrow this mechanism to learn more efficiently?

First, rethink failure: it is the richest source of information.

In machine learning, the larger the prediction error, the larger the gradient, and the more the model’s parameters are corrected. For people, success is often mixed with too much noise, with ability, luck and circumstance tangled together, so it is hard to draw useful information from it. Failure, especially painful failure, tends to point straight at a fundamental flaw in your mental model. Like a signal with a high signal-to-noise ratio, it forces the brain to break established connections and open new paths. Knowing that a road leads nowhere is itself valuable knowledge.

Second, keep the system running on small wins.

Failure points the way, but constant setbacks push the brain into learned helplessness, like a robot that stops acting altogether after being punished again and again. Good learners therefore design their feedback loops: between hard challenges, they slip in small tasks that confirm their existing model. These expected successes release dopamine, strengthen neural pathways and supply the psychological energy to keep learning.

Finally, and most importantly, look for surprises you can resolve.

The brain dislikes the boredom of the fully known and cannot bear the chaos of the fully unknown. It craves the sweet spot in between, which the psychologist Daniel Berlyne described with an inverted-U curve. The best learners are not those who never fail, which would mean they never test their limits, nor those who fail again and again, which would mean they never correct course. They are those who manage prediction error well. They deliberately put themselves slightly out of control, with enough unknown to prompt correction and enough known to give security and a sense of achievement.

And so all human learning, however varied its forms, arrives at the same place:

the athlete refining a shot is removing the error between movement and perception;

the scientist revising a theory is removing the error between understanding and fact;

the philosopher resolving a paradox is removing the error between one belief and another.

We are all doing the same thing: fitting ever finer models to a complicated world.

Learning, in the end, is the solemn effort of finite living beings to hold out against the entropy of the universe. Each time we remove a prediction error, we turn outer chaos into inner order. And in that process, amid the flood of impermanence, we find an anchor for the meaning of our own existence.