Having trouble with #R and SR

MEDState Notation Repository Forums Coding Help Archive Having trouble with #R and SR

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12787
    Med_Support
    Moderator
    Welcome2Machine

    What to do if a response is accidentally made while levers are retracted, reinforcement is still being delivered, therefore how can I stop this from happening? I have tried to set parameters, such as, when to count a response and when to deliver reinforcement by using an IF statement but doesn’t seem to work.

    #12788
    Med_Support
    Moderator
    Jim Frei

    You would use a variable to track the lever’s state. For example, when the lever is retracted set S = 0, when it’s extended set S = 1. Then, in the state where you are watching for lever presses use an IF statement to check the levers state and only increment your counter when S = 1. Ie:

    #R^lever: IF S = 1 [@T, @F]
    @T: ADD A; SHOW 1, Lever Presses, A ---> SX
    @F: ---> SX
    

    If you need more help just let me know.

    Jim

    #12792
    Med_Support
    Moderator
    Welcome2Machine

    Hello Jim! Thank you for your feedback, it was extremely helpful and now the program is working great!

    Thanks again.

    Welcome2Machine :D

    #12794
    Med_Support
    Moderator
    Jim Frei

    Glad to help.

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