Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 45 ยท Learning and Conditioning

Operant conditioning: how consequences shape behavior

Understand operant conditioning from Thorndike's cats to Skinner's schedules: reinforcement, punishment, shaping and extinction, with simulations you can run.

Classical conditioning explains why a cue can trigger a reaction. It does not explain why a dog learns to sit, why a child learns to say "please," or why you check your phone so often. Those behaviors are not reflexes triggered by cues. They are actions the learner produces, and their fate depends on what follows.

This is the territory of operant conditioning: learning in which the consequences of a behavior change how likely it is to happen again. The word "operant" comes from B. F. Skinner and means a behavior that operates on the environment to produce an effect.

What you will learn

  • Thorndike's law of effect and Skinner's operant chamber.
  • The four consequences: positive and negative reinforcement, positive and negative punishment.
  • How shaping builds new behaviors and how extinction removes them.
  • The four basic reinforcement schedules and the pattern each produces.
  • What the research says about the side effects of punishment.

Key terms

Law of effect: behaviors followed by satisfying results are more likely to be repeated; behaviors followed by unpleasant results are less likely.

Reinforcement: any consequence that makes a behavior more likely.

Punishment: any consequence that makes a behavior less likely.

Shaping: reinforcing successive approximations until the target behavior appears.

Schedule of reinforcement: the rule that decides which responses are reinforced.

From puzzle boxes to Skinner boxes

In 1898 Edward Thorndike put hungry cats in "puzzle boxes" with a latch that opened the door. Food waited outside. The cats clawed and pushed around at random until they happened to hit the latch. With repeated trials they escaped faster and faster. Thorndike concluded that responses followed by a satisfying outcome become more strongly connected to the situation. He called it the law of effect.

B. F. Skinner, working from the 1930s, refined this with the operant chamber, popularly the "Skinner box": a cage with a lever or key and a food dispenser. Machinery recorded each press as a step on a cumulative graph, so the rate of responding could be studied with great precision. Skinner argued that behavior is best explained by its history of consequences, and that the mind need not be invoked. That claim is debated, but the method is very productive and is still used in laboratories and animal training.

The four consequences

Four cards: positive reinforcement, negative reinforcement, positive punishment and negative punishment
Two questions sort every consequence: is something added or removed, and does the behavior go up or down?

The names are confusing until you notice two separate questions.

  1. Is something added (positive) or removed (negative)?
  2. Does the behavior increase (reinforcement) or decrease (punishment)?
Consequence What happens Effect on behavior Everyday example
Positive reinforcement Something pleasant is added Increases A teacher praises a clear answer, so the student speaks up more
Negative reinforcement Something unpleasant is removed Increases Putting on a seatbelt stops the warning chime, so you buckle sooner next time
Positive punishment Something unpleasant is added Decreases A speeding ticket reduces speeding
Negative punishment Something pleasant is removed Decreases A teenager loses gaming time after breaking a rule

Two cautions. First, negative reinforcement is not punishment. It strengthens behavior by taking away something aversive. Second, whether a consequence reinforces depends on the learner. Praise reinforces most children, but a teenager embarrassed in front of friends may find it aversive. The definition is about the effect on behavior, not the intention.

Shaping and extinction

How do you train a pigeon to turn in a circle, when it will not do so on its own? You cannot wait for the whole behavior to appear. In shaping, you reinforce any movement in the right direction, then require a bit more, and so on, rewarding successive approximations. Skinner and his students trained pigeons, rats and even dogs by shaping; animal trainers use the same method with dolphins and service dogs. People use it too: a parent praises a toddler's first sounds and later only words.

If reinforcement stops entirely, the behavior declines. This is extinction. Often there is an extinction burst, a temporary increase in the behavior and in frustration before it fades. Spontaneous recovery can occur here as well, just as in classical conditioning.

Schedules of reinforcement

