Trial and error is learning by trying something, seeing what happens, and keeping what works. It is one of the oldest ideas in psychology, and it reaches well beyond the classroom, from how babies learn to talk to how science itself makes progress.1Pakistan Journal of Social Sciences. Karl Popper on Science and Pseudo Science
Where the Idea Came From Thorndike’s Cats
Around 1900, psychologist Edward Thorndike put cats into boxes that opened only when they pulled a loop or a lever. A trapped cat does what cats do on instinct: it bites the bars, scratches, and paws at anything within reach.2Journal of the Experimental Analysis of Behavior. Thorndike’s Puzzle Boxes and the Origins of the Experimental Analysis of Behavior Eventually, by accident, a paw pulls the loop and the door swings open. The urge to pull loops grows stronger from then on, while useless urges like scratching the bars fade.3Journal of the Experimental Analysis of Behavior. Thorndike’s Puzzle Boxes and the Origins of the Experimental Analysis of Behavior
Put the cat back in and it escapes a little faster. Over many repeated tries the escape time keeps shrinking, with no sign of a sudden insight. Early attempts are long and messy, full of random actions, and each success shortens the next one a bit. A cat that had reasoned out the latch would drop its escape time suddenly and stay low after the first success. Thorndike saw times shrink slowly and unevenly over many trials. The box was also built so the cat could not see how the mechanism worked.
Thorndike argued the cat was not reasoning its way out. Learning linked what the cat saw, such as the loop, directly to an action, such as clawing it.4Journal of the Experimental Analysis of Behavior. Thorndike’s Puzzle Boxes and the Origins of the Experimental Analysis of Behavior He preferred the phrase “trial and success,” since the successes are what get stamped in.5Journal of the Experimental Analysis of Behavior. Thorndike’s Puzzle Boxes and the Origins of the Experimental Analysis of Behavior His core idea was that actions followed by good results get repeated.
Thorndike’s idea shaped the psychology that followed. It moved attention from thoughts to actions and their consequences, and it laid groundwork for reward-and-punishment training of pets and children.
How the Brain Learns From Mistakes
The brain’s dopamine cells react to rewards only when the reward differs from what was expected. A better-than-expected result triggers a burst of activity, an expected one triggers no change, and a worse one makes activity dip.6PubMed Central. Dopamine reward prediction error coding The pattern appears in monkeys, rodents, and humans.7PubMed Central. Dopamine reward prediction error coding In a task learned by trial and error, these cells tracked the difference between the current reward and the average of recent rewards.8PubMed Central. Midbrain dopamine neurons encode a quantitative reward prediction error signal So the brain keeps a running estimate of what to expect and updates it after each try.
The update is a nudge, not a replacement. After each outcome, the brain moves its expectation toward what just happened. That is why one lucky or unlucky try shifts your view only a little, while a run of similar results shifts it a lot.
Suppose a new café turns out better than you expected. The positive gap marks it as worth returning to, and you become more likely to go back. If your usual dish comes out worse than expected, the negative gap lowers its value in your mind, which makes you more likely to try something else. When a result matches what you expected, the gap is near zero and there is almost nothing to update.
Dopamine is often called the pleasure chemical, but it tracks surprise about rewards, not pleasure itself. An expected treat produces little dopamine response.
A second region handles changing course. An area at the front of the brain picks up errors, feedback, and clashes between competing choices.9PubMed. Anterior cingulate cortex and adaptive control of brain and behavior In rats with this area damaged, accuracy dropped and switching to a new response took longer.10PubMed Central. Anterior cingulate cortex is necessary for adaptation of action plans In people, the region predicts how demanding the next task will be.11PubMed Central. Human Dorsal Anterior Cingulate Cortex Neurons Mediate Ongoing Behavioral Adaptation When demands stay steady it speeds you up, and when they change it slows you down so you get things right.12PubMed Central. Human Dorsal Anterior Cingulate Cortex Neurons Mediate Ongoing Behavioral Adaptation People often pause briefly after an error, which reflects the brain moving into a more careful mode.
Trial and Error in Bodies and Movement
Much trial and error happens with no conscious thought at all. The body fine-tunes movements through an error-driven process.13PubMed Central. Understanding sensorimotor adaptation and learning for rehabilitation The brain compares the movement it predicted with what it felt, and shrinks the gap.14PubMed. Human sensorimotor learning: adaptation, skill, and beyond Rewarding successful movements is a separate route the brain uses to learn skills.15PubMed. Human sensorimotor learning: adaptation, skill, and beyond Rehabilitation after injury or stroke builds on these same processes.16PubMed Central. Understanding sensorimotor adaptation and learning for rehabilitation
You have probably felt this process. When you switch to an unfamiliar mouse or keyboard, your hand overshoots or misses at first, because the brain’s prediction does not match what you feel. Each miss gives the brain an error to shrink, so movements usually feel natural again within minutes or hours. Going back to your old device can briefly feel wrong, and that awkwardness shows the brain had recalibrated to the new setup.
The two routes work differently. The first works from the mismatch between predicted and felt movement, which is how you fix a reach that lands off target. The second works from reward, where successful attempts get repeated even if you cannot say why they worked. Real skills like learning to throw usually draw on both, which is part of why practice with feedback helps.
The immune system has its own version. Immune cells adapt to new germs by randomly mutating their antibody genes.17PubMed. Somatic hypermutation Because the changes are random, most make antibodies worse rather than better.18PubMed Central. Regulated somatic hypermutation enhances antibody affinity maturation The body keeps the rare improvements and discards the rest, a biological trial and error. The process has a cost, since the deliberate DNA changes can sometimes stray into other genes and contribute to cancer.19PubMed Central. Regulated somatic hypermutation enhances antibody affinity maturation No thinking or intention is involved: variation is produced at random and then filtered by results.
Why Children Explore and Adults Stick to What Works
Psychologists separate exploration and exploitation: trying new options versus sticking with what already pays off. In one study, three- and four-year-olds chose all options about equally, switching almost every turn toward the ones they had tried least recently.20PubMed Central. Exploration, exploitation, and development: Developmental shifts in decision-making Adults overwhelmingly chose based on past rewards and rarely explored.21PubMed Central. Exploration, exploitation, and development: Developmental shifts in decision-making Exploring shows up in language too: babies learn new speech sounds when caregivers respond directly to their babbling.22PubMed. Social feedback to infants’ babbling facilitates rapid phonological learning
At home, exploring looks like a toddler pressing every button on a remote, running many small experiments to find out what each one does. These trials add up to a map of how the world works, built from direct testing instead of instruction. Letting safe experiments happen supports that learning, while steering children away from every unknown option cuts it short.
Exploring often teaches more. Playing it safe can lead a learner to wrong conclusions about how things work.23PubMed. Children are more exploratory and learn more than adults in an approach-avoid task You never test the options you avoided, so you never find out what they would have done. Preschoolers and young school children explored more than adults and learned the true setup better.24PubMed. Children are more exploratory and learn more than adults in an approach-avoid task Adults can borrow the habit when old habits may not apply, such as a new job, city, or hobby, or when a familiar option stops delivering.
Trial and Error as the Engine of Science
Philosopher Karl Popper described science as essentially trial and error.25Pakistan Journal of Social Sciences. Karl Popper on Science and Pseudo Science Competing theories are tested as harshly as possible, and the ones that fail are dropped.26Wikipedia. Karl Popper Weeding out errors does for science what natural selection does for living things.27Wikipedia. Karl Popper28Pakistan Journal of Social Sciences. Karl Popper on Science and Pseudo Science
That is why a failed experiment still counts. Ruling out an idea narrows the search, so the next guess is chosen from a smaller set of possibilities. A result that disproves a theory can be more informative than one that fits, because many different theories can fit the same result. Scientists therefore design tests that could prove them wrong, since a test that cannot fail teaches little.
Popper’s view means a theory is valued for surviving serious attempts to refute it, not for collecting agreeing examples. A scientific claim stays open to revision, because surviving so far is not the same as being proven forever.
Trial and error works wherever the answer can’t be worked out in advance.29Journal of Information Science and Engineering. Adapting Crossover and Mutation Rates in Genetic Algorithms Even hummingbirds adjusted their territory size until their daily weight gain peaked.30web.stanford.edu. What Is Trial and Error? Science and Psychology
When Trial and Error Works Best and When It Doesn’t
Different problems call for different thinking. Step-by-step problems rely on the ability to hold and juggle information in mind.31European Journal of Cognitive Psychology. Working memory demands in insight versus analytic problem solving Problems solved by sudden insight relied more on short-term memory for words.32European Journal of Cognitive Psychology. Working memory demands in insight versus analytic problem solving
Trial and error is the right tool when mistakes are cheap and quickly visible, as in cooking or adjusting software settings. It also suits cases with no manual or known rule, where nobody can tell you the answer. Fast feedback after each try is what makes it efficient, because each attempt then teaches you something.
Avoid it when mistakes are dangerous or costly, as with medicines or wiring. Skip it too when the problem can be solved by thinking it through, or when feedback is slow or unclear, so errors teach little. Often the best approach combines the two: think first, then test the most promising option.
You can make guesses smarter. Change one thing at a time, so you know what caused any difference. Keep notes on what you tried, and stop repeating moves that already failed.
How Fear of Failure Blocks Learning
Fear of failure stops students from experimenting and having a go.33Critical Thinking Secrets. Why a fear of failure stops students from learning In workplaces where people feel safe, they risk mistakes to suggest new ideas.34PubMed Central. The role of error risk taking and perceived organizational innovation climate in the relationship between perceived psychological safety and innovative work behavior: A moderated mediation model Leaders who treat setbacks as lessons get more new ideas from staff.35Loeb Leadership. Psychological Safety at Work: Why Innovation Depends on It
A few habits lower the fear. Frame an attempt as an experiment, not a test of your ability. Start with small, low-stakes trials, so early mistakes cost little and confidence builds. After a mistake, review what it taught you, which turns the error into something usable. Praise effort and strategy, not just results, so people keep trying when outcomes are uncertain.
Therapy for social anxiety applies the same logic with planned experiments to test feared predictions.36PubMed Central. Does prediction error during exposure relate to clinical outcomes in cognitive behavior therapy for social anxiety disorder? A study protocol You write down what you expect to go wrong, try the situation, and compare the outcome with the prediction.

