Millisecond Forums

no more than 4 times in a row

https://forums.millisecond.com/Topic17352.aspx

By Ulrike Nestler - 10/8/2015

Hello,
i am currently programming shifting paradigm such as the color-shape task which basically consist of switch and no switch trials. And I need to know an expression that allows the order of trials to be randomized with the constraint that no more than 4 switch trials can occur in a row. Can you please help me with that? Because the usual noreplacenorepeat doesn't do it here.

Thanks!
UIrike
By Dave - 10/8/2015

You need to use a <list> for trial selection, with its /maxrunsize set to 4.

<block myblock>
/ trials = [1-100=list.triallist]
</block>

<list triallist>
/ items = (trial.a, trial.b)
/ poolsize = 100
/ maxrunsize = 4
</list>

<trial a>
/ trialduration = 10
</trial>

<trial b>
/ trialduration = 10
</trial>

By Ulrike Nestler - 10/8/2015

Thanks so much for this fast reply! :-D