Pecking Test Shaping - theunissenlab/lab-documentation GitHub Wiki

Shaping

Shaping can typically take as few as 2-3 days for some subjects, and a week for others. Follow the instructions for preparing the pecking test. If vocalization recordings are needed from these subjects, this is also a good time to collect them.

The instructions here are slight modifications of Julie's original protocol, but I think optimized for faster acclimation.

0 Setup

Set up the configuration YAML files in /data/pecking_test/configs.

Set the subject_name variable to be the subject's name and point the stim_directory to /data/pecking_test/stimuli/shaping/shaping_songID (or whichever stim set you want to use)

1 Acclimating

Weigh the subjects and house the subjects in pairs in two operant boxes. Bring the feeders up (do this per box)

pecking-test shell -b 2
In [1]: box2.feeder.up()

Its best to start this around noon the day before. Let them sit in the boxes as pairs overnight. Make sure to lower the feeder at night and to raise it early the next morning. Some birds are very nervous and may need additional days of acclimating.

2 Finding the food port

Verify that the birds are aware of the feeder. When you see them eating from it, lower the feeder using the python shell

In[1]: box2.feeder.feed(30)

This will let them eat for 30 seconds and then drop the feeder to remove access.

3 Finding the button

Now they can be separated and find the button independently. Tape some seed on the button as well as some seed near the button on the wall. The hardest part is getting that first peck.

Run the pecking test with 100% rewarded stimuli:

pecking-test shape -b 2 -r 1.0

When the bird pecks the key and jumps down to eat a few times, move on to the next step.

Sometimes birds have a very hard time making that first button press because they are not exploring the box. They either don't do anything or become fixated with the feeder and try to get at the food directly. I find it can help to pair a bird who has learned to peck in the same box for a bit. This can let the struggling bird feel more comfortable to explore and also maybe gain interest in the button.

4 Learning the task

Now we are going to gradually decrease the frequency of rewarded stimuli. This part can vary based on the behavior of the bird (how many trials they are doing), and you may need to go back up a few times.

Change the -r parameter to decrease from 1.0 to 0.2. Some good intermediate steps are 0.8, 0.5, 0.4, 0.3, 0.2. At the lower probabilities there are sometimes very long streaks of no reward, so try to make sure the bird gets it before lower it too far.

pecking-test shape -b 2 -r 0.8

5 Finished

When the bird are at 20% rewarded, you can run the pecking test normally. Don't forget to edit the config files to change the stimulus directories.

pecking-test run -b 2

6 Other Commands for Training

While in the interactive shell:

pecking-test shell -b 2

You can also turn on the light of the button:

In[1]: box2.peck_port.on()

And play files:

In [2]: box2.speaker.queue('test_song.wav')
In [3] box2.speaker.play()