I have an experiment where a random number (1,2, or 3) is chosen at the beginning of the experiment and determines which CSV file is used during the loop. The code I am using:
Begin Experiment rand = [1,2,3]*4 shuffle(rand)
I put this in the begin experiment tab to ensure that each number is chosen exactly 4 times without replacement.
This code works; however, it often happens that a number is chosen 2 times in a row, or even 3 times in a row. For this reason, I am looking to adjust the code so that a number cannot be chosen 3 times in a row, or 2 times in a row (ex: generating a list of 1,2, and 3) 4 different times rather than one list of 12 values