Varying number of trials presented in a block each time it is run?

Hi -
Is it possible to vary the number of trials presented in a block each time that block is run?

For example, I have a block called Filler that is presented before a block containing test items. After a test item is presented the Filler block is run again. I would like to vary the number of fillers presented (say, between 1 and 5 fillers) each time the block is run.

I have tried using a trial variable to vary the durations of a trial (e.g., 3000, 5000, 7000), but obviously this means trials can terminate before a participant has an opportunity to respond. Ideally something like a trial variable that varies the number of times the trial is presented (rather than just the duration )would be great.

All suggestions welcome!

SuperLab is not designed with this kind of functionality in mind, but we can make this work anyway. Two different methods come to mind. The easy method will have slightly skewed randomization, but the better method will take a bit more work.

Easier method:

The idea is that we insert a blank trial into the randomization that flags to SuperLab that it should end the block and move on. This trial gets randomized along with the other trials, so you wind up with a random number. The downside is that this trial could come first, which would mean you would get zero filler trials, so we have to account for that, but in doing so, we make it twice as likely that the participant will only get one filler trial.

  • Create a code value that will be set on trials to specify whether we should exit the block (values: yes,no).
  • Create one extra trial in your block with one event that presents nothing (e.g. empty text event), ends after 1ms, records response, and set this code value on this trial to “yes.” (if we don’t look for a response, the trial won’t be counted later).
  • Set your other trial(s) in this block to have the value “no.”
  • Set the block to randomize trials.
  • Create a Macro at the block level that will end the block and move on to the next one when the number of trials in the block with this code value is equal to one AND the total number of trials presented is greater than or equal to two.

The more detailed method:

Similar to above, we use code values on trials to tell SuperLab what to do. The difference, though is that we have a BLOCK with five of these semi-empty trials, and its purpose is to tell SuperLab which BLOCK to jump to with the correct count of trials.

  • Instead of our code having the values “yes/no,” we use “one,two,three,four,five.” Technically, the names are arbitrary–they are just for our sanity. SuperLab does not read them and interpret anything based on the name.
  • Create one event that presents nothing, ends after 1ms, and records response.
  • Create a “Decision” block.
  • Create five trials in this “Decision” block. Give each of these trials a unique value from our code. Link each trial to our one event.
  • Create five blocks. Link each of these to all of your filler trials. In each of these blocks, create a macro to continue running the block while the number of trials presented in the block is less than “a number” (Here you insert a different number for each of the blocks. In your case, you want the numbers one through five.) When this condition finally fails, you need to jump to whatever block will occur after everything we’ve been discussing.
  • In your “Decision” block, create five macros. Each of these macros will check the code value on the first trial presented and jump to the corresponding block.

As you can tell, my instructions are vastly over-simplified, but I believe it should at least get you started.

They’re great suggestions Hank - I hadn’t thought about adding an extra level using a Decision block.