Restrict loop so no two pairs of trials are repeated
Thanks for advance for any help with this question. In my experiment, I have a series of trials that I want to be repeated 6 times in a loop. See below screenshot for how this has been set up:
I want the following two constraints in the loops:
1) Ensure a given trial does not occur twice in a row. I have successfully implemented this by editing the script and using "constrain [variable/trial] maxrep = 1" command (following the advice in this link)
2) Ensure that no two pairs of trials follow each other. I am having more difficulty achieving this. To illustrate what I mean, see the screen shot below of a preview of the loop table I have generated so far. I have highlighted an instance of what I want to avoid - i.e., two pairs of trials repeating - T4,T4,T4,T3.
Does anyone know if its possible to restrict the loops such that no two pairs of trials are repeated using the 'view script' aspect of the loop item? Alternatively, would you be able to suggest a way to do this using an inline script?
Thanks in advance, and do let me know if this hasn't been explained sufficiently.