I am programming a psychological experiment.
In every trial, participants will read a scenario. Next, they will evaluate a set of stimuli which is a combination of a face photo and an answer for the scenario.
Scenarios are 20 sets.
And there are 4 conditions for the set of stimuli. (Happy face-Happy sound, Neutral face-Happy sound, Happy face-Neutral sound, Neutral face-Neutral sound)
Therefore, All trials are 80. (Scenario 20 * Condition 4)
The point is I need to randomize scenario order without repeating stimuli twice in a row.
My problem is that the “random trials” must NOT include consecutive presentations of scenarios.
For example, scenario 1(Happy f-Happy v) → scenario 1(Happy f-Neural v)
Or scenario 1 - 3 - 5 - 6 - 7- 8 - 3 - 4 - 4 - 5 - 10
However, I am very new to psychopy/coding and am not sure of how to do this.
Plus, It’s impossible to move ‘shuffle code in python’ to Pavlovia.
Is anyone able to please help guide me in generating a code that will constrain the randomization process?