PROJECT 1 - Basic Operant Phenomena
Welcome to our virtual laboratory for studying the learning and behaviour of Sniffy, the virtual rat. The
projects in this tutorial illustrate the main features of the software and the ways one might use Sniffy
Pro to teach the principles of operant and classical conditioning.
Getting Started
Locate the folder where you installed the Sniffy Pro/Demo program and sample files on your computer's hard disk.
Start the program by double-clicking the program icon.
In Windows, check for Sniffy Pro in your START / PROGRAMS menu.
On your first time Sniffy will ask you to enter your name and institution in order to personalize your copy of the
software.
Sniffy's operant chamber resembles those found in laboratories where psychologists do research on
operant conditioning. A look at Sniffy's operant chamber reveals three particularly important objects
on the back wall: a lever, or so-called bar, that you will train Sniffy to press, a water spout, and a
food hopper. As in all operant conditioning situations, the bar is continuously available for Sniffy to
press. The hopper is the device that you will use to provide a positive consequence or reinforcement
when Sniffy does something that you want him to do more often. Other devices in Sniffy's operant
chamber permit you to present other kinds of stimuli. These include a speaker through which sounds
can be played, a light that can be turned on and off, and parallel metal bars that form the floor
through which electric shocks can be delivered.
PROJECT 1: Basic Operant Phenomena: Magazine Training, Shaping, Extinction, and
Spontaneous Recovery.
When the program starts up you can expect to see Sniffy rearing up, grooming himself, and exploring
the chamber. You can observe and manually record any of the behaviors that Sniffy performs.
However, the response that psychologists generally study in an operant chamber is bar pressing. In
research laboratories, psychologists use computers to control the presentation of food and other
stimuli and to record bar-presses, and the Sniffy Pro program simulates these functions.
When you first start Sniffy Pro, the program opens four windows on your desktop:
The Operant Chamber window is the window where you see Sniffy moving about.
The Operant Associations window is the place where you can observe the development of two crucial
associations that the Sniffy Pro program's operant-conditioning algorithm employs to cause Sniffy to press the bar
more after training than before training. This window is a "mind window" that shows you two important
psychological processes going on inside the Sniffy Pro program. Like all the Sniffy Pro program's mind windows, it
has a blue background.
The Cumulative Record is a window that will enable you observe changes in Sniffy's bar-pressing rate. Like all the
windows in the Sniffy Pro program that provide measures of Sniffy's behavior, the Cumulative Record window has
a white background.
Finally, the Lab Assistant window provides you with useful suggestions about what to do next or about the status
of your current Sniffy experiment.
Stage 1: Magazine Training
Magazine training is a technique to operate the magazine to present pellets of food in such a way that
Sniffy learns to associate the sound of the magazine with the availability of a food pellet in the
hopper. One of the associations that the Operant Associations mind window displays is the Sound-
Food association. By keeping an eye on the Operant Associations mind window, you can watch
Sniffy’s association between the magazine sound and food develop.
Here are the steps that you need to follow to magazine train Sniffy:
If the Sniffy Pro program is not running, start it be double-clicking the program icon.
Wait until Sniffy closely approaches the food hopper as he wanders around the operant chamber. Then deliver a
food pellet either by pressing the space bar on your computer keyboard or by clicking your mouse button while
pointing at the bar.
To save time at the start, you may want to give Sniffy several pellets in rapid succession before he wanders away
from the hopper.
After Sniffy has received several pellets, you can let him wander away a short distance before giving him the next
pellet.
Keep an eye on the Operant Associations mind window. Sniffy is fully magazine trained when the vertical bar for
the Sound-Food association reaches its maximum level. At that point, no matter where Sniffy is in the operant
chamber, he will orient toward the hopper and go get the food pellet whenever he hears the sound of the
magazine. The figure below depicts what the Operant Associations mind window will look like when Sniffy has
been fully magazine trained.
When Sniffy has been fully trained, the Lab Assistant will also tell you so and present an abbreviated version of
the instructions given below about how to train Sniffy to press the bar.
When Sniffy has completed magazine training, you should save your magazine-trained Sniffy as a Sniffy Pro
program file.
PLEASE NOTE THAT THE DEMO VERSION DOES NOT ALLOW SAVING
To save the file in a regular version of the program:
o Select the Save command from the File menu.
o Select an appropriate file name (e.g. MagTrain) and type it into the appropriate space in the Save
dialogue box.
o Select an appropriate destination for the file on you hard disk.
o Click the Save command button on the dialogue box.
Stage 2: Shaping: Teaching Sniffy to Press the Bar
Shaping an animal takes patience, careful observation, and good timing. It is a skill that you learn with
practice. Sniffy is somewhat easier to shape than a real rat partly because he never becomes
satiated for food and partly because his behavioral repertoire is smaller than a real rat's.
Nevertheless, shaping Sniffy is challenging enough for you to get some idea of both the frustration
and the eventual feeling of triumph that shaping an animal engenders.
Here is a detailed description of the steps that you should follow to shape Sniffy to press the bar after
you have completed magazine training (in the steps above):
As your first approximation to bar pressing, reinforce Sniffy when he rears up anywhere in the operant chamber.
Once rearing has become more common, reinforce Sniffy only when he rears up against the back wall of the
operant chamber where the bar is located.
Gradually require Sniffy to rear up closer and closer to the bar.
Whenever Sniffy rears up directly in front of the bar, there is a chance that he will press the bar. If he does press
it, he will hear the magazine sound, receive a food pellet, and the Bar-Sound association will start to develop, as
evidenced by the appearance of the red bar above the words Bar-Sound in the Operant Associations mind
window.
Each time Sniffy presses the bar, watch closely what he does after eating the food pellet. He might press the bar
again a second time either immediately or after rearing up near the bar a time or two. If he does press the bar
again, you know that you're making progress. Allow him to continue pressing the bar as long as he will do so.
However, if he rears up more than twice without pressing the bar again, continue to reinforce rearing up near the
bar.
If you are patient, the time will come when Sniffy will press the bar four or five times in rapid succession. At that
point, you can stop shaping, sit back, and watch the progressive effect of reinforcement as Sniffy continues to
press the bar more and more frequently.
Watch the rising level of the Bar-Sound association in the Operant Associations mind window. Sniffy's training is
complete when that association reaches its maximum level. The figure below depicts what the Operant
Associations mind window will look like when Sniffy's training is complete.
When Sniffy is fully trained, select the Save command from the File menu to preserve your trained Sniffy for future
use (not available in the demo version).
Stage 3: Cumulative Records: Visualizing Sniffy's Bar-Press Performance
At this point Sniffy will be pressing the bar very regularly and receiving food pellets every time. Look
at Sniffy’s cumulative record at the bottom from time to time to check out the various features that we
are going to describe. Record 1 should be visible under the Operant Chamber window. If it is not
visible, you can make it visible by selecting it from the Windows menu
Each Cumulative Record window depicts Sniffy's bar-pressing performance over a period of approximately two
hours of Sniffy Pro program time. As time elapses a line is drawn horizontally across the page. Each time Sniffy
presses the bar the line moves up a notch and continues along horizontally. When a barpress is reinforced you
will see back-slash marker on cumulative record to mark the event.
There are several important things to remember about the cumulative records that the Sniffy Pro
program produces and about cumulative records in general:
The slope of the rising lines on the graph represents the speed with which Sniffy is pressing the bar. The steeper
the slope, the more rapidly Sniffy was pressing when the record was made.
Reinforced responses are marked by a short, oblique lines drawn through the record.
If you let it run long enough, the Sniffy Pro program will produce a series of 10 Cumulative Record windows.
The Cumulative Record windows, which are called "Cumulative Record 1", "Cumulative Record 2", etc., are
accessible under the Response Measures section of the Windows menu.
In addition to depicting Sniffy's response rate and showing which responses were reinforced, the cumulative
records that the Sniffy Pro program produces denote the times at which a variety of other significant events occur
during experiments. We'll explain these additional features in connection with descriptions of experiments where
they are important.
The cumulative record depicted above shows the acquisition of bar pressing as a consequence of
shaping in a "typical" experiment. No two cumulative records are ever exactly alike because Sniffy
never behaves in exactly the same way in any two experiments. However, if you were a successful
shaper, the part of your cumulative record from Stage 2 that recorded Sniffy's acquisition of the bar-
pressing response should resemble the one shown above. Here are some characteristic things about
the record shown above that you can expect to see in your own cumulative record:
At the far left hand side, the flat, horizontal line shows that Sniffy has not yet learned to press the bar.
Sniffy begins to press the bar quite slowly at first and then more and more frequently.
In addition to the rather heavy, dark vertical lines that the cumulative record produces when the pen resets from
the top of the record to the bottom, there are thinner, alternating solid and dotted vertical lines spaced at regular
intervals. These thinner vertical lines are 5-minute time markers. The time between a one thin vertical line and the
next (i.e. between a solid line and the next dotted line or a dotted line and the next solid line) is 5 minutes in Sniffy
Pro program time; and the time between two successive solid or two successive dotted vertical lines is 10 minutes
in program time.
Stage 4: Extinction: What Happens When Reinforcement Stops?
After training Sniffy to press the bar, you might wonder what would happen if you stopped reinforcing
bar presses.
Here is what you need to do to set up and run an extinction experiment:
If the Sniffy Pro program is not running, start it and open the file called CRF.
Or start with your trained Sniffy from the exercise above.
Choose the Design Operant Experiment command from the Experiment menu. Executing this command opens
the dialogue shown below.
When the dialogue box opens, the button labeled "Continuous" is selected because you have been reinforcing all
of Sniffy's bar-press responses. Reinforcing every response is a procedure called continuous reinforcement.
To select extinction, point the cursor at the button labeled "Extinction" and click your mouse button.
Be sure that there is a check mark in the box next to Mute Pellet Dispenser. (If the check mark isn't there, place
the cursor over the box and click your mouse button to put a check mark in the box.) Setting up extinction with
Mute Pellet Dispenser selected means that Sniffy's bar presses will no longer produce food pellets and that he will
no longer hear the magazine sound as a consequence of bar pressing. In other words, both the primary reinforcer
(food) and the secondary reinforcer (the magazine sound) are turned off. This is the standard extinction
procedure.
After checking to be sure that you have made the correct setting, click the OK command button.
After you click OK, the dialogue box will disappear, and the Sniffy Pro program will begin running again, but
Sniffy's bar presses will no longer be reinforced. Immediately after you click OK, your cumulative record will look
something like that shown below.
Note that the Sniffy Pro program marks the cumulative record to show the point at which extinction starts and
informs you that the magazine is muted.
As a consequence stopping reinforcement, Sniffy's rate of bar pressing will eventually decline until he presses the
bar no more often than he did before he was trained. However, the first effect of extinction is to increase Sniffy's
bar pressing rate. This increase in response rate is called an extinction burst, and it commonly occurs when an
animal is switched from continuous reinforcement to extinction.
Your extinction criterion is a 5-minute period during which Sniffy presses the bar no more than twice. When that
point is reached, you should save your Extinction file.
When the extinction criterion is reached, you should estimate the number of responses that Sniffy made between
the onset of extinction and the time when the criterion was reached. You should also estimate the time required to
reach the extinction criterion.
When estimating the number of responses and the time elapsed during extinction, remember that:
o The thin alternating dotted and solid vertical lines on the cumulative record mark off 5-minute periods.
o Sniffy always makes 75 responses between two successive pen resets.
Stage 6: Spontaneous Recovery
A single extinction session is not enough to permanently reduce the frequency of an operant
response to its pre-training frequency. If an animal that has apparently been fully extinguished is
removed from the operant chamber, allowed to rest in its home cage for 24 hours, and then returned
to the operant chamber for a second extinction session, the response rate at the start of the second
session will be greater than it was at the end of the first extinction session. This rest-produced
reappearance of an extinguished operant response is called spontaneous recovery.
To simulate the phenomenon with Sniffy:
Start with a Sniffy that has been trained to press the bar and then extinguished.
Choose Remove Sniffy for Time-Out from the Experiment menu. To simulate taking a rest, Sniffy will disappear
momentarily and then reappear.
When he reappears, his bar-pressing rate will be higher than it was at the end of extinction, but lower than it was
before extinction. Immediately after the time out, your cumulative record should resemble that shown below.
Check the Operant Associations mind window shortly after starting your spontaneous-recovery experiment. You'll
recall that standard extinction (with the magazine sound muted) produces extinction of the Bar-Sound association,
while extinction with the magazine sound not muted causes extinction of the Sound-Food association. At the
beginning of the spontaneous-recovery experiment, the extinguished association is partly re-established. This
partial re-appearance of the extinguished association is the "psychological" reason why Sniffy presses the bar
more often at the beginning of the second extinction session than he did at the end of the first extinction session.
Let the Sniffy Pro program run until Sniffy meets the extinction criterion again.
Compare the number of responses made and the time required to reach the extinction criterion during this second
extinction session with the number of responses and time required during the first extinction session. This
comparison will reveal that Sniffy makes fewer responses and takes less time to reach the criterion the second
time around.
PROJECT 2 - Stimulus Discrimination and Stimulus Generalization
The Sniffy program employs tones to simulate two forms of stimulus discrimination learning. In simple
discrimination learning, a tone is either on or off. If the tone is a positive discriminative stimulus (S+),
then Sniffy is reinforced when the tone is on and extinguished when it is off. If the tone is a negative
discriminative stimulus (S-), then Sniffy is extinguished when the tone is on and reinforced when it is
off. We call the second kind of discrimination learning that the Sniffy program simulates S+/S-
discrimination learning. In this case, both the S+ and the S- are tones of different frequencies.
Stage1: S+/S- Discrimination Learning
In this exercise, you will teach Sniffy a simple discrimination using the 2.0 kHz tone as the S+ and the
2.25 kHz tone as the S-.
Here are the steps that you should follow to set up the experiment:
In the FILE menu, Open a file in which Sniffy has been fully trained to press the bar for continuous reinforcement.
You can use the file called CRF which is located in the Sample Files folder.
Use the Save As... command to save the file under an appropriate new name (e.g. S+S-225).
Under the FILE menu you can set Preferences to "Sound Proof Cage". You may want to do this for this exercise
because the computer generated tones can get to be hard to listen to.
Select the Design Operant Experiment... command from the Experiment menu.
In the dialogue box, select the stimuli that you want to use as the S+ (the stimulus in whose presence Sniffy's bar
presses will be reinforced) and the S- (the stimulus in whose presence Sniffy's bar presses will not be reinforced).
After setting the S+ as the 2.0 kHz tone and the S- as the 2.25 kHz tone, click the OK command button at the
bottom of the dialogue box to begin Sniffy's discrimination training.
During discrimination training, the S+ and the S- will be presented during alternating 1-minute intervals. During the
S+, Sniffy's bar presses are reinforced. During the S-, his bar presses are not reinforced.
During discrimination training, you can observe Sniffy's progress by examining the Cumulative Record, the
Operant Associations mind window, and the DS Associations mind window.
o The Cumulative Record marks the occurrence of S+ and S- periods and shows how often Sniffy presses
the bar during each period. The figure below shows the appearance of the cumulative record early in an
S+/S- discrimination learning experiment in which the S+ is the 2.0 kHz tone and the S- is the 2.25 kHz
tone. Note how occurrences of these stimuli are denoted.
Early in discrimination learning, Sniffy will press the bar equally often under the two stimulus conditions. As
discrimination learning gets under way, he will begin pressing more often during the S+ than during the S-. When
discrimination learning is complete, he will press the bar frequently during the S+ is on and rarely, if ever, during
the S-.
At the beginning of discrimination learning, the Operant Associations mind window will show that the Bar-Sound
association is at a high level; and the level will not change in response to transitions between the S+ and S-. As
discrimination learning proceeds, the strength of the Bar-Sound condition will continue to weaken during S-, but it
will begin to strengthen again during S+ periods. When discrimination learning is complete, the Bar-Sound
Association will be at or very near its maximum during the S+ and at the minimum level during the S-.
The DS Associations mind window shows Sniffy’s tendency to press the bar in the presence of tones of different
frequencies. This mind window thus predicts the results that you would obtain if you performed generalization
tests.
The illustration below shows the DS Association mind window as it appears at the end of an S+/S- discrimination
experiment in which the S+ was the 2.0 kHz tone and the S- was the 2.25 kHz tone. In this case, both excitatory
tendencies to respond and inhibitory tendencies not to respond are associated with most of the tones.
Your criterion for deciding that Sniffy's discrimination learning is complete should be based jointly on observations
of the Cumulative Record and the Operant Associations and DS Response Strength mind windows. When
discrimination learning is complete:
o The Cumulative Record will show that Sniffy is consistently (over several consecutive S+/S- cycles)
responding frequently during the S+ and very rarely or never during the S-.
o In the Operant Associations mind window, the Bar-Sound association will be at or very near the maximum
level during the S+ periods and at the zero level during S- periods.
o The appearance of the DS Association mind window will have stabilized. The height of the bars will no
longer be changing.
When Sniffy’s training is complete, choose the Save… command from the File menu to save your results for use
in tests of stimulus generalization. (The Save command has been disabled in the demo version).
Stage 2: Stimulus Generalization after S+/S- Discrimination Learning
Please note that in the demo version of Sniffy Pro you cannot save files, however if you were to follow
up simple discrimination learning with generalization tests on the Professional edition here are the
steps that you need to follow to measure stimulus generalization:
If the Sniffy Pro program is not running, start it.
Use the Open... command under the File menu to open a file in which Sniffy has been fully trained on a
discrimination-learning task.
Warning: This step is extremely important. Use the Save As command under the File menu to save the file under
a new name appropriate for the generalization test that you are going to perform. This step preserves your
original discrimination-training file for use in other generalization tests. If you save a trained Sniffy file under
its old name after performing a generalization test, you will permanently alter Sniffy's psychological state in the
original-training file. This mistake could mean that you would have to go back and run a stimulus-discrimination
experiment again.
Select the Design Operant Experiment command from the Experiment menu.
In the Design Operant Experiment dialogue box:
o Select Extinction.
o Be sure that there is a check mark in the box next to Mute Pellet Dispenser.
o Place a check mark in the box next to Generalization Test.
o Select the tone frequency that you want to test from the pull-down menu under Generalization Test.
o Click the OK command button.
The Sniffy Pro program will automatically perform a generalization test during which the selected tone is
presented continuously for two minutes.
During the generalization test, the Lab Assistant will count the number of times Sniffy presses the bar.
On a piece of paper, record the test tone and number of times that Sniffy pressed the bar during the test.
To perform your next generalization test, re-open your discrimination-trained Sniffy file and repeat the
steps outlined above with another test stimulus. When you have tested all nine different stimuli, you
can use a spreadsheet, statistical-analysis, or drawing program to draw a generalization gradient in
which you plot the number of responses made during the tests on the vertical (y) axis of your graph
and the different test tones on the horizontal (x) axis.
Your finished generalization gradient should resemble that shown below.