Reinforcing every response (continuous reinforcement) is the fastest way to teach a behavior, but behavior learned this way dies out quickly when rewards stop. Reinforcing only some responses (partial reinforcement) produces behavior that is slower to learn and much harder to extinguish. This is the partial reinforcement extinction effect.

Schedule Rule Typical pattern Example
Fixed ratio (FR) Reward after a set number of responses High rate, pause after reward Paid per batch of 10 items
Variable ratio (VR) Reward after an unpredictable number of responses Very steady, high rate, resistant to extinction Slot machines, social media refresh
Fixed interval (FI) First response after a set time is rewarded Speeds up near the end of each interval Checking the oven near the end of baking time
Variable interval (VI) First response after an unpredictable time is rewarded Slow, steady Checking for an email that arrives at random times
Idealized cumulative records of fixed ratio and variable ratio responding
A cumulative record climbs with every response. Fixed ratio shows pauses and bursts, variable ratio a steady steep line.

Variable-ratio schedules help explain why gambling and certain app designs are so compelling: you never know which attempt will pay off, so every attempt feels worth making. Recognizing this pattern is a useful form of media literacy.

Punishment: what the evidence says

Punishment can quickly suppress a behavior, but it has limits.

  • It tells the learner what not to do, not what to do instead.
  • Its effects depend on being immediate, consistent and clearly tied to the behavior.
  • It can cause fear, avoidance of the punisher, and aggression. Research on physical punishment of children, including Elizabeth Gershoff's 2002 review of many studies, links it to poorer outcomes. Most of this evidence is correlational, so it cannot prove cause alone, but major pediatric and psychological organizations still advise against it.
  • Reinforcing a desired alternative behavior is typically more effective and has fewer side effects.

This course gives general educational information and not parenting or clinical advice.

Beyond rats and pigeons

Operant ideas are used in applied behavior analysis, in classroom management, in token economies, and in the design of habit and fitness apps. Critics note that rewards can sometimes reduce interest (see the overjustification effect in Chapter 7), and that Skinner's refusal to talk about mental states leaves out expectations and goals. Animals also have limits: Keller and Marian Breland found that raccoons trained to drop coins into a box started rubbing the coins together, a drift toward natural foraging behavior. Biology constrains what can be shaped.

Common misconceptions

"Negative reinforcement means punishment." No. Reinforcement raises behavior, even when it works by removing something unpleasant.

"Reward always works." Rewards work when they are valued, timely and clearly connected to the behavior. Poorly chosen rewards can reduce motivation.

"Skinner thought people were just rats." Skinner believed the same principles apply broadly, but he did not deny that people are complex. Many of his critics, including cognitive psychologists, argued that his account left out too much.

Try it

Python Law of effect: a learner that adjusts its choices

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Which schedule keeps you clicking?

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. A student studies harder after getting a high mark. Which process is this?

    A pleasant outcome (a high mark) was added and the studying increased, so it is positive reinforcement.
  2. 2. A person takes a painkiller and the pain stops. They are more likely to take it next time. This is:

    Removing an unpleasant state (pain) increases the behavior of taking the pill, which is negative reinforcement.
  3. 3. Which schedule produces the most steady, extinction-resistant responding?

    Variable-ratio schedules give unpredictable payoffs, so behavior stays high and is slow to extinguish.
  4. 4. Shaping works by reinforcing:

    Trainers reward steps that move closer to the goal and then raise the requirement.
  5. 5. What is a well-supported criticism of using punishment?

    Punishment can reduce a behavior but may produce fear or aggression and does not show what to do instead.

Summary

  • Operant conditioning links behavior to its consequences; Thorndike called it the law of effect and Skinner studied it with operant chambers.
  • Reinforcement increases behavior, punishment decreases it; positive means added, negative means removed.
  • Shaping builds complex behaviors step by step; extinction removes them when reinforcement stops.
  • Partial reinforcement, especially variable ratio, produces persistent behavior.
  • Punishment has limits and side effects; reinforcing alternatives is usually better.

Next: Observational and cognitive learning