#### Howdy, Stranger!

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

Supported by

# using Random presentation with condition

Hi,

I need to present trials randomly during the loop, but I don't want to repeat a condition more than 3 times. How could I process ?

For example : I present animals randomly (Cat or Dog), but I don't want Dog - Dog - Dog - Dog - Cat - Dog

Just repeat Dog 3 times max or less.

Thank

Mikael

• to further clarify my problem:

I need help on a new project based on Open Sesame, and I have to tell you that I am not a programmer and I am not very comfortable with programming if it is too complex.

We have 2 main variables on this experiment :

• The 1st is an arithmetic stimulus : the subject has to choose the best strategy to resolve it (Rouding Up strategy or Rouding Down strategy).
• The 2nd is an emotionnal stimulus : negative and neutral pictures are presented.

The subject sees the emotional stimulus for a defined time and then has to solve the problem by choosing the best strategy.

My problem is as follows : we want to present the arithmetic stimuli in a random order but we have some constraints :

• the subject must not resolve the problem with the same strategy more than 4 times in a row
• the subject must not see the same emotion more than 4 times in a row

How to proceed on the software to define these two constraints of presentation of stimuli? The order must remain random but we absolutely want to limit répétitions. Is that possible, or will we have to turn to a sequential order?

Regards

Mikael

• Hi Mikael,

This sounds like the perfect example for advanced loop operations. The part on "constrain" should do the trick. Check out the documentation here:

Let me know if you need more help.

Eduard

• Hello Eduard

Thank you very much for your answer, but it seems to be missing the link to the solution you propose ^^

Could you tell me again?

But I think I understood where you're leading me.

Mikael

• That's weird. Well anyway, here it is again:

https://osdoc.cogsci.nl/3.2/manual/structure/loop/#pseudorandomization

• the subject must not see the same emotion more than 4 times in a row