Fixed ratio species: any
Maintainer Maartje Rijkens Current version 0.1 View the changelog
Original Author Maartje Rijkens Date last modified Mar-7-2005
License BSD MED-PC version 4
In a fixed ratio schedule (FR-x) the animal must meet a set response requirement in order to obtain a particular reward. For example, in an FR-1 the animal receives a reward after every response. Whereas in an FR-5 schedule the animal has to respond five times before it receives the reward.
No references given. Click to e-mail a reference to the maintainer.
Code
How to use this code Download the code Download an example macro Download the profile
 
            

\This is a Fixed Ratio-1 \Filename, FixedRatio.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 \E = DATA ARRAY LEFTLEVER \F = DATA ARRAY RIGHTlEVER \G = DATA ARRAY REWARD \M = MINUTES \X = FIXED RATIO \N = SESSION TIMER \Q = MAXIMUM REWARD VAR_ALIAS Fixed ratio = X VAR_ALIAS Maximum reward = Q VAR_ALIAS duration session (min) = M DIM E = 30 DIM F = 30 DIM G = 30 DIM J = 150 S.S.1, \Main control logic for "FR" S1, 0.001": SET X = 1; SET Q = 10 ; SET M = 120 ---> S2 S2, #START: ON ^House, ^LeftLever, ^RightLever, ^Fan ---> S3 S3, X#R^LeftLever: OFF ^House, ^LeftLever, ^RightLever; ON ^Reward, ^LeftCue; Z1 ---> SX #Z2:--->S1 S.S.2, \This is the state set that contains the response count and display of the active lever S1, #Start: SHOW 2,ACTIVE,A ---> S2 S2, #R^LeftLever: ADD A; SET E(A) = n ;SHOW 2,ACTIVE,A ---> SX #Z2:--->S1 S.S.3, \This is the state set that contains the response count and display of the inactive lever S1, #Start: SHOW 3,INACTIVE,B ---> S2 S2, #R^RightLever: ADD B; SET F(B) = n; SHOW 3,INACTIVE,B---> SX #Z2:--->S1 S.S.4, \This is the state set that contains the response count and display for the nosepokes S1, #Start: SHOW 5,NOSEPOKE,I ---> S2 S2, #R^NosePoke: ADD I; SET J(I) = n ; SHOW 5, NOSEPOKE ,I ---> SX S.S.5, \Reward counter and Timer S1, #Z1: ADD C; SET G(C) = n ; SHOW 4,REWARD,C ---> S2 S2, 5.6": OFF ^REWARD,^LeftCue ---> S3 #Z2:--->S1 S3, 14.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; SHOW 1, Sess_n,N; IF (N/60 >= M) OR (A >= Q) [@True, @False] \As long as session time < M we will continue @True: Z2 ---> S3 @False: ---> SX S3, 5.6": OFF ^House, ^LeftLever, ^RightLever ---> STOPABORTFLUSH

Related programs Other versions
No training programs submitted/required

No older versions available
No experimental versions available