Delayed matching to position species: rat
Maintainer Daniel Kueh Current version 0.1 View the changelog
Original Author Daniel Kueh Date last modified Mar-7-2005
License BSD MED-PC version 4
No description given
Dunnett, S. (1993). Operant delayed matching and non-matching to position in rats. In A. Sahgal (Vol. Ed.), Behavioral Neuroscience: Vol. 1. A Practical Approach (pp. 123-136). New York: Oxford University Press.
Code
How to use this code Download the code Download an example macro Download the profile
 
\DELAYED MATCHING TO POSITION PROGRAM by Daniel Kueh May 14, 2005

\COUNTERS SUMMARY
\C(0) = DELAY INTERVAL
\C(1) = NUMBER OF TRIALS
\C(2) = NUMBER OF CORRECT TRIALS (REINFORCEMENT)
\C(3) = TRIALS WITH LEFT SAMPLE
\C(4) = TRIALS WITH RIGHT SAMPLE
\C(5) = LEFT CORRECT RESPONSES
\C(6) = RIGHT CORRECT RESPONSES
\C(7) = LEFT CORRECT RESPONSES (0 SEC)
\C(8) = RIGHT CORRECT RESPONSES (0 SEC)
\C(9) = LEFT CORRECT RESPONSES (2 SEC)
\C(10) = RIGHT CORRECT RESPONSES (2 SEC)
\C(11) = LEFT CORRECT RESPONSES (4 SEC)
\C(12) = RIGHT CORRECT RESPONSES (4 SEC)
\C(13) = LEFT CORRECT RESPONSES (8 SEC)
\C(14) = RIGHT CORRECT RESPONSES (8 SEC)
\C(15) = LEFT CORRECT RESPONSES (12 SEC)
\C(16) = RIGHT CORRECT RESPONSES (12 SEC)
\C(17) = LEFT CORRECT RESPONSES (16 SEC)
\C(18) = RIGHT CORRECT RESPONSES (16 SEC)
\C(19) = LEFT CORRECT RESPONSES (24 SEC)
\C(20) = RIGHT CORRECT RESPONSES (24 SEC)
\C(21) = LEFT CORRECT RESPONSES (32 SEC)
\C(22) = RIGHT CORRECT RESPONSES (32 SEC)
\C(23) = LEFT ERROR RESPONSES
\C(24) = RIGHT ERROR RESPONSES
\C(25) = LEFT ERROR RESPONSES (0 SEC)
\C(26) = RIGHT ERROR RESPONSES (0 SEC)
\C(27) = LEFT ERROR RESPONSES (2 SEC)
\C(28) = RIGHT ERROR RESPONSES (2 SEC)
\C(29) = LEFT ERROR RESPONSES (4 SEC)
\C(30) = RIGHT ERROR RESPONSES (4 SEC)
\C(31) = LEFT ERROR RESPONSES (8 SEC)
\C(32) = RIGHT ERROR RESPONSES (8 SEC)
\C(33) = LEFT ERROR RESPONSES (12 SEC)
\C(34) = RIGHT ERROR RESPONSES (12 SEC)
\C(35) = LEFT ERROR RESPONSES (16 SEC)
\C(36) = RIGHT ERROR RESPONSES (16 SEC)
\C(37) = LEFT ERROR RESPONSES (24 SEC)
\C(38) = RIGHT ERROR RESPONSES (24 SEC)
\C(39) = LEFT CORRECT RESPONSES (32 SEC)
\C(40) = RIGHT CORRECT RESPONSES (32 SEC)
\C(41) = PERCENT CORRECT RESPONSES
\C(42) = NUMBER OF HEAD ENTRIES

