I am currently building my first experiment and am in need of some help.
My idea is to present one of two stimuli1 (randomly) in the very beginning. This is followed by fixation cross with varying duration. Afterwards, participants will be presented another one of two stimuli2. Here, I would like to specify the transition probabilities. That is, Stimuli1.1 is followed by Stimuli 2.1 in 80% of the cases and followed by Stimuli 2.2 in 20% of the cases. Likewise, stimuli 1.2. is followed by Stimuli 2.1 in 20% of the cases and by Stimuli2.2 in 2.1 in 80% of the cases.
I would like there to be an equal distribution of the randomly occurring stimuli-couplings.
I have tried to work with files containing the images and using custom code to read in the images and specify p as the transition probability. Nothing seems to work. At this point, it would be great to get some guidance on how I should set this up and where I should specify the probabilities, randomization.
This is what my flow looks like. For the startles and stimuli I have an Excel file each, which I uploaded in in the loop. For the startles I defined the rows as $np.random.choice(2, size = 1, replace = False) and for the stimuli trials I have code (the one above) before the image in the “begin routine” column. The experiment doesn’t crash but sometimes I am shown both stimuli following one startle and other times only one.