Howdy, Stranger!

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

Supported by

[solved] same random order

PadPad
edited December 2015 in OpenSesame

Hi

Here is a simplified version of my experiment :

LoopLearningSession (3 cycles)

LoopLearning (20 cycles, 20 items, random order, 2 variables : [name] and [condition]

SequenceTrial (sketchpad or sampler, depends on [condition])

I'd like the order of my 20 items to be randomized for each subject, but i'd like it to be the same for the 3 sessions.
Example with 3 items :
Subject A : Session 1 : 3 1 2; Session 2 : 3 1 2; Session 3 : 3 1 2
Subject B : Session 1 : 2 1 3; Session 2 : 2 1 3; Session 3 : 2 1 3
etc.

Can you imagine an easy way to implement this ? I have some ideas of scripting but none of them seems really simple and maybe there is a very easy way...

Comments

  • edited 11:52AM

    Hi,

    You could make lists of your items in an inline_script, e.g. items_condition1 = ['image1.png', 'image2.png', 'image3.png'] etc cetera. In that same inline_script you would give the items a shuffle, using the line random.shuffle(items_condition1), (import random first!).

    Now if you want to call an item in a sketchpad, you would insert e.g. [items_condition1[item_number_con1]] in your sketchpad. Here, item_number_con1 refers to an element on your list; it starts at 0 and has to be increased by one step every time the trial is condition 1. So in the first inline_script, you can create this variable and give it the value 0.
    In your sequence, you'd have to have another inline_script, where you add +1 to whichever condition the trial was in.
    In the 3-cycle LoopLearningsession, you want to have a sequence item instead of the LoopLearning item. The LoopLearning item needs to be placed in that sequence. The reason is just so you can add more than one item to LoopLearningsession. So in that sequence, after LoopLearning, you add a last inline_script where you reset all the item_number_con variables to zero, (in the run-phase).

    Does this help?

    Cheers,

    Josh

  • edited December 2015

    Perhaps even simpler: in that first inline_script where you create the item lists, you could translate those lists from 20-element lists into 60-element lists (i.e., after you shuffled the 20-element lists). In your new lists your random sequence of 20 items would simply repeat itself 3 times. Now you won't have to change the structure of your experiment (adding things to LoopLearningsession) and you won't need to add a script that resets item_number_con to zero after each session.

Sign In or Register to comment.