\VARIABLE SUMMARY
\A = DELAY INTERVAL SELECTION
\E = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (O SEC)
\F = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (2 SEC)
\G = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (4 SEC)
\H = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (8 SEC)
\I = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (12 SEC)
\R = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (16 SEC)
\V = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (24 SEC)
\W = DATA ARRAY FOR RECORDING LATENCY TO RESPOND TO CHOICE LEVER (32 SEC)
\J = INCREMENT OF ARRAY E
\K = TIME CONVERSION FOR DELAY
\L = INCREMENT OF ARRAY F
\M = MINUTES IN CLOCK
\N = SECONDS IN CLOCK
\O = INCREMENT OF ARRAY G
\P = INCREMENT OF ARRAY H
\Q = INCREMENT OF ARRAY I
\U = INCREMENT OF ARRAY W
\S = INCREMENT OF ARRAY R
\T = TIME INCREMENT
\X = ONE OF THE LEVERS OF ARRAY D DETERMINED RANDOMLY EACH CYCLE

\Z PULSES
\Z1 = LEFT CORRECT RESPONSES (0 SEC)
\Z2 = RIGHT CORRECT RESPONSES (0 SEC)
\Z3 = LEFT CORRECT RESPONSES (2 SEC)
\Z4 = RIGHT CORRECT RESPONSES (2 SEC)
\Z5 = LEFT CORRECT RESPONSES (4 SEC)
\Z6 = RIGHT CORRECT RESPONSES (4 SEC)
\Z7 = LEFT CORRECT RESPONSES (8 SEC)
\Z8 = RIGHT CORRECT RESPONSES (8 SEC)
\Z9 = LEFT CORRECT RESPONSES (12 SEC)
\Z10 = RIGHT CORRECT RESPONSES (12 SEC)
\Z11 = LEFT CORRECT RESPONSES (16 SEC)
\Z12 = RIGHT CORRECT RESPONSES (16 SEC)
\Z13 = LEFT CORRECT RESPONSES (24 SEC)
\Z14 = RIGHT CORRECT RESPONSES (24 SEC)
\Z15 = LEFT CORRECT RESPONSES (32 SEC)
\Z16 = RIGHT CORRECT RESPONSES (32 SEC)
\Z17 = TIMER
\Z18 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (0 SEC)
\Z19 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (2 SEC)
\Z20 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (4 SEC)
\Z21 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (8 SEC)
\Z22 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (12 SEC)
\Z23 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (16 SEC)
\Z24 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (24 SEC)
\Z25 = RECORD LATENCY TO RESPOND TO CHOICE LEVER (32 SEC)

\ARRAY D
\TWO DIFFERENT PROGRAMS
\1 = LEFT SAMPLE
\2 = RIGHT SAMPLE

\CONSTANTS
\INPUTS
^LEFTR = 1
^RIGHTR = 3
^HE = 6

\OUTPUTS
^LEFT = 1
^RIGHT = 2
^FOOD = 4
^HL = 7
^LLITE = 9
^RLITE = 10
^FAN = 16

LIST D = 1 , 2
LIST A = 0", 2", 4", 8", 12", 16", 24", 32"

DIM C = 43
DIM E = 999
DIM F = 999
DIM G = 999
DIM H = 999
DIM I = 999
DIM R = 999
DIM V = 999
DIM W = 999

\BOXCHECK
S.S.1,
S1,
	1": ON ^LEFT, ^RIGHT, ^HL --->S2
S2,
	2#R1: ON ^LLITE, ^RLITE, --->S3
S3,
	2#R3: OFF ^LLITE, ^RLITE, ^HL; ON ^FOOD --->S4
S4,
	#R6: OFF ^FOOD; OFF ^LEFT, ^RIGHT; --->S5
S5,
	.5": ---> SX

\MAIN CONTROL
S.S.2,
S1, \START SESSION
	#START: ON ^HL, ^FAN; SHOW 2, TRIAL, C(1), 3, HE, C(42), 4, %TOT, C(41), 5, SR+, C(2) ---> S2
S2, \INTERTRIAL INTERVAL
	5": ---> S3
S3, \PRESENT SAMPLE LEVER
	.01": RANDI X = D;
	IF X = 1 [@ONETRUE, @ONEFALSE]
		@ONETRUE: ON^LEFT; ADD C(3) ---> S4
		@ONEFALSE: ON^RIGHT; ADD C(4) ---> S11
S4,
	#R^LEFTR: ---> S5
S5,
	.5": OFF ^LEFT ---> S6
