TITLE: Set Shifting ASAP Operant Behavior_LernerLab
AUTHORS: jillian.seiler, jacobnadel, talia.lerner

[DESCRIPTION]
Protocol for set shifting task used by the Lerner Lab for ASAP work

[STEPS]
SECTION: Magazine Training
1. Food restrict animals overnight prior to beginning magazine training. For the remainder of training animals should be restricted to 85% of their free feeding weight.
SECTION: Magazine Training
3. Place animals in operant box with dummy patch cords (if fiber photometry or optogenetics will be used) attached and allow ~5 minutes to habituate.
SECTION: Magazine Training
4. Load JN_ASAP_A_MagTraining_30min into Med Associates
 
and start program.  The overview is as follows:

SECTION: Magazine Training
2. Connect 20 mL syringe with >10 mLs of 1:3 diluted sweetened condensed milk. Add ~15 inches of tubing with tubing adapter to syringe. Load in pump, attach to reward port. Prime pump, ensuring milk is delivered to the reward port on pump activation. 
SECTION: Magazine Training
4.1. House light, fan, corner lights, and cue lights above the left and right nosepoke ports are turned on.
SECTION: Magazine Training
4.2. On average, every 60 seconds a noncontigent reward of ~20μl of diluted sweetened condensed milk is delivered via a Med Associates Single Speed Syringe PumpMed Associates Single Speed Syringe Pump.
 

SECTION: Magazine Training
4.3. The animal must consume the reward (or make a port entry) in order for the next reward to be delivered.
SECTION: Magazine Training
4.4. After 30 minutes, the program ends.
SECTION: Magazine Training
8. This program occurs once, regardless of performance.
SECTION: Magazine Training
5. After animal has finished, record weight, return to homecage and clean operant chamber tray with 70% ethanol.
SECTION: Magazine Training
6. Flush reward port and tubing with 70% ethanol and hang to dry.
SECTION: Magazine Training
7. Store any remaining sweetened condensed milk in therefrigerator (discard after 1 week). 
SECTION: FR1 Both
9. Repeat steps 2+3   

SECTION: FR1 Both
10. Load JN_ASAP_B_FR1_BOTH and start program.  The overview is as follows:
SECTION: FR1 Both
10.1. Fan and Near-Infrared Lights are turned on.
SECTION: FR1 Both
10.2. Animals must initiate trial by holding nose in reward port for 140-300 ms.
SECTION: FR1 Both
10.3. Once the trial is initiated, both left and right cue lights are illuminated. The animal can nosepoke on either side to earn a reward. When a reward is earned, a 
 delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. After the reward, there is a 3-second timeout period where a new trial cannot be initiated.
SECTION: FR1 Both
10.4. After 90 minutes or 100 rewards, the session ends. Repeat steps 5-7.   
SECTION: FR1 Both
11. After 2 consecutive days achieving over 80 rewards, move to FR1 Right and FR1 Left.
SECTION: FR1 Right/FR1 Left
12. Repeat steps 2+3   
SECTION: FR1 Right/FR1 Left
13. Load either JN_ASAP_C_FR1_RIGHT or JN_ASAP_C_FR1_LEFT, beginning with the side on which the animal earned more rewards on FR1_BOTH and start program. The overview is as follows:
SECTION: FR1 Right/FR1 Left
13.1. Fan and Near-Infrared Lights are turned on.
SECTION: FR1 Right/FR1 Left
13.2. Animals must initiate trial by holding nose in reward port for 140-300 ms.
SECTION: FR1 Right/FR1 Left
13.3. Once the trial is initiated, only one of the cue lights is illuminated (either left or right, depending on which program was selected). Only nosepokes on the illuminated side will earn a reward. 

