Newbie needing randomisation help!
My experiment consists of watching a RSVP stream of coloured images of animals. Participants have to identify Target 1 [T1] which is a black and white image of an animal and then state if they saw a cat picture [cat_probe] in the stream or not. My questions are as follows:
- I have created a trial sequence using sketchpads of 10 images. I have adjusted the code on one so that it randomly displays a different target image each time using the file="bw_[T1].jpg" variable thing. However I also want to randomise all the other pictures in the stream but using the above system doesn't work! If I use the other variable [RSVP] I have created in this way then I simply get the same picture displayed in all 9 other sketchpad spaces. How can I randomise the other pictures to appear in any order?
- I would like T1 to appear in any position in the stream except the end 2 positions and for the [cat_probe] to appear in a +2 position after [T1] (eg. T1, random image, catprobe). How can I code this?
- I have made a widget form to collect the response to [T1] using images and have managed to get the correct answer to [T1] appear every time. However I would like the randomise the order it displays the possible choices in (at the moment the correct answer is always the first choice) and to randomise the other 2 animal choices it offers. The last option is a text choice of 'don't know' which can stay as the last choice.
I have very very limited knowledge of coding and of Open Sesame in general so very basic instructions are greatly appreciated!
Sorry for the long list and thank you to anyone who has the patience to help!
Comments
Hi,
Let's start with points 1 and 2. An attentional-blink experiment is tricky to implement, and the best way is to use a bit of scripting. Here's an example of how you can do approximately what you want: It shows a stream of 10 letters, with a target ('X') and a cat probe ('C').
This should be in the prepare phase:
And this in the run phase:
Of course, you'll want to change this so that it shows images, rather than letters. And maybe a blank in between the images, etc. But first try that yourself as an exercise. If you follow the beginner and intermediate tutorials, you should get a long way!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks Sebastiaan, I had found this in the tutorials but couldn't figure out how to import my image files into it as the list refers to letters. I have now made my main sequence using 10 different variables to randomise the sketchpads (a very long-winded way but it made more sense to me than the code!). However, I still need to randomise the widget response page. I currently have this code in place and it works perfectly:
set timeout infinite
set spacing 25
set rows "1;1;1;1"
set question "Select the black and white animal you saw. Or select 'don't know'"
set options "draw image center=1 file=c_bird.jpg scale=1 show_if=always"
set only_render no
set margins "50;100;50;100"
set form_var response
set form_title "Form title"
set description "A simple multiple choice item"
set cols "1;1"
set button_text Ok
set allow_multiple no
set advance_immediately yes
set theme gray
widget 0 0 2 1 label text="Target selection"
widget 0 1 2 1 label center=no text="Select which black and white animal you saw or if you don't know select 'don't know' "
widget 0 2 1 1 image_button path="bw[T1].jpg"
widget 1 2 1 1 image_button path="bw_[picture3].jpg"
widget 0 3 1 1 image_button path="bw_[picture2].jpg"
widget 1 3 1 1 button text="Don't know"
How can I adapt this code so that it randomises the order my widget buttons appear on the screen? At the moment the right answer is always the first button [T1].
Thanks,
Jenny