Stimulus randomization

OS (e.g. Win10): Win11 Pro
PsychoPy version (e.g. 1.84.x): 2021.2.3
Standard Standalone? (y/n) If not then what?: y

What are you trying to achieve?:
My experiment has 4 blocks and 80 trials in each block. In each trial, first comes a cue image, then a target image, based on both participant enters their response, and receives feedback.
In each block, 4 cue images should be chosen randomly, be assigned randomly to 4 conditions, and stay the same (represent the same condition) throughout the 80 trials of the block. Also, target images should be chosen randomly among 2 images, and keep being chosen randomly for each trial.

What did you try to make it work?: Right now, I’ve made my four blocks separately, with each one using its own csv file, and obviously only the order of the presentation is randomized (shown in these two screenshots).

What specifically went wrong when you tried that?:
How can I make the selection among the images also random?
Probably I’d have to pool all the cue images in one folder, and then choose 4 among them for each block, but how would I keep the selection the same for the whole block?

What I would do is:

  1. Set up a list of cue images and shuffle it.
  2. When the fractals column is, say, fractals/cue.png override it by setting the value as cue_images[fractals_and_targets_loop_1.thisN]

Does it matter that you could randomly get two cues very close together? If yes, then have a look at how I preload PM cues in my prospective memory demos.