Mix order of blocks within each condition
Dear swarm intelligence,
I am quite new to the community and to OpenSesame and Python as well. Although I have a general understanding and very basic knowledge of scripting and did not struggle too hard with the beginner's, intermediate and advanced tutorials, I do have a hard time finding a trivial solution for the following issue:
First, I want to assign subjects to three different subject groups/conditions, let's say conditions "1", "2" and "3". That worked quite well so far:
if var.subject_nr % 3 == 0: var.subject_group = '1' elif var.subject_nr % 3 == 1: var.subject_group = '2' elif var.subject_nr % 3 == 2: var.subject_group = '3'
Now I want to split these groups again and mix blocks so that half of the participants of each subgroup start with block 1 (then block 2) and the other half starts with block 2 (then block 1).
The "Attentional Blink"-Tutorial implements this sort of counterbalancing for odd and even subject_parity, so that some start with the experimental condition first, and others start with the control condition.
if var.subject_parity == 'even': var.condition1 = 'experimental' var.condition2 = 'control' else: var.condition1 = 'control' var.condition2 = 'experimental'
I'm assuming (or hoping?) that technically there is a somewhat simple way to implement a similar balancing for three subject groups / conditions, but I just cannot seem to find it yet. I hope some of you can help me out here :-)
To illustrate what I tried to explain verbally: