\This is a Progressive Ratio
\Filename, PR.mpc
\Written by Maartje Rijkens
\Date March 7, 2005
\This section is for inputs
^LeftLever = 1
^RightLever = 2
^NosePoke = 3
\This section is for outputs
^House = 7
^Reward = 8 \In this code, this is a syringe pump.
^LeftCue = 5
^Fan = 3
\DEFINED VARIABLES
\A = NUMBER OF RESPONSES
\B = NUMBER OF REWARDS
\D = OUTPUT ARRAY
\E = DATA ARRAY LEFTLEVER
\F = DATA ARRAY RIGHTlEVER
\G = DATA ARRAY REWARD
\M = MINUTES
\X = FIXED RATIO
\N = SESSION TIMER
\Q = MAXIMUM REWARD
DIM E = 4000
DIM F = 29
DIM G = 30
DIM J = 100
LIST D = 1, 2, 4, 9, 12, 15, 20, 25, 32, 40, 50, 62, 77, 95, 118, 145, 178, 219, 268, 328, 402, 492, 603, 737, 901, 1102, 1347, 1647, 2012
\ LIST D was derived from the following equation:
\ [ (injection number * 0.2)]
\ Response ratio = [5e ] - 5 (Richardson and Roberts, 1996)
S.S.1, \Main control logic for "FR"
S1,
#START: ADD N; SHOW 1,Sess_n,N; ON ^House, ^LeftLever, ^RightLever, ^Fan; ---> S2
S2,
0.001': LIST X = D(R); SHOW 2,VI =,X ---> S3
#Z2:--->S1
S3,
X#R^LeftLever: OFF ^House, ^LeftLever, ^RightLever; ON ^Reward, ^LeftCue; Z1 ---> S4
60': OFF ^House, ^LeftLever, ^RightLever; Z2 --->STOPABORTFLUSH
#Z2:--->S1
S4,
10': ---> S2
S.S.2, \This is the state set that contains the response count and display for the active lever
S1,
#Start: SHOW 3,ACTIVE,A ---> S2
S2,
#R^LeftLever: ADD A; SET E(A) = n ; SHOW 3,ACTIVE,A ---> SX
S.S.3, \This is the state set that contains the response count and display for the inactive lever
S1,
#Start: SHOW 4,INACTIVE,B ---> S2
S2,
#R^RightLever: ADD B; SET F(B) = n; SHOW 4,INACTIVE,B ---> SX
S.S.4, \This is the state set that contains the response count and display for the nosepokes
S1,
#Start: SHOW 6,NOSEPOKE,I ---> S2
S2,
#R^NosePoke: ADD I; SET J(I) = n ; SHOW 6, NOSEPOKE ,I ---> SX
S.S.5, \Reward counter and Timer
S1,
#Z1: ADD C; SET G(C) = n ; SHOW 5,REWARD,C ---> S2
S2,
5.6": OFF ^REWARD,^LeftCue ---> S3
#Z2:--->S1
S3,
594.4": ON ^House, ^LeftLever, ^RightLever ---> S1
#Z2:--->S1
S.S.6, \Session Timer
S1,
#START: SHOW 1,Sess_n,N ---> S2
S2,
1": ADD N;
|