Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

randomizing sub groups while keeping big loop sequential order

edited August 11 in OpenSesame


I want to design this experimental structure:

-- block sequence loop (repeated 8 times)

-- random sequence type 1 (1 out of 8) 

-- random sequence type 2 (1 out of 8)

-- random sequence type 3 (1 out of 8)

-- random sequence type 4 (1 out of 8)

I would like to know how can a sequence be picked randomly in each type, but still keep the sequence of the big loop (type 1, and then 2, 3 and 4 in that order)?

And also, in total, I need to show all the sequences in the big loop in that order, without repeating on a sequence, so all 32 sequences will be shown, each in its group type, but they will be picked randomly from the pool. how can I be sure all 32 sequences will be shown once without repetition or emissions?

I hope I succeeded to explain myself well...

Thank you for your help!!



  • Hi Hadas,

    That's an interesting scenario.

    The trick will be to use a loop for each random sequence type, let's call it loop_type_1 (for type 1, etc.), which has 8 cycles, such that each cycle corresponds to one random sequence type. In the loop table you would then define a variable, say sequence_nr, which controls which of your 8 random sequences will be executed. Then you set the repeat value to 0.125, so that only 1 cycle is executed at a time, and you tick the box Resume after break, to make sure that the next time that loop_type_1 is executed, a new cycle is sampled without replacement.

    Does that make sense? I realize that this is not an out-of-the-box implementation, but I think it might provide sufficient guidance to take a shot at implementing it yourself!



Sign In or Register to comment.