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


Fixed Ratio Schedules and Extinction Program

\This is a program that allows a lever press to deliver

\a reinforcer provided that the hand switch has been

\pressed. It ends with the delivery of 120 reinforcers

\or a 90 min session, whichever comes first.

\Updated 2/9/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

\Array A will record the number of responses before

\each reinforcer after the initial 10

\Array C will record the time at which

\responses and reinforcers occurred to

\generate a cumulative record

\Array D will record the number of

\responses every minute.

DIM A= 111

DIM C= 2000

DIM D= 91

\Initially you may pellets can be delivered by the Handswitch

\or by a lever press.

s.s.1,

s1,

#Start:--->s2 \Tell your TF to start the program when you are ready

s2,

#R^Handswitch:On^Houselight--->s3

s3, \A lever press of the Handswitch delivers a pellet

#R ^RightLever ! #R ^LeftLever ! #R ^Handswitch:On ^Feeder--->s4

s4,

.05":Off ^Feeder;ADD R;IF R>=10[@NEXT,@GOBACK]

@NEXT:Z1;Set R=0--->s5

@GOBACK:--->S3

S5, \After 10 Pellets only lever presses preceded

\by a press of the Handswitch will deliver a pellet.

\The number of lever presses before each pellet

\will be recorded in Array A.

#R ^RightLever ! #R ^LeftLever:ADD A(R);IF S.S.2=4 [Z2;On ^Feeder]--->s6

S6,

.05":Off ^Feeder;ADD R; SET A(R)=0,A(R+1)=-987.987;IF R>=110 [@STOP,@NEXT]

@STOP:--->STOPABORTFLUSH

@NEXT:--->S5

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

\This state set is used to determine if a lever press

\will be reinforced. It starts after the first

\10 reinforcers have been delivered.

s.s.2,

s1,

#Start:--->s2

s2,

#Z1:--->s3

s3,

#R^Handswitch:--->S4

S4,

#R^RightLever!#R^LeftLever:--->S3

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

\S. S. 3. is used to keep track of the time

\when responses and reinforcements occurred

\for the cumulative record

S.S.3,

S1,

#Start:--->s2

s2,

#Z1--->s3

s3,

#Z3:--->s3

0.1":ADD T --->SX

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

\S. S. 4. is used to generate a cumulative record

\It starts after the first 10 reinforcers.

S. S. 4,

S1,

#Start:--->s2

s2,

#Z1:--->s3

s3,

#R ^RightLever ! #R ^LeftLever: Set C(I)= T + 0.1, T=0;Z3; ADD I;

IF I >=4000 [@TRUE,@FALSE]

@TRUE:--->STOPABORT

@FALSE:SET C(I) =-987.987--->SX

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

\S. S. 5, is for the the reinforcement pip in

\the cumulative record.

S.S.5,

S1,

#Start:--->s2

s2,

#Z1:--->s3

s3,

#Z2:Set C(I)= T + 0.2, T=0;Z3; ADD I;IF I >=4000 [@TRUE,@FALSE]

@TRUE:--->STOPABORTFLUSH

@FALSE:SET C(I) =-987.987--->SX

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

\S. S. 6

S.S.6,

s1,

#Start:--->s2

s2,

#Z1:SET D(E+1)=-987.987--->s3

s3,

1':ADD E;SET D(E)=0, D(E+1)=-987.987;z6;IF E>=90 [@STOP,@CONTINUE]

@STOP:--->STOPABORTFLUSH

@CONTINUE:--->sx

#R^RightLever!#R^LeftLever:show 1,nRfts=,r;ADD D(E);

show 2,nRESP=,A(r)--->sx

#k99:--->STOPABORTFLUSH

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

s.s.7, \Flashes every minute after the first 10 pellets

s1,

#z6:on ^ExternalLight--->s2

s2,

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