I am trying to design a simple task-switching experiment. In my design I have three tasks: a shape discrimination task (herein task A), a color discrimination task (task B) and an orientation discrimination task (task C). On each trial participants are presented with 1 of 6 possible stimuli. The stimuli are colored geometrical shapes presented at different orientation: therefore, each task can be performed on each stimulus.
I am interested in sequential effects of task switching. Therefore I want to compare task sequences in which a task repeat after an initial switch (e.g. ABA) with sequences in which the task always changes (e.g. CBA). So for instance, let’s say that on the first trial I ask participants to perform task A, then B, then C, then B…and so on… I end up with a ABC sequence followed by a BCB sequence. The last trial of the sequence (3rd and 4th trials of the experiment in this example), will be referred to as a repeat trial or switch trial according to the identity of the 2 previous trials.
When creating my experiment I would like to apply several randomization constraints:
- the task should never repeat in two consecutive trials
- each task must be present the same number of times in each block
- each stimulus must be present the same number of times for each task
- the repetition sequences (e.g. ABA) and the switch sequences (e.g. CBA) must be present for the same number of times for each task, and for each stimulus
- stimuli should never repeat in a sequence (i.e. stimuli must never repeat in the next 2 trials).
I have no clue on how I can do this: I have tried to assign a number to each stimulus(6)Xsequence(2)Xtask(3) element, and then shuffle it using a brute force approach (repeat the random shuffle until there is no repetition of any number). The problem with it is that it is too demanding for psychopy.