SECTION: FR1 Right/FR1 Left
13.4. When a nosepoke is made on the correct side, a Med Associates Single Speed Syringe Pump delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. 
SECTION: FR1 Right/FR1 Left
13.6. After the reward, there is a 3-second timeout period where a new trial cannot be initiated. 
SECTION: FR1 Right/FR1 Left
13.5. When a nosepoke is made on the incorrect side, the house light illuminates for 7 seconds to signify an incorrect response. No reward is delivered.
SECTION: FR1 Right/FR1 Left
13.7. After 90 minutes or 100 rewards, the session ends. Repeat steps 5-7.    
SECTION: FR1 Right/FR1 Left
14. The animal receives one day of FR1_RIGHT and one day of FR1_LEFT, regardless of performance. 
SECTION: 100/0
15. Repeat steps 2+3   
SECTION: 100/0
16. Load JN_ASAP_D_100_0_40RewardsSwitch. The overview is as follows:
SECTION: 100/0
16.1. Fan and Near-Infrared Lights are turned on.
SECTION: 100/0
16.2. Animals must initiate trial by holding nose in reward port for 140-300 ms.
SECTION: 100/0
16.3. Once the trial is initiated, both cue lights are illuminated. Left or right is randomly selected to begin as the high probability side. Only nosepokes on the high probability (100%) side will earn a reward. 
SECTION: 100/0
16.4. When a nosepoke is made on the high probability side, a Med Associates Single Speed Syringe Pump delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. 
SECTION: 100/0
16.5. When a nosepoke is made on the low probability side (0%), the house light illuminates for 7 seconds to signify an incorrect response. No reward is delivered.
SECTION: 100/0
16.6. After the reward, there is a 3-second timeout period where a new trial cannot be initiated. 
SECTION: 100/0
16.7. If the animal earns 40 rewards, a new block begins where the high probability (100%) and low probability (0%) sides are switched. If the animal earns 40 rewards on the new high probability side, a new block begins where the high and low probability sides switch once again.   
SECTION: 100/0
16.8. This continues until 90 minutes have elapsed. There is no maximum number of rewards or block switches. 
SECTION: 100/0
16.9. After 90 minutes, the session ends. Repeat steps 5-7.    
SECTION: 100/0
17. After 3 consecutive days of >80% accuracy (Left Rewards+Right Rewards/Total Trials x 100) or 14 days, animals can move on to the next program. 
SECTION: 90/10
18. Repeat steps 2+3   
SECTION: 90/10
19. Load JN_ASAP_F_90_10_50RewardsSwitch. The overview is as follows:
SECTION: 90/10
19.1. Fan and Near-Infrared Lights are turned on.
SECTION: 90/10
19.2. Animals must initiate trial by holding nose in reward port for 140-300 ms.
SECTION: 90/10
19.3. Once the trial is initiated, both cue lights are illuminated. Left or right is randomly selected to begin as the high probability side. 
SECTION: 90/10
19.4. 90% of the time, when a nosepoke is made on the high probability (90%) side, a Med Associates Single Speed Syringe Pump delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. 10% of the time, when a nosepoke is made on the high probability side, the house light illuminates for 7 seconds to signify an incorrect response and no reward is delivered.
SECTION: 90/10
19.5. 90% of the time, when a nosepoke is made on the low probability (10%) side, the house light illuminates for 7 seconds to signify an incorrect response and no reward is delivered. 10% of the time, when a nosepoke is made on the low probability side, a Med Associates Single Speed Syringe Pump delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. 
SECTION: 90/10
19.6. After the reward, there is a 3-second timeout period where a new trial cannot be initiated. 
SECTION: 90/10
19.7. If the animals complete 50 trials on the high probability side, a new block where the high probability (90%) and low probability (10%) sides are switched. If the animal complete 50 trials on the new high probability side, a new block begins where the high and low probability sides switch once again. 
SECTION: 90/10
19.8. This continues until 90 minutes have elapsed. There is no maximum number of rewards or block switches. 
SECTION: 90/10
19.9. After 90 minutes, the session ends. Repeat steps 5-7.    
SECTION: 90/10
20. After 3 consecutive days of >70% accuracy (Left Rewards+Right Rewards/Total Trials x 100) or 10 days, animals can move on to the next program. 
SECTION: 75/25
21. Repeat steps 2+3   
SECTION: 75/25
22. Load JN_ASAP_E_90_10_50_Trials. The script for the program is attached as a comment. The overview is as follows:
SECTION: 75/25
22.1. Fan and Near-Infrared Lights are turned on.
SECTION: 75/25
22.2. Animals must initiate trial by holding nose in reward port for 140-300 ms.
SECTION: 75/25
22.3. Once the trial is initiated, both cue lights are illuminated. Left or right is randomly selected to begin as the high probability side. 
SECTION: 75/25
22.4. 75% of the time, when a nosepoke is made on the high probability (75%) side, a Med Associates Single Speed Syringe Pump delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. 25% of the time, when a nosepoke is made on the high probability side, the house light illuminates for 7 seconds to signify an incorrect response and no reward is delivered.
SECTION: 75/25
22.5. 75% of the time, when a nosepoke is made on the low probability (25%) side, the house light illuminates for 7 seconds to signify an incorrect response and no reward is delivered. 25% of the time, when a nosepoke is made on the low probability side, a Med Associates Single Speed Syringe Pump delivers ~20μl of the sweetened condensed milk and a tone plays for 0.5s to signify a correct response. 
SECTION: 75/25
22.6. After the reward, there is a 3-second timeout period where a new trial cannot be initiated. 
SECTION: 75/25
22.7. If the animals complete 50 trials on the high probability side, a new block where the high probability (75%) and low probability (25%) sides are switched. If the animal complete 50 trials on the new high probability side, a new block begins where the high and low probability sides switch once again. 
SECTION: 75/25
22.8. This continues until 90 minutes have elapsed. There is no maximum number of rewards or block switches. 
SECTION: 75/25
22.9. After 90 minutes, the session ends. Repeat steps 5-7.    
SECTION: 75/25
23. After 6 days, the animals are finished.