| Reference | Downloads | Github

How do I make the experiment terminate if the subject has reached a certain recall threshold?

I am running a paired associates test using version 3.0.5., and I would like participants to reach a certain recall threshold by the end of a session, say 40%. If they don’t reach the threshold when they are tested on the words, I would like the test phase to repeat so they can test again. And if they do reach the threshold, I would like the experiment to end. How should I do this? It might be a coder issue, not a builder one, but I’m not sure so I put this under builder.

Hi, Ryan.

I’m kinda new in Psychopy but what I would do in your case is:

  1. Create a loop (let’s call it “testAgain”). Put a large number in nReps, like 10 or 20, it does not matter because I don’t think the participant would test himself again 10 times. All of the testing routines must be inside this loop, so they get repeated in case the participant don’t reach the threshold

  2. Create a code componente and go to the “End Routine” box. This code component has to be in the last routine of the loop.

  3. Define a variable that stores the treshold you want the participant to reach. For example:
    if the total number of right answers are 10, then threshold = 4

  4. Create a conditional that tells Psychopy if the experiment would end there or it has to repeat the loop again. Something like this:

if threshhold >= 4:
testAgain.finished = True

If the participant reach the threshold, the experiment is going to end. Otherwise, the loop is going to restart and so the test.

I think this will work. Hope it helps.

PD: New to the forum also, I don’t know yet how to put the code in a code box so it looks prettier and readable.

Thank you, Willmar. I will try and implement your recommendation and see what happens.