\ STOP TASK: LEFT LEVER TRAINING \ \ Fourth version (4.0): January 19, 2004 \ Animals are trained according to DM Eagle and TW Robbins (2003). \ Training proceeds in four phases, several programs need input \ individual to the animals, and provides output for the following \ session. \ [1] Nosepoke training \ *[2] Left lever training* \ [3] Go trials training \ [4] Stop-signal task \COMMON CODE SECOND ARRAY ^Left=1 ^ExtLeft=1 ^LeftExt=1 ^Leftresp=1 ^LeftLever=1 ^Right=2 ^ExtRight=2 ^RightExt=2 ^RightResp=2 ^RightLever=2 ^Tone=3 ^Feeder=4 ^Magazine=4 ^LeftLight=5 ^Middlelight=6 ^Centrelight=6 ^MagazineLight=6 ^RightLight=7 ^Houselight=8 \End common code \Z-pulses ^SS=1 \Start session ^ES=2 \End session ^ST=3 \Start trial ^Reward=8 \Reward ^Leverpress=10 \Left lever press ^Omission=11 \Omission \Independents DIM A=4 VAR_ALIAS Maximum duration = A(0) VAR_ALIAS Maximum rewards = A(1) VAR_ALIAS Inter-trial interval = A(2) VAR_ALIAS Left lever extension time = A(3) VAR_ALIAS Timeout time = A(4) \Dependents DIM I=1000 VAR_ALIAS IRT=I(0) VAR_ALIAS Rewards=R VAR_ALIAS Duration=D VAR_ALIAS Omissions=O S.S.1, \Basic logic S1, #START: SET A(0)=30; SET A(1)=25; SET A(2)=10"; SET A(3)=60"; SET A(4)=5"; ON^HouseLight; Z^SS ---> S2 S2, A(2)#T: ON^LeftLight,^LeftExt ---> S3 S3, #R^Left: ADD R; SET I(R)=D; Z^Leverpress; Z^Reward; OFF^LeftExt,^LeftLight; IF R>=A(1) [@TrueStop; @FalseCont] @TrueStop: Z^ES ---> S10 @FalseCont: ---> S2 A(3)#T: OFF^LeftExt; OFF^LeftLight; OFF^HouseLight; ADD O; Z^Omission ---> S5 S5, \TimeOut A(4)#T: ON^HouseLight ---> S2 S10, A(3)#T: OFF^HouseLight; SET I(R+1)=-987.987 ---> StopAbortFlush S.S.2, \Rewards S1, #Z^Reward: ON^CentreLight,^Feeder---> S2 S2, #R^Feeder: OFF^CentreLight,^Feeder ---> S1 S.S.3, \Timers S1, #Z^SS: ---> S2 S2, 0.1": SET D=D+0.1; IF D>(A(0)*60) [@TrueStop, @FalseContinue] @TrueStop: Z^ES ---> STOPABORTFLUSH @FalseContiue: ---> S2 S.S.4, \Screen writer S1, #Z^SS: ---> S2 S2, .1": SHOW 1, Duration, D; SHOW 2, Rewards, R; SHOW 6, IRT, I(R); SHOW 7, Omission, O ---> S2