Dual lever- with different punishment time and reward amount

MEDState Notation Repository Forums Coding Help Archive Dual lever- with different punishment time and reward amount

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12776
    Med_Support
    Moderator
    c_salcido

    Hello-
    I have just realized I don’t have any clue what I am doing despite the manual. I am trying to set up a program that allows for both the right and left levers to be present at the same time (this I know), but where the levers have a different punishment time and a different amount of reward given when the animal presses it.

    Please help! Thanks

    #12775
    Med_Support
    Moderator
    Jon Beyor

    Do you have any code so far? Make 2 State Sets each extending the appropriate lever and then each progressing in their own scenario.

    #12781
    Med_Support
    Moderator
    c_salcido

    Jon,
    Does setting each state and extending the appropriate scenario involve using an array? I apologize, I am still learning what all of this means! Thanks for your time!

    #12783
    Med_Support
    Moderator
    Jon Beyor

    Please tell me exactly what you want your program to do and email it to support@med-associates.com (attention Jon).

     

    I know you want both lever to extend and then each to have different punishment and reward but be specific and email me exactly what your looking for and I will send you some code. You are also duplicating a lot of stuff in the code you posted which you will need to clean up as well. We will get to that as well.

     

    Thanks,
    Jon

    #12785
    Med_Support
    Moderator
    c_salcido

    Thank you, Jon! And I have sent the email. I really appreciate the help.

    #12779
    Med_Support
    Moderator
    c_salcido

    Ok, so this is what i currently have for the dual levers coming out at the same time, but have no idea how to extend it for the left lever having lets say 4 pellets and a wait time of 40 secs or right lever with 1 pellet 5 secs of wait time until the both levers can come out again so the animal may choose.
    Thanks in advance!

     

     

     

    \Dual lever
    \Written by C. Salcido
    
     
    
    \ INPUTS
    ^LeftLever = 7
    ^RightLever = 6
    
    \ OUTPUTS
    ^Dispenser = 8
    ^LeftLight = 10
    ^RightLight = 9
    ^HouseLight = 12
    
    
    \ CONSTANTS
    \ A = Lever Presses
    \ B = Rewards
    \ C = Failures
    \ D = Trial Number
    \ X = Time
    \ Y = Data Array
    
     
    
    DIM Y=59
    
     
    
    
    \Basic FR Logic
    S.S.1,
    S1,
    #START: ON^RightLever; ON^LeftLever; On^HouseLight; On^RightLight; On^LeftLight; Z3 ---> S2
    S2,
    #R^RightLever: ON^Pellet; OFF ^RightLever, ^RightLight, ^LeftLever, ^LeftLight; Z1 ---> S3
    #R^LeftLever: ON^Pellet; OFF ^LeftLever, ^LeftLight, ^RightLever, ^RightLight; Z1 ---> S3
    
    S3,
    1#Z4: ON ^RightLever, ^RightLight, ^LeftLever, ^LeftLight, ---> S2
    
    
    \Scoring a reward
    S.S.2,
    S1,
    #START: SHOW 2, RIGHTLEVER,R ---> S2
    #START: SHOW 1, LEFTLEVER,L ---> S2
    
    S2,
    #R^RIGHTLEVER: ADD R; SHOW 2,RIGHTLEVER,R ---> SX
    #R^LEFTLEVER: ADD L; SHOW 1,LEFTLEVER,L ---> SX
    S3,
    0.05": OFF^Pellet ---> S2
    
    
    
    \Scoring for a lever press in less than 10 seconds
    S.S.3,
    S1,
    #START: SHOW 2, RIGHTLEVER,R ---> S2
    #START: SHOW 1, LEFTLEVER,L ---> S2
    
    S2,
    #R^RIGHTLEVER: ADD R; SHOW 2,RIGHTLEVER,R ---> SX
    #R^LEFTLEVER: ADD L; SHOW 1,LEFTLEVER,L ---> SX
    
    
    
    \Scoring for a failure-to-press in less than 10 seconds
    S.S.4,
    S1,
    #START: SHOW 3, Failures, C ---> S2
    S2,
    #Z2: ADD C; Show 3, Failures, C ---> S2
    
    
    
    \Experiment Timer
    S.S.5,
    S1,
    #START: ---> S2
    S2,
    30': ---> STOPABORTFLUSH
    
    
    
    \Trial Timer
    S.S.6,
    S1,
    #START ---> S2
    S2,
    10.1": IF X>=10 [@True, @False]
    @True: Z2; SET Y(I)=X, X=0; ADD I ---> S3
    @False: ---> S3
    #Z1: ---> S3
    S3,
    #Z4: ---> S2
    
    
    
    \Trial Counter
    S.S.7,
    S1,
    #START: SET D=1; Show 4, Trial Number, D ---> S2
    S2,
    #Z4: ADD D; Show 4, Trial Number, D ---> SX
    
    
    
    \ Recording IRT's
    S.S.8,
    S1,
    #START ---> S2
    S2,
    #Z1: SET Y(I)=X, X=0; ADD I ---> SX
    
    
    
    \X Timer
    S.S.9
    S1,
    #START ---> S2
    S2,
    .1": SET X=X+.1; SHOW 5, X, X ---> SX
    #Z4: SET X = 0 ---> SX
    
    
    
    \ Another Trial Timer
    S.S.10,
    S1,
    #START: ---> S2
    
    S2,
    
    30": Z4 ---> S2
    

     

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.