randomising source block loop
in OpenSesame
Hi,
In my experiment, the stimuli are comprised of 14 word triplets in which the order of the 14 words and the order of the triplets have to be randomised. The triplets should be presented as triplets, i.e. not as 42 randomised words. I created 14 separate csv files for every triplet but I don't know how to tell the block loop to randomise the order of the files as well as the order of the content of the files.
Thank you in advance for your help!
Comments
Hi @Vivver ,
Perhaps the shuffle_hor function can be of help:
Does this answer your question?
Cheers,
Lotje
Did you like my answer? Feel free to

Hi @lvanderlinden
thank you, that is very helpful!
I created a .csv file now with a column for every triplet and every word of the triplet in the three rows below.
I am not sure, however, where I would enter the 'shuffle_horiz' command. Do I write this in the script? If so, where?
Best,
Vivienne
Hi Vivienne,
On the link that Lotje shared, it says further up "You can add constraints for pseudorandomization to the script of the loop item. This shuffles the rows, even if Order is set to sequential. (Currently, this is not possible through the GUI.)"
This is where you have to add the horizontal shuffling. So, go to the loop table, and in the top right, you can activite the script view, there you can add a line that specifies which variable you want to shuffle horizontally.
That being said, I am not sure horizontal shuffling is what you need (but maybe I am misunderstanding your need). In order to choose one of the 14 files randomly, horizontal shuffling won't help you. In order to do so, you would need to code the file name that you use in the loop table to load the triplets as a variable. For example,
triplet_list_[list_nr].csvwhere list_nr would have a value from 1 to 14. How exactly you can implement that, depends a bit on what you need. For example, should all 14 lists be shown for one subject? Or is it one list per experimental session? Knowing that I can suggest a more concrete solution.Eduard
Hi @eduard
Thank you for your response. Every participant is supposed to be presented with every one of the same 14 triplets (in a different order each trial) and the order of the triplets should be randomised as well, e.g.:
subject 1:
triplet3_item1
triplet3_item3
triplet3_item2
triplet7_item2
triplet7_item1
triplet7_item3
triplet1_item2
triplet1_item3
triplet1_item1
etc.
subject 2:
triplet14_item3
triplet14_item1
triplet14_item2
triplet1_item1
triplet1_item3
triplet1_item2
etc.
My problem at the moment is that I am not sure whether I should put the triplets in the same file or different files and how I can randomise the stimuli the way I want them to.
Thank you in advance,
Vivienne
Hi Vivienne,
You want the triplets in the same file with every word in the triplet being one column. Then you can simply set the order in the loop table to random and have randomized triplets. How do you want to present the words of a triplet? Sequentially in different trials, each requiring a response? Then you need to nest another loop in which you randomize the words of the triplet. No response necessary for each word, but only in the end? You can use three sequential sketchpads that are placed in a sequence that is looped over in the triplet loop. Depending on how you want to present the triplets, you might need to re-map the words from the order in which they appear in the file, to a new one for each trial. This could be done with shuffle_horiz, or a simple inline_script.
Hope this cleared things up,
Eduard
Hi Eduard,
thank you so much for your help! nesting another look was a great idea. Now I have two loops, the first one with a table that just lists the triplet names (i.e.: triplet1, triplet2, triplet3) and the second one with a link to the file pool where I tell Open Sesame to randomly choose one of the triplet files (i.e.:[triplet].csv). I have separate csv files for every triplet which are called triplet1.csv, triplet2.csv etc.
Best,
Vivienne