| Reference | Downloads | Github

Skipping trials faster

Hi all,

I have an experiment with different conditions, where depending on the condition participants will either see a trial, or will skip the trial.
To give you one example, if participants are in condition 4, they will only see the two first trials and then the last one (they will skip 9 trials). To implement this, I added at the beginning of the trial the following code component:

if cond == 4 and (1 < trials_1.thisRepN < 11): #trials 2 to 10 skipped
continueRoutine = False

This is working. However, skipping trial 2 to 10 means that the experiment is now running much slower when going from trial 1 to 11. It takes aprox 2-3 secs for the screen to change from trial 1 to trial 11.
My question is: is there a way of skipping specific trials and avoid this issue, by making the transition from trial 1 to trial 11 faster?

Its hard to know exactly how you could restructure your code without seeing it, but it seems like you could frontload a lot of this waiting time to the beginning of the experiment if instead of just individually skipping or showing each trial and deciding that before right before each trial, that you instead restructure the code by determining some vector that indicates what routines that person will see. So essentially determining that the person in condition 4 will only see trials 1, 2, and 11, and finding a way to rearrange your code to just show these trials without having to actually skip any trials. Again if you provide a better overview of your whole project it should be easier to offer more directed advice.