S6, \DELAY INTERVAL FOR LEFT
	.01": RANDD K = A ---> S7
S7,
	K#T: ---> S8
S8, \REGISTER PANEL PRESS FOR LEFT
	#R^HE: ADD C(42); SHOW 3, HE, C(42); OFF ^LLITE, ^RLITE ---> S9
S9, \PRESENT CHOICE LEVERS
	.01": ON^LEFT, ^RIGHT; Z1; Z3; Z5; Z7; Z9; Z11; Z13; Z15; Z17; ---> S10
S10, \REGISTER CORRECT LEFT RESPONSE
	#R^LEFTR: ADD C(5) ---> S18
	#R^RIGHTR: ADD C(24) ---> S21
S11,
	#R^RIGHTR: ---> S12
S12,
	.5": OFF ^RIGHT ---> S13
S13, \DELAY INTERVAL FOR RIGHT
	.01": RANDD K = A ---> S14
S14,
	K#T: ---> S15
S15, \REGISTER PANEL PRESS FOR RIGHT
	#R^HE: ADD C(42); SHOW 3, HE, C(42); OFF ^LLITE, ^RLITE ---> S16
S16, \PRESENT CHOICE LEVERS
	.01": ON^LEFT, ^RIGHT; Z2; Z4; Z6; Z8; Z10; Z12; Z14; Z16; Z17 ---> S17
S17, \REGISTER CORRECT RIGHT RESPONSE
	#R^RIGHTR: ADD C(6) ---> S18
	#R^LEFTR: ADD C(23) ---> S20
S18, \REINFORCEMENT
	.5": OFF ^LEFT, ^RIGHT; ON ^LLITE, ^RLITE, ^FOOD; ADD C(2); SHOW 5, SR+, C(2) ---> S19
S19, \COLLECT FOOD
	#R^HE: OFF ^FOOD, ^LLITE, ^RLITE ---> S24
S20, \ERROR LEFT
	.5": OFF ^LEFT, ^RIGHT, ^HL ---> S22
S21, \ERROR RIGHT
	.5": OFF ^LEFT, ^RIGHT, ^HL ---> S23
S22, \LEFT TIMEOUT
	5": ---> S25
S23, \RIGHT TIMEOUT
	5": ---> S27
S24, \FINISH
	1": ---> S2
S25, \CORRECTION FOR ERROR LEFT
	5": ON ^HL---> S26
S26, \PRESENT RIGHT LEVER
	.01": SET X = 2;
	IF X = 2 [@TWOTRUE, @TWOFALSE]
		@TWOTRUE: ON^RIGHT; ADD C(4) ---> S11
		@TWOFALSE: ON^LEFT; ADD C(3) ---> SX
S27, \CORRECTION FOR ERROR RIGHT
	5": ON ^HL ---> S28
S28, \PRESENT LEFT LEVER
	.01": SET X = 1;
	IF X = 1 [@THREETRUE, @THREEFALSE]
		@THREETRUE: ON^LEFT; ADD C(3) ---> S4
		@THREEFALSE: ON^RIGHT; ADD C(4) ---> SX

S.S.3,
S1,
	#START: SHOW 1, MIN, M---> S2
S2,
	1": ADD N; IF N=60 [@FOURTRUE, @FOURFALSE]
		@FOURTRUE: ADD M; SET N=0; SHOW 1, MIN, M --->SX
		@FOURFALSE: SHOW 1, MIN, M --->SX

S.S.4,
S1,
	#START: ---> S2
S2,
	.01": IF C(5)+C(6)>0 [@FIVETRUE,@FIVEFALSE]
		@FIVETRUE:SET C(41)= ((C(5)+C(6))/(C(5)+C(6)+C(23)+C(24))) * 100; SHOW 4, %TOT, C(41) --->SX
		@FIVETRUE:SET C(41)= -999 --->SX

S.S.5,
S1,
	#START: ---> S2
S2,
	40': SET C(41)= ((C(5)+C(6))/(C(5)+C(6)+C(23)+C(24))) * 100 ---> S3
S3,
	.01": ALERTON ---> STOPABORTFLUSH

