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
- This topic has 5 replies, 1 voice, and was last updated 8 years, 9 months ago by
Med_Support.
-
AuthorPosts
-
January 21, 2016 at 9:10 am #12776
Med_Support
Moderatorc_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
January 21, 2016 at 4:47 pm #12775Med_Support
ModeratorJon 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.
January 23, 2016 at 9:45 am #12781Med_Support
Moderatorc_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!January 25, 2016 at 8:56 am #12783Med_Support
ModeratorJon 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,
JonJanuary 25, 2016 at 12:41 pm #12785Med_Support
Moderatorc_salcido
Thank you, Jon! And I have sent the email. I really appreciate the help.
January 21, 2017 at 6:13 pm #12779Med_Support
Moderatorc_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
-
AuthorPosts
- You must be logged in to reply to this topic.