[open] randomisation of variables
Hi,
I’m relatively new to Open Sesame and have a question about randomisation. In my experiment, one trial consists of reading a paragraph of text followed by a brief video clip, after which the participant answers a question about the video clip.
There are four different categories of written text, with each category containing 16 different paragraphs (i.e. a total of 64 different texts). For the videos, I use the same four categories – in each category there are four different actors (2 male, 2 female) so that there are 16 different video clips.
For the randomisation of my experiment, I would like each of the four text categories to be shown with all 16 video clips so that each individual text is only ever seen once, whereas the videos are each shown four times over the course of the experiment. However, I want to ensure that the video clips are NOT repeated within the same text category. So for example, if the text category is ‘dominant’ then I want each individual text to be shown with male actor 1 dominant, male actor 1 submissive, male actor 1 neutral, male actor 1 aversive, male actor 2 dominant, and so on, but I don’t want to show male actor 1 dominant again with a dominant text.
I hope this makes sense. Thanks a lot for any help you can give me!
Cheers,
Jorien
Comments
Hi Jorien,
If I understand correctly, you do not want to repeat any combination of video and category, am I right?
To accomplish this, you could do something like the following. First, before the block (typically at the start of the block_sequence) create an empty list that will be used to keep track of which trials we've already seen, like so:
Then, at the start of the trial_sequence, insert the following code in the prepare phase of an
inline_script
. See code comments for explanation. This script assumes that you have a variablevideo
and a variablecategory
, but you can change this to match the names used in your experiment.This will give us the variable
skipTrial
that can be used to skip all items in the trial_sequence, with the following run-if statement:is that what you have in mind?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!