S.S.6,
S1,
	#START: ---> S2
S2,
	.01": SET C(1)= C(3)+C(4); SHOW 2, TRIAL, C(1) ---> SX

S.S.7, \LEFT CORRECT RESPONSES (0 SEC)
S1,
	#START: ---> S2
S2,
	#Z1: IF K = 0" [@SIXTRUE, @SIXFALSE]
		@SIXTRUE: ---> S3
		@SIXFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(7); Z18 ---> S2
	#R^RIGHTR: ADD C(26); Z18 ---> S2

S.S.8, \RIGHT CORRECT RESPONSES (0 SEC)
S1,
	#START: ---> S2
S2,
	#Z2: IF K = 0" [@SEVENTRUE, @SEVENFALSE]
		@SEVENTRUE: ---> S3
		@SEVENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(8); Z18 ---> S2
	#R^LEFTR: ADD C(25); Z18 ---> S2

S.S.9, \LEFT CORRECT RESPONSES (2 SEC)
S1,
	#START: ---> S2
S2,
	#Z3: IF K = 2" [@EIGHTTRUE, @EIGHTFALSE]
		@EIGHTTRUE: ---> S3
		@EIGHTFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(9); Z19 ---> S2
	#R^RIGHTR: ADD C(28); Z19 ---> S2

S.S.10, \RIGHT CORRECT RESPONSES (2 SEC)
S1,
	#START: ---> S2
S2,
	#Z4: IF K = 2" [@NINETRUE, @NINEFALSE]
		@NINETRUE: ---> S3
		@NINEFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(10); Z19 ---> S2
	#R^LEFTR: ADD C(27); Z19 ---> S2

S.S.11, \LEFT CORRECT RESPONSES (4 SEC)
S1,
	#START: ---> S2
S2,
	#Z5: IF K = 4" [@TENTRUE, @TENFALSE]
		@TENTRUE: ---> S3
		@TENFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(11); Z20 ---> S2
	#R^RIGHTR: ADD C(30); Z20 ---> S2

S.S.12, \RIGHT CORRECT RESPONSES (4 SEC)
S1,
	#START: ---> S2
S2,
	#Z6: IF K = 4" [@ELEVENTRUE, @ELEVENFALSE]
		@ELEVENTRUE: ---> S3
		@ELEVENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(12); Z20 ---> S2
	#R^LEFTR: ADD C(29); Z20 ---> S2

S.S.13, \LEFT CORRECT RESPONSES (8 SEC)
S1,
	#START: ---> S2
S2,
	#Z7: IF K = 8" [@TWELVETRUE, @TWELVEFALSE]
		@TWELVETRUE: ---> S3
		@TWELVEFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(13); Z21 ---> S2
	#R^RIGHTR: ADD C(32); Z21 ---> S2

S.S.14, \RIGHT CORRECT RESPONSES (8 SEC)
S1,
	#START: ---> S2
S2,
	#Z8: IF K = 8" [@THIRTEENTRUE, @THIRTEENFALSE]
		@THIRTEENTRUE: ---> S3
		@THIRTEENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(14); Z21 ---> S2
	#R^LEFTR: ADD C(31); Z21 ---> S2

S.S.15, \LEFT CORRECT RESPONSES (12 SEC)
S1,
	#START: ---> S2
S2,
	#Z9: IF K = 12" [@TWELVETRUE, @TWELVEFALSE]
		@TWELVETRUE: ---> S3
		@TWELVEFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(15); Z22 ---> S2
	#R^RIGHTR: ADD C(34); Z22 ---> S2

S.S.16, \RIGHT CORRECT RESPONSES (12 SEC)
S1,
	#START: ---> S2
S2,
	#Z10: IF K = 12" [@THIRTEENTRUE, @THIRTEENFALSE]
		@THIRTEENTRUE: ---> S3
		@THIRTEENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(16); Z22 ---> S2
	#R^LEFTR: ADD C(33); Z22 ---> S2

S.S.17, \LEFT CORRECT RESPONSES (16 SEC)
S1,
	#START: ---> S2
