Trial-and-Error Learning

Trial-and-error learning is improvement of behavior by trying actions, observing which are followed by good or bad consequences, and making the rewarded ones more likely in similar situations. It is the simplest form of learning from consequences, requiring no teacher who supplies the right answer, only a signal about how things turned out. The idea runs from animal psychology in the 1890s through early cybernetic machines in the 1950s to reinforcement learning, which is now a central branch of machine learning.

Edward Thorndike gave the principle its classic form. In his 1898 monograph Animal Intelligence: An Experimental Study of the Associative Processes in Animals, he placed hungry cats in puzzle boxes and recorded how long each took to escape by operating a latch. The cats did not show sudden insight; they made varied movements, and the time to escape declined gradually as the successful action became stamped in. He later formulated this as the law of effect: responses followed by satisfaction become more strongly connected to the situation, and those followed by discomfort become weaker. B. F. Skinner extended it from the late 1930s as operant conditioning, using an apparatus now called the operant chamber and studying how schedules of reinforcement shape behavior.

Engineers soon asked whether a machine could do the same. Claude Shannon built Theseus around 1950 at Bell Laboratories, a relay-driven magnetic mouse that explored a maze rearranged by the operator, remembered the route that worked, and on later runs went directly to the goal; he described it at the Macy cybernetics conference in 1952. In 1951 Marvin Minsky and Dean Edmonds built the SNARC, the Stochastic Neural Analog Reinforcement Calculator, using about forty adaptive units made from vacuum tubes and motors, with connection strengths strengthened when a simulated rat in a maze did well. These were small demonstrations, but they established that reward-driven adaptation could be mechanized.

From cats to machines
1898: Thorndike puzzle boxes
Escape times fall gradually; the law of effect follows
1938: Skinner's operant conditioning
Reinforcement schedules shape behavior
c. 1950: Shannon's Theseus
Relay mouse learns a maze by exploring
1951: Minsky's SNARC
Reinforced adaptive units drive a simulated rat
MENACE (Michie, 1961): tic-tac-toe in matchboxes
One box per board position
Beads of different colors stand for legal moves
Draw a bead to choose a move
Common colors are drawn more often
After the game, adjust
Add beads for a win, remove beads for a loss
Reinforcement learning (Sutton and Barto)
Value estimates and policies learned from reward over many trials

Donald Michie's MENACE made the mechanism visible with household objects. Around 1961 he built the Matchbox Educable Noughts And Crosses Engine at Edinburgh: a set of matchboxes, one for each distinct board position the machine could face, each holding colored beads that represented the possible moves. To move, the operator shook the relevant box and drew a bead; after a game, beads were added to boxes visited in games the machine won and removed after losses. Over a few hundred games the machine played markedly better. MENACE also dramatizes the credit assignment problem, which Minsky named in his 1961 paper Steps Toward Artificial Intelligence: a single outcome at the end must be divided among many earlier decisions.

Reinforcement learning is the mathematical descendant, with Richard Sutton and Andrew Barto as its main textbook authors. Their 1998 book Reinforcement Learning: An Introduction (second edition 2018) treats an agent interacting with an environment, receiving rewards, and learning a policy that maximizes cumulative reward. Key milestones include Sutton's 1988 temporal-difference learning, which learns from the difference between successive predictions, and Chris Watkins' 1989 Q-learning, which learns the value of actions without a model of the world. The approach reached public attention with Gerald Tesauro's TD-Gammon in the early 1990s, DeepMind's Atari player in a 2015 Nature paper, and AlphaGo in 2016; Sutton and Barto received the ACM Turing Award for their contributions.

The central difficulty is the trade-off between exploring new actions and exploiting known good ones. An agent that always repeats its best-known action never discovers better ones, while an agent that explores too much wastes effort. Rewards can also be delayed and sparse, which is why credit assignment remains hard, and a badly specified reward invites behavior that scores well but misses the intent. The same logic is at work in modern language models, where human preference feedback is used to fine-tune behavior in the approach called reinforcement learning from human feedback, associated with a 2017 paper by Christiano and colleagues on learning from human preferences.

Three misconceptions recur. Trial and error does not mean random flailing forever; learners use accumulating evidence and, in modern systems, models and priors to cut the number of trials. Reward is not the same as supervised correction: the learner is told how well it did, not what it should have done. And the human analogy is partial: Thorndike's law of effect describes only one slice of animal learning, and psychology later added insight, imitation and cognitive maps that simple reward models do not capture.

Read trial-and-error learning as learning by consequences: act, see what follows, and shift toward what worked, a loop that runs from a cat in a puzzle box to matchboxes of beads to systems that learn whole games from reward.

Take trial-and-error learning further

Ask the copilot about this term, or have our engineers assess it against your process.