PsychoPy version : 2020 1.2
Standard Standalone? : Y

*What are you trying to achieve? : With the perspective of putting my experiment online on Pavlovia, I have been using the builder to recreate an experiment that I had coded back a few years ago. Being new to the builder, I am looking to transpose my adaptive design, but I can’t seem to find how to do it with the staircase functions.

What my design is about : My experiment consists in an audiovisual training procedure, where the acoustical distance between the sounds presented is progressively reduced depending on the precision of the participant’s answer.

Technicalities : My goal is to create a loop which is exited when the participant has answered correctly on at least 90% of the last 60 consecutive trials. My trials are divided into blocks of 20, meaning that at least three blocks have to be run before the participant could move up one level.
In the coder, I had a “counting” variable that was incremented for each block where the score was at least 18/20, and when it reached 3, the loop exited and went on to the next one (the next level). If the participant failed to reach 18/20 on one block, the “counting” variable was reset to 0 and the participant started from scratch again.

What I have done so far : So far, I have created the instructions and end of task routines, I have also added the trial and feedback routines (with some bits of code for the feedback, I tested it with just one block of 20 trials and it works fine).
Now, I am trying to understand what kind of loop to use in order to achieve what I’m aiming for. I watched the video demo on how to create an interleaved staircase with the rotating gratings, but it was far from clear how I could adapt this to my design.
Indeed, I have 9 files created in Excel (.xlsx extension), one for each level, containing the names of the sound and image files that have to be presented.

In summary : I would like PsychoPy to run my first file of 20 trials as many times as needed for the participant to achieve the required level. Then, do the same for the next ones, until the participant has reached the end of level 9 OR until an hour has passed.

Do you think adding a loop for each level, with bits of code would be enough, or do I, indeed, need a staircase design?

Hi there,

I don’t think you can use a staircase procedure online yet:
https://www.psychopy.org/online/status.html

I’m not sure on the ins and outs of the loop you had in mind, but I think you’ll need to insert code components in the routines that require them and then use the py>autojs function and with a bit of luck it will work online (not guaranteed as it is still early days for this tool).

Hope this helps. If not try raiding the forum for all the past threads that have similar problems to yours.

Best wishes,
Tom

I am also working on implementing a couple of staircase procedures for online testing and so far I’ve been using code components in routines and the one I finished works well.

I wonder if you could share an example? I am trying the do the same thing and am fairly new to PsychoPy, so in using code components, I get stuck on issues like not knowing what variables are called - like what is the last response called.