Millisecond Forums

Creating a Circular Stimulus Array

https://forums.millisecond.com/Topic16190.aspx

By JodieK - 4/30/2015

Hi,
I am new to Inquisit and am having trouble finding a way to create a circular array of 6 letters - one letter is a target letter (from a pool of 2 possible letters) and there are also distractor letters (taken from a pool of 5 letters). The position of all is randomised and distractor letters must not be repeated in the same array. This array is then repeatedly generated over each trial. I have created the item lists and text attributes but am not sure where to go from here. 

If anyone knows how to code the array itself, or where there is an information sheet that walks me through it, that would be great. 

Thanks very much,
Jodie
By Dave - 4/30/2015

For the sake of simplicity, suppose you have six candidate positions (there can be more and you can arrange them in a circle). You would then assign those positions to your 1 target stimulus 't' (items are the vowels "A"  and "E") and your 5 distractor stimuli 'd1' to 'd5' (items are 6 consonants) randomly by pulling them from <list>s:

<block myblock>
/ trials = [1-4 = mytrial]
</block>

<trial mytrial>
/ ontrialend = [list.distractoritemnumbers.reset();]
/ stimulusframes = [1=t,d1,d2,d3,d4,d5]
/ inputdevice = mouse
/ validresponse = (t,d1,d2,d3,d4,d5)
/ correctresponse = (t)
</trial>

<list targetitemnumbers>
/ items = (1,2,1,2)
</list>

<list distractoritemnumbers>
/ items = (1,2,3,4,5,6)
/ selectionrate = always
</list>

<list hpos>
/ items = (25%, 50%, 75%, 25%, 50%, 75%)
/ selectionrate = always
</list>

<list vpos>
/ items = (25%, 25%, 25%, 75%, 75%, 75%)
/ selectionmode = list.hpos.currentindex
/ selectionrate = always
</list>

<text t>
/ items = targetletters
/ select = list.targetitemnumbers.nextvalue
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
/ txcolor = (red)
</text>

<text d1>
/ items = distractorletters
/ select = list.distractoritemnumbers.nextvalue
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text d2>
/ items = distractorletters
/ select = list.distractoritemnumbers.nextvalue
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text d3>
/ items = distractorletters
/ select = list.distractoritemnumbers.nextvalue
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text d4>
/ items = distractorletters
/ select = list.distractoritemnumbers.nextvalue
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text d5>
/ items = distractorletters
/ select = list.distractoritemnumbers.nextvalue
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<item targetletters>
/ 1 = "A"
/ 2 = "E"
</item>

<item distractorletters>
/ 1 = "B"
/ 2 = "C"
/ 3 = "D"
/ 4 = "F"
/ 5 = "G"
/ 6 = "H"
</item>

The above is just to give the basic idea. To position stimuli randomly along a circle (if that's what you want), you can make use of Inquisit's trigonometric functions (cf. the functions reference in the documentation). This requires some additional logic, hence I'm leaving it out for now. There are scripts in the library which may serve as examples here, though, such as the "Spatial Delayed Response Task" and the "Mackworth Clock Test".

Hope this helps.
By JodieK - 5/3/2015

Hi Dave,
Sorry for the delayed response, I only just saw your reply - thanks very much for your help. Might have to read up a bit more on lists.
Have a good night.
Jodie