S2,
	#Z11: IF K = 16" [@FOURTEENTRUE, @FOURTEENFALSE]
		@FOURTEENTRUE: ---> S3
		@FOURTEENFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(17); Z23 ---> S2
	#R^RIGHTR: ADD C(36); Z23 ---> S2

S.S.18, \RIGHT CORRECT RESPONSES (16 SEC)
S1,
	#START: ---> S2
S2,
	#Z12: IF K = 16" [@FIFTHTEENTRUE, @FIFTHTEENFALSE]
		@FIFTHTEENTRUE: ---> S3
		@FIFTHTEENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(18); Z23 ---> S2
	#R^LEFTR: ADD C(35); Z23 ---> S2

S.S.19, \LEFT CORRECT RESPONSES (24 SEC)
S1,
	#START: ---> S2
S2,
	#Z13: IF K = 24" [@SIXTEENTRUE, @SIXTEENFALSE]
		@SIXTEENTRUE: ---> S3
		@SIXTEENFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(19); Z24 ---> S2
	#R^RIGHTR: ADD C(38); Z24 ---> S2

S.S.20, \RIGHT CORRECT RESPONSES (24 SEC)
S1,
	#START: ---> S2
S2,
	#Z14: IF K = 24" [@SEVENTEENTRUE, @SEVENTEENFALSE]
		@SEVENTEENTRUE: ---> S3
		@SEVENTEENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(20); Z24 ---> S2
	#R^LEFTR: ADD C(37); Z24 ---> S2

S.S.21, \LEFT CORRECT RESPONSES (32 SEC)
S1,
	#START: ---> S2
S2,
	#Z15: IF K = 32" [@EIGHTTEENTRUE, @EIGHTTEENFALSE]
		@EIGHTTEENTRUE: ---> S3
		@EIGHTTEENFALSE: ---> SX
S3,
	#R^LEFTR: ADD C(21); Z25 ---> S2
	#R^RIGHTR: ADD C(40); Z25 ---> S2

S.S.22, \RIGHT CORRECT RESPONSES (32 SEC)
S1,
	#START: ---> S2
S2,
	#Z16: IF K = 32" [@NINETEENTRUE, @NINETEENFALSE]
		@NINETEENTRUE: ---> S3
		@NINETEENFALSE: ---> SX
S3,
	#R^RIGHTR: ADD C(22); Z25 ---> S2
	#R^LEFTR: ADD C(39); Z25 ---> S2

S.S.23,
S1,
	#START: ---> S2
S2,
	.01": SET C(0)= 32 ---> SX
	#Z17: SET T = 0 --->SX

S.S.24,
S1,
	#Z17:SET T = 0 ---> S2
S2,
	.1": SET T = (T + 0.1) ---> SX

S.S.25, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (0 SEC)
S1,
	#Z18: SET E(J) = T; ADD J; SET E(J) = -987.987 ---> SX

S.S.26, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (2 SEC)
S1,
	#Z19: SET F(L) = T; ADD L; SET F(L) = -987.987 ---> SX

S.S.27, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (4 SEC)
S1,
	#Z20: SET G(O) = T; ADD O; SET G(O) = -987.987 ---> SX

S.S.28, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (8 SEC)
S1,
	#Z21: SET H(P) = T; ADD P; SET H(P) = -987.987 ---> SX

S.S.29, , \RECORD LATENCY TO RESPOND TO CHOICE LEVER (12 SEC)
S1,
	#Z22: SET I(U) = T; ADD U; SET I(U) = -987.987 ---> SX

S.S.30, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (16 SEC)
S1,
	#Z23: SET R(Q) = T; ADD Q; SET R(Q) = -987.987 ---> SX

S.S.31, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (24 SEC)
S1,
	#Z24: SET V(S) = T; ADD S; SET V(S) = -987.987 --->SX

S.S.32, \RECORD LATENCY TO RESPOND TO CHOICE LEVER (32 SEC)
S1,
	#Z25: SET W(B) = T; ADD B; SET W(B) = -987.987 ---> SX


              
Related programs Other versions
No training programs submitted/required

No older versions available
No experimental versions available