Millisecond Forums

Pseudorandomization at the Block level

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

By Kolfers - 11/2/2014

Hi,

I have a very short question, I'm sure it must be in the helpfile or forum somewhere, but I'm having trouble finding it.

So in a block I want to present  trials in a pseudorandom order. I know that the code below will prevent repeated trials (as far as possible).

<block 1>
/ trials = [1-8= noreplacenorepeat(stim1,stim2,stim3,stim4)]
</block>

However, if I would want to prevent only double (and upwards) repetition of the same trial: e.g. allow trials to be repeated once. 
Would the following code be correct? 

<block 1>
/ trials = [1-16= noreplacenorepeat(stim1,stim1,stim2,stim2,stim3,stim3,stim4,stim4)]
</block>

Thanks!





By Dave - 11/2/2014

You need to use a <list> element for trial-selection with its /maxrunsize set according to your needs:

<list triallist>
/ items = (trial.a, trial.b, trial.c, trial.d)
/ poolsize = 16
/ maxrunsize = 2
</list>

<block myblock>
/ trials = [1-16 = list.triallist]
...
</block>
By Kolfers - 11/2/2014

Ah..that makes sense! 

Thank you for the quick response, and on Sunday at that!