Millisecond Forums

Random picture pairing using mycounter

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

By NaomiLee - 11/18/2019

My experiment involves ppts judging whether pairings shown are a match or not. Each ppt has a different 3 pairings that they need to learn. However, there are 9 possible pairings. I believe I have worked out how to create a random assignment of pairings for each ppt.  

<counter mycounter>
/ select = noreplace(1,2,3,4,5,6,7,8,9)
/ selectionrate = experiment
</counter>

<item pictures>
/1="ECircle.png"
/2="EDiamond.png"
/3="EHexagon.png"
/4="EOctagon.png"
/5="EOval.png"
/6="EPentagon.png"
/7="ERectangle.png"
/8="ESquare.png"
/9="ETriangle.png"
</item>

<picture Pic1>
/items = pictures
/select = mycounter
/position = (50%, 35%)
</picture>

<picture Pic2>
/items = pictures
/select = mycounter
/ position = (50%, 35%)
</picture>

<picture Pic3>
/items = pictures
/select = mycounter
/ position = (50%, 35%)
</picture>

This seems to work, but not sure if there is a way to ensure that the same picture isn't duplicated - think it works with noreplace but not certain. 

The issue I am having is that the instruction page needs to show the pictures in a different position. 

<trial trial_pra_selfpace_demo>
/stimulustimes = [0=txt_pra_selfpace_instr, txt_instr_key, pic_instr_L, pic_instr_M, pic_instr_R, txt_instr_L, txt_instr_M, txt_instr_R, fixation_L, fixation_R, fixation]
/ validresponse = (57)
/ correctresponse = (57)
</trial>

## instr_Picture
<picture pic_instr_L>
/ items = picture.Pic1
/ position = (30%, 35%)
</picture>
<picture pic_instr_M>
/items = picture.Pic2
/ position = (50%, 35%)
</picture>
<picture pic_instr_R>
/items = picture.Pic3
/ position = (70%, 35%)
</picture>

However this leads to the error that the pictures (picture.Pic1, picture.Pic2, picture.Pic3) could not be located. Is this because it is a random assignment rather than one set image? Are there any ways I could overcome this? Is there a way I could display Pic1, Pic2, Pic3 side by side on one instruction screen. 

Many thanks, Naomi


By Dave - 11/18/2019

NaomiLee - 11/18/2019
My experiment involves ppts judging whether pairings shown are a match or not. Each ppt has a different 3 pairings that they need to learn. However, there are 9 possible pairings. I believe I have worked out how to create a random assignment of pairings for each ppt.  

<counter mycounter>
/ select = noreplace(1,2,3,4,5,6,7,8,9)
/ selectionrate = experiment
</counter>

<item pictures>
/1="ECircle.png"
/2="EDiamond.png"
/3="EHexagon.png"
/4="EOctagon.png"
/5="EOval.png"
/6="EPentagon.png"
/7="ERectangle.png"
/8="ESquare.png"
/9="ETriangle.png"
</item>

<picture Pic1>
/items = pictures
/select = mycounter
/position = (50%, 35%)
</picture>

<picture Pic2>
/items = pictures
/select = mycounter
/ position = (50%, 35%)
</picture>

<picture Pic3>
/items = pictures
/select = mycounter
/ position = (50%, 35%)
</picture>

This seems to work, but not sure if there is a way to ensure that the same picture isn't duplicated - think it works with noreplace but not certain. 

The issue I am having is that the instruction page needs to show the pictures in a different position. 

<trial trial_pra_selfpace_demo>
/stimulustimes = [0=txt_pra_selfpace_instr, txt_instr_key, pic_instr_L, pic_instr_M, pic_instr_R, txt_instr_L, txt_instr_M, txt_instr_R, fixation_L, fixation_R, fixation]
/ validresponse = (57)
/ correctresponse = (57)
</trial>

## instr_Picture
<picture pic_instr_L>
/ items = picture.Pic1
/ position = (30%, 35%)
</picture>
<picture pic_instr_M>
/items = picture.Pic2
/ position = (50%, 35%)
</picture>
<picture pic_instr_R>
/items = picture.Pic3
/ position = (70%, 35%)
</picture>

However this leads to the error that the pictures (picture.Pic1, picture.Pic2, picture.Pic3) could not be located. Is this because it is a random assignment rather than one set image? Are there any ways I could overcome this? Is there a way I could display Pic1, Pic2, Pic3 side by side on one instruction screen. 

Many thanks, Naomi



<picture pic_instr_L>
/ items = picture.Pic1
/ position = (30%, 35%)
</picture>
<picture pic_instr_M>
/items = picture.Pic2
/ position = (50%, 35%)
</picture>
<picture pic_instr_R>
/items = picture.Pic3
/ position = (70%, 35%)
</picture>

This is invalid syntax. The /items attribute must refer to an <item> element, not another <picture> element.

I also don't understand what you're doing with that <counter>. The way you've set that up, it'll select a single random value over the course of the entire experiment. That is: Your three <picture> elements Pic1, Pic2, and Pic 3 will all display the same item, not three different items. What you'll want to do is probably something along the following lines:

<values>
/ pic1_item = 1
/ pic2_item = 1
/ pic3_item = 1
</values>

<list mylist>
/ poolsize = 9
/ selectionrate = always
/ selectionmode = random
/ replace = false
</counter>

<expt>
/ onexptbegin = [values.pic1_item = list.mylist.nextindex;
values.pic2_item = list.mylist.nextindex;
values.pic3_item = list.mylist.nextindex;
]
....
</expt>

with

<picture Pic1>
/items = pictures
/select = values.pic1_item
/position = (50%, 35%)
</picture>

<picture Pic2>
/items = pictures
/select = values.pic2_item
/ position = (50%, 35%)
</picture>

<picture Pic3>
/items = pictures
/select = values.pic3_item
/ position = (50%, 35%)
</picture>

and same for the picture elements you use during the instructions / demo trial:

## instr_Picture
<picture pic_instr_L>
/items = pictures
/select = values.pic1_item
/ position = (30%, 35%)
</picture>
<picture pic_instr_M>
/items = pictures
/select = values.pic2_item
/ position = (50%, 35%)
</picture>
<picture pic_instr_R>
/items = pictures
/select = values.pic3_item
/ position = (70%, 35%)
</picture>

By NaomiLee - 11/18/2019

Thank you so much that works! Sorry I am new to Inquisit and think I'd just got a bit confused trying to sort the issue out from looking on these forums.