Find a course

Module 3: Learning and MemoryLesson 8 of 1412 min

Operant Conditioning and Habits

Learn how reinforcement and punishment shape behavior, why reward schedules make slot machines and apps so sticky, and how we learn by watching.

Step 1 of 11Learn

Why you keep checking your phone

A slot machine pays out unpredictably. Most pulls give nothing, but every so often there's a win. People keep pulling for hours. Your phone works in a similar way: most of the time you check it, nothing interesting is there, but occasionally there's a message you were hoping for. So you check again.

Both are examples of operant conditioning: learning in which behavior is shaped by its consequences. Unlike classical conditioning, which links two stimuli and involves automatic responses, operant conditioning involves voluntary actions and what follows them.

The idea goes back to Edward Thorndike's law of effect around 1900: behaviors followed by satisfying outcomes become more likely; those followed by unpleasant outcomes become less likely. B. F. Skinner developed it further, using boxes in which animals learned to press levers for food.

The key terms:

  • Reinforcement increases a behavior.
  • Punishment decreases a behavior.

Each comes in two forms, and the words "positive" and "negative" here don't mean good and bad. They mean adding or removing something:

  • Positive reinforcement: add something pleasant. A child gets praise for cleaning up.
  • Negative reinforcement: remove something unpleasant. You buckle your seatbelt and the car's annoying beeping stops.
  • Positive punishment: add something unpleasant. A speeding ticket.
  • Negative punishment: remove something pleasant. A teen loses phone privileges.

Negative reinforcement is the most misunderstood. It is not punishment. It strengthens a behavior by taking away something bad.

Step 2 of 11Practice · Diagram

Reinforcement and punishment

A teen loses phone privileges for breaking curfew. Tap that quadrant.

Tap the shape that answers the question, then press Check.

Reinforcement and punishmentTwo-by-two matrix: Positive reinforcement, Negative reinforcement, Positive punishment, Negative punishment.Positive reinforcementNegative reinforcementPositive punishmentNegative punishmentWhat happensSomething addedSomething removedEffect on behaviorDecreasesIncreases
Positive reinforcement

Add something pleasant: a treat for sitting.

Negative reinforcement

Remove something unpleasant: a painkiller ends a headache.

Positive punishment

Add something unpleasant: a scolding.

Negative punishment

Remove something pleasant: losing phone time.

Step 3 of 11Practice · Sort into groups

Sort each example into the correct type of consequence.

Tap an item, then tap its group (or drag it there).

Step 4 of 11Learn

Schedules of reinforcement

How often reinforcement comes changes how behavior is learned and how long it lasts.

Continuous reinforcement rewards every correct response. It's the fastest way to teach a new behavior, but the behavior also disappears quickly once rewards stop. Partial (intermittent) reinforcement rewards only some responses. It's slower to learn but much more resistant to extinction. There are four main partial schedules:

  • Fixed ratio: reward after a set number of responses. A coffee card that gives a free drink after every 10 purchases. Produces high rates of responding with a short pause after each reward.
  • Variable ratio: reward after an unpredictable number of responses. Slot machines, lottery tickets, fishing. Produces high, steady responding and is the most resistant to extinction.
  • Fixed interval: reward for the first response after a set amount of time. A weekly paycheck, or checking the oven when the timer is about to go off. Responding speeds up as the time approaches.
  • Variable interval: reward for the first response after unpredictable time periods. Checking email or social media for new messages; pop quizzes. Produces slow, steady responding.

Variable schedules are powerful because you never know which response will pay off, so there's always a reason to try once more. Many apps and games are designed with this in mind, using unpredictable likes, rewards or loot drops.

Step 5 of 11Practice · Chart

Typical response patterns by schedule

Tap the schedule a slot machine uses.

Tap the bar that answers the question, then press Check.

Typical response patterns by scheduleBar chart with 4 categories: Variable ratio: 95; Fixed ratio: 80; Variable interval: 45; Fixed interval: 30.020406080100Variable ratioFixed ratioVariable intervalFixed interval95804530
Illustrative relative rates; fixed interval responding also speeds up just before each reward.
Typical response patterns by schedule
ItemRelative response rate
Variable ratio95
Fixed ratio80
Variable interval45
Fixed interval30

Step 6 of 11Practice · Match the pairs

Match each situation to its reinforcement schedule.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. A factory worker paid $5 for every 20 items assembled
  2. Playing a scratch-card lottery
  3. A monthly salary
  4. Refreshing a feed that updates at random times

Step 7 of 11Learn

Shaping, punishment and learning by watching

Complex behaviors are rarely performed perfectly the first time, so there's nothing to reinforce. Shaping solves this by rewarding successive approximations: steps closer and closer to the goal. Animal trainers teach a dog to roll over by first rewarding lying down, then lying on its side, then rolling partway. Teachers and coaches do the same with students.

Punishment can stop a behavior quickly, but research points to several drawbacks. It teaches what not to do rather than what to do instead. Its effects often depend on the punisher being present. Harsh physical punishment is linked to increased aggression and fear. Most psychologists recommend reinforcing desired behavior and, when needed, using mild, consistent consequences such as time-outs or loss of privileges.

Not all learning needs direct consequences. In the 1960s, Albert Bandura showed children a video of an adult hitting an inflatable "Bobo" doll. Children who watched later imitated the aggressive behavior, often in detail. This is observational learning: learning by watching others, called models. It is more likely when the model is admired or similar to the learner, and when the model is rewarded.

Observational learning explains how children pick up language, manners and attitudes, and why role models matter. It also means you can learn from other people's mistakes without having to make them yourself.

Step 8 of 11Diagram

Shaping a dog to roll over

Each step raises the bar a little. Rewards that used to work for an earlier step stop, so the dog tries something closer to the goal.

Shaping a dog to roll overProcess diagram: Reward lying down → Reward lying on its side → Reward a partial roll → Reward only the full roll.Reward lyingdownReward lying onits sideReward apartial rollReward onlythe full roll
Reward lying down
Reward lying on its side
Reward a partial roll
Reward only the full roll

Step 9 of 11Note

Step 10 of 11Practice · What would you do?

What would you do?

A parent wants their 6-year-old to stop whining for candy at the checkout. Until now, the parent has sometimes given in when the whining got loud enough. What is the most effective plan?

Step 11 of 11Practice · Choose one

Your car beeps until you fasten your seatbelt, and you now buckle up immediately. What kind of consequence shaped this behavior?