psych_trans2.gif (12714 bytes)
Home Up Equipment Test Pgm. Exp. 1 Pgm. Exp. 2 Pgm. Exp. 3 Pgm. Exp. 4 Pgm. Exp. 5 Pgm. Exp. 6


Chaining Program

\Chaining

\This program will train the animal to discriminate between the presence

\and absence of the cue light, followed by the automatic reinforcement of

\pole displacement-bar press chain

\Last modified 8/5/99

\Define constants for stimuli and responses

^RightLever=1

^LeftLever=2

^OmniLever=3

^HandSwitch=4

^HouseLight=1

^RightLight=2

^Feeder=3

^LeftLight=4

^RightNoise=5

^LeftNoise=6

^ExternalLight=7

\z-pulses

^food=1

^flash=2

DIM A = 70

DIM B = 70

\T - trial

\C - Pole displacements during baseline

\S - number of shapes

\X - flag for shaping trial

\***************************************************************************

s.s.1,

s1,

#start:on^houselight--->s2

\***Discrimination -- 20 Discrimination trials

s2, \Reinforces bar press and then turns the light off

#R^rightlever!#R^leftlever:z^food;off^houselight;add t;show 1,Discrim,t;

if t=20 [@baseline,@continue]

@baseline:show 1,baseline,0;z^flash--->s4

@continue:--->s3

s3, \When Hand Switch pressed, turns on light and repeats.

#R^handswitch:on^houselight--->s2

\***Baseline -- 3 minute baseline period

s4, \Counts omnilever presses in 3 minutes of darkness

3':z^flash;set t=0;show 1,Chain,0--->s5

#R^omnilever:add C--->sx

\***Chaining and extinction -- 50 chaining and 20 extinction trials

s5,

#R^omnilever:on^houselight;set x=1--->s6 \non-shaping trial

#R^handswitch:on^houselight;add S;show 2,shapes,s--->s6 \shaping trial

.1":set a(t)=a(t)+.1--->sx \latency to pole

s6,

#R^rightlever!#R^leftlever:off^houselight;if x=1 [@nonshaping,@shaping]

@nonshaping:add t;show 1,Chain,T--->s7 \Adds T on non shaping trials

@shaping:--->s7

.1":set b(t)=b(t)+.1--->sx \latency to bar

s7,

.01":set a(t)=0,b(t)=0,x=0;if t<50 [@food,@nofood] \resets time if shape

@food:z^food--->s5 \non-extinction

@nofood: if t<70 [@cont,@end] \extinction

@cont:--->s5

@end:set a(t)=-987.987,b(t)=-987.987--->stopabortflush

\***************************************************************************

s.s.2, \Takes care of the food

s1,

#z^food:on^feeder--->s2

s2,

.05":off^feeder--->s1

\***************************************************************************

s.s.3, \Flashes

s1,

#z^flash:on ^ExternalLight--->s2

s2,

.2":off ^ExternalLight--->s1

\***************************************************************************

s.s.4,

s1,

#k99:set a(t)=-987.987,b(t)=-987.987--->stopabortflush