Randomization of 4 different loops

Win10
PsychoPy version 2021.1.2.3
**Standard Standalone? (y)
What are you trying to achieve?
My experiment has 4 separate loops. I want to make it so that it is completely random which loop a participant uses every time. It involves using a mix of read-aloud or silent stimuli about a unique category in each group (aloud_con, aloud_lib, silent_lib, etc) and a series of questions after each stimuli. I want to make it so every time a round is completed, the participant gets a brand-new stimulus from a different loop (they get one aloud_con, then a silent_lib, then another silent_lib, or something else).
What did you try to make it work?
I tried using a different solution given by another post, by creating an outer loop that connected to an Excel file with columns called e.g. Task1 Task2 with each row having a 1 in one column and a 0 in all the others and for each task the nReps for the loop around it should be the corresponding column name. The problem is that routines would repeat themselves and just remain in that loop till that list was done, not randomly for each routine.
What specifically went wrong when you tried that?:
The problem is that routines would repeat themselves and just remain in that loop till that list was done, not randomly for each routine. Can someone help?

Hi @Ryan_Merkel, why don’t you just have one loop and include all trials in one conditions file? Why separate them into four different files?

Hey Ajus,
I am new to the system so I am not sure how it all works? I am trying to find a way to randomize all of my conditions so the participants have to go through one condition, answer the questions and then are randomly assigned one of the 4 conditions till all stimuli are used and then move on to the next phase. Is there a way to do this with only one file?

The necessary setup depends on the specifics of condition orders you want to be able to happen / not happen. Let’s call your four conditions A, B, C, and D. Do you want respondents to just go through a completely random sequence of these four conditions until all stimuli were presented? If so, you only need one loop with one conditions file containing all of your stimuli and maybe some details of how the routine should be different for the four conditions in each row beside the stimulus that is shown (e.g., different instruction text).

Or do you want to have only sequences where A can only happen again when you completed A, B, C, and D in a random order? So a sequence with two consecutive A’s should not happen?

1 Like