+x+x+xGood morning:

I am having difficulties in randomizing trial type across the block.

In my experiment (script attached, thanks to Mr. Dave for supporting with this script earlier), I have 4 trial type (namely: "odd/odd", "even/even", "odd/even", "even/odd") but extended to 16 (and can be more in future) for randomizing across the blocks (currently, there are 64 trials in the block). I have also adjusted relevant scripts. It works fine. But the problem is that often “leftitemnumber” and “rightitemnumber” pick up the same values from the list (image attached)

I would like to avoid this that “leftitemnumber” shouldn’t be the same as “rightitemnumber”. There may be some way to put /not in list element - but I not sure how to do that.

Would highly appreciate it your kind help.

Thanks

If you want to avoid that, reset the two lists odditemnumbers and evenitemnumbers /ontrialbegin in each trial.

Thank you very much Dave, it works!.

Just to make clear why you

**may **get identical item numbers when you don't reset. It's pretty obvious when you think about what happens when trials sample from the lists.

Let's take the odditemnumbers list:

- It has four item numbers, and these are sampled randomly without replacement.

- Suppose your first trial is "odd/odd". That trial thus samples two items from the list, let's say 3 and 5, so 1 and 7 remain.

- Suppose your next trial is "even/odd". That trial will sample one of the remaining items from the odditemnumbers list (and one from the evenitemnumbers list). Let's say 1 is sampled and so 7 remains.

- Now suppose the next trial is again "odd/odd", i.e. it needs two item numbers from the list. But only one is left unsampled, 7.

To get the 2nd odd item number, the list has to reset and make all four items available again.

There thus is a 1-in-4 chance that the 2nd item number sampled in that trial will also be 7.

When you reset the lists manually /ontrialbegin in each trial, a situation like the above cannot occur. The list will always have 4 items available, and the 2 items sampled will always be different.