Howdy, Stranger!

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

Supported by

Randomization question

edited May 2016 in OpenSesame

Hi Guys,

not sure whether this specific question about randomization has been asked before!

Nevertheless, my problem is as follows:
I have a variable called "item", and this variable consists of three items (let's call them item 'A', 'B', and 'C'). Each item will be presented for seven times (i.e., cycle = 7), resulting in 21 items in total.

I would like to have the first triad (here defined as three trials consisting of A, B, and C) randomized, and to use this particular order for the remaining six cycles.
So, if it turns out that the first triad/cycle is B, A, C, i would like to continue with this order for the following six cycles.

I am not sure how to implement this in Opensesame.

Can you help me out with this?

Thanks in advance!

Best,
Rubin

Comments

  • edited 8:33PM

    Hi Rubin,

    I think you need to start your experiment with an inline_script item where you create a variable exp.item_list = ['A', 'B', 'C']. On the following line you randomize the order of items in this list: random.shuffle(exp.item_list). You'll need to start the script with 'import random', otherwise the shuffle command won't work.

    In the loop item you can now create an item variable, with 21 values (cycles):
    [item_list[0]], [item_list[1]], [item_list[2]], [item_list[0]], [item_list[1]], et cetera.

    Hope this helps.

    Cheers,

    Josh

Sign In or Register to comment.