Presenting imgae pairs in randomised order

Hello, I’m a bit of an MWorks newby and struggling with something that is probably pretty simple. I’d like to present images on screen, two at a time, one on the left and one on the right. This I can do, but now I want to present images in pre-defined pairs, but randomise the order of presentation of the pairs as well as the position (left or right of screen) of the image. So for example let’s say I have 20 pairs of images, each pair should appear once, but the first pair in the list doesn’t necessarily need to be the first pair presented. This is where I’m stuck. I can get my task to work with only one pair, so the problem I think is how to define each image ‘pair’, and how to tell the task to present each pair together. I attached two screenshots of the task showing stimuli specification, the ‘trial’ variable, and how I call them in the experiment. Any suggestions would be most welcome.

Hello,

I can get my task to work with only one pair, so the problem I think is how to define each image ‘pair’, and how to tell the task to present each pair together.

One option is to split the pairs in to two stimulus groups, then use a selection variable with random_without_replacement selection as the index in to the groups. The attached example demonstrates this technique. (I’ve included both XML and MWEL versions of the experiment. To use the latter, you’ll need a recent nightly build.)

If you have any questions, please let me know.

Cheers,
Chris Stawarz

Attachment: image_pairs.zip (137 KB)

Thanks Chris, this is really helpful. One thing I am wondering about is
disc_rand, in Randomize left/right placement: is this something I have to
specify in my variables? At the moment the images appear always in just a
fixed position (either left or right). I’m also having trouble getting my
task to present each image pair only once. I have my number of trials set
to draw ‘num_pairs’ using a sequential method, and image_pair is set to
random_without_replacement, but I still have the same pair popping up more
than once a in sequence. Any suggestions why this could be?

Hi Vanessa,

One thing I am wondering about is disc_rand, in Randomize left/right placement: is this something I have to specify in my variables? At the moment the images appear always in just a fixed position (either left or right).

In my example, a key point is that the images’ x_position parameter is an expression that depends on image_x_offset_sign. The latter variable is set using disc_rand, and its value determines the side of the screen on which the image is drawn.

Note that you need to set image_x_offset_sign before the images are queued. Otherwise, the change won’t be visible to the stimuli until they’re dequeued.

I have my number of trials set to draw ‘num_pairs’ using a sequential method, and image_pair is set to random_without_replacement, but I still have the same pair popping up more than once a in sequence.

I’m not sure why that would be happening. If you want to send me your experiment file, I’ll take a look and see if I can figure it out.

Chris