I have a simple experiment with 8 different trials that I wish to present only once without repeat; participants are asked to 'solve' a numeric sequence where 4 sequences have a solution (S) and 4 are unsolvable (U).
Thus, I have 8 trials:
S1, S2, S3, S4, U1, U2, U3, U4.
I want to present the trials so that they alternate:
S1, U1, S2, U2, S3, U3, S4, U4
However, I want to randomise the order of S and U, whilst maintaining the alternating pattern.
For example, S3, U2, S2, U4, S4, U1, S1, U3
I am using the builder and am new to Python (although I am familiar with coding in Matlab). The only solutions I can come up with is to try and shuffle the order of the trials in the excel file and then combining them so they alternate - this doesn't seems very elegant though.
Is there a simple way to implement this within the builder or by adding a code component?
I have included the input file / excel table that defines the trials. The column 'difficulty' indicates whether they are Solvable or Unsolvable trials.
cheers, Harry