psychopy.org | Reference | Downloads | Github

Randomisation go/no-go task

Hi

I’m quite familiar with PsychoPy and I mostly use the Corder environment. However, I have a rather complicated go/no-go task design now and could use some help/inspiration in order to tackle it. I’ll try my best to describe everything as clear as possible.

  • 16 blocks with 60 trials/each = a total of 960 trials

  • 2 types of visual stimuli: a go and a no-go stimulus

    • appear either left or right on the screen
    • answer according to the location ONLY if the go-stimulus appears
  • “3” types of audio stimuli

    • appear before or after the visual stimuli
      Type 1 = sine wave sound -> 1 wav file = 70% of the trials
      Type 2 = a novel sound -> 36 wav files = 15% of the trials
      Type 3 = a novel emotional sound -> 36 wave files = 15% of the trials

So… I have 960 trials. In 480 of them the sound appears before the stimulus (BS) and in 480 after the stimulus (AS).
Of the 480 BS: 240 are go trials, 240 no go (same goes for the AS condition).
Of the 240 go trials in the BS: 168 will be with Type 1 sound, 36 with the 2 sound and again 36 with Type 3 sound (same goes for the no-go trials)

So to summarise I have 24 unique trials.

Frankly, I don’t even know what and where to randomise first, so like I said any suggestions are welcome. I have a xls file with all the conditions, but I never worked with such a file before in the Coder (only Builder + the design was much more straightforward of course).

I’m using PsychoPy3 v3.0.6 on a macOS Mojave v10.14.3

Any help will be highly appreciated.

Best
Paula

I struggle to understand your question. Could you sum up, what you have to randomise (is it just about the sequence of trials?) and what constraints you have (e.g. are there certain sequences which should not occur?)?

Hi Lukas

I have to randomise the location of the visual stimulus, which is rather straightforward, but then I also have 3 types of auditory stimuli (type 1 occurs in 70% of the trials, type 2 in 15% and type 3 in 15% as well) which can occur either before or after the visual stimuli…

Can the location of the stimulus be randomised independently or should location be balanced for every combination of sound type and sequence type (sound or visual stimulus first)?

The location can be randomised independently but I actually forgot to say that I have 2 types of visual stimuli: a go stimulus and a no-go stimulus (which can occur left or right on the screen*). Auditory type 2 and type 3 stimuli consist both of 36 different wav files (cf supra) and each file should be played 4 times: 2 times combined with a go trials/stimulus and 2 times with a no-go trial

So you’re concerned about the combination of auditive stimulus type (3) x visual stimulus type (2) x sequence (2; BS and AS)? That makes 12 combinations.
How do you arrive at 24 unique trials?

Well, I guess I included the location of the visual stimulus (2) in the count as well…
And however it can be randomised independently from the rest of the design, it has to be balanced at the same time in the sense that, for instance, the go-stimulus cannot occur more on the right than on the left (or the other way around)

Okay, so you want to counterbalance position as well. That leaves you with:

auditive stimulus (3) x visual stimulus (2) x sequence (2) x position (2)

If you want to use the builder interface, you could create an excel file with four columns for these four variables.
You could then repeat every combination of visual stimulus x sequence x position as often as you wish (6*n rows, corresponding to 15%) with your type 2 sound as auditive stimulus. Do the same with your type 3 sound (again, 6*n rows, corresponding to 15%). Finally, you’ll have to repeat your type 1 sound as auditive stimulus n*70/15 times (giving you 6*n*70/15 rows), to make sure it occurs in 70% of your trials. You’ll have to transform that to the number of trials you want.

The PsychoPy trial handler does the rest for you.