Millisecond Forums

Random but specific stimuli in the ultimatum game

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

By Fen - 4/18/2017

Hello,

I am attempting to edit the demo ultimatum game such that the program presents subjects with three stimuli photos in sequence over a course of specific trials (which i have also customized, but successfully), I have accomplished this in this way:

<item partnerpictures>
/ 1 = "Subject3.jpg"
/ 2 = "Subject16.jpg"
/ 3 = "Subject19.jpg"
</item>

<picture PlayerPic>
/ items = partnerpictures
/ select = block.ug_responder.totalcount+1
/ position = (50%, 50%)
/ size = (50%, 50%)
</picture>

However, due to certain control factors, I would like the 1, 2, and 3 pictures to display one of two pictures randomly, but I lack the syntax knowledge to do this properly apparently.

I have tried to accomplish this by editing the item definition such: /1 random("Subject3.jpg","Subject5.jpg")
which fails, or the picture definition to point to one of two lists of partnerpictures with the alternate pictures: /items = random(partnerpictures1,partnerpictures2)
But both of these have failed with various issues.

Finally, I came up with this which I thought would be a solution:

<itempartnerpictures>
/ 1 = "Subject3.jpg"
/ 2 = "Subject5.jpg"
/ 3 ="Subject16.jpg"
/ 4 ="Subject18.jpg"
/ 5 ="Subject19.jpg"
/ 6 ="Subject20.jpg"
</item>


<picturePlayerPic>
/ items =partnerpictures
/ select =random(((block.ug_responder.totalcount+1)*2),(((block.ug_responder.totalcount+1)*2)-1))
/ position = (50%,50%)
/ size = (50%, 50%)
</picture>

But this seems to -always- return Subject3.jpg.. regardless of block status as well. I'm sorry for my inexperience, but can anyone help clue me in?
By Fen - 4/18/2017

I've attached a "working" version of the script, (without the random picture element), and will continue to experiment in the meantime (and read more documentation). Thank you for any help.

P.S. Preferably, the random element would select for one of the two pictures for each block, even better if in a way I could code for/monitor. But at the moment i'm just trying to get it working at all.
By Dave - 4/19/2017

Fen - Tuesday, April 18, 2017
I've attached a "working" version of the script, (without the random picture element), and will continue to experiment in the meantime (and read more documentation). Thank you for any help.

P.S. Preferably, the random element would select for one of the two pictures for each block, even better if in a way I could code for/monitor. But at the moment i'm just trying to get it working at all.

Sorry, I find the description intensely confusing and it is not clear to me what exactly you want to achieve. Specifically, I'm having trouble parsing "I would like the 1, 2, and 3 pictures to display one of two pictures randomly."

Could you please provide a more detailed explanation and a concrete example of what you envision the end result to be?
By Fen - 4/23/2017

Dave - Wednesday, April 19, 2017
Fen - Tuesday, April 18, 2017
I've attached a "working" version of the script, (without the random picture element), and will continue to experiment in the meantime (and read more documentation). Thank you for any help.

P.S. Preferably, the random element would select for one of the two pictures for each block, even better if in a way I could code for/monitor. But at the moment i'm just trying to get it working at all.

Sorry, I find the description intensely confusing and it is not clear to me what exactly you want to achieve. Specifically, I'm having trouble parsing "I would like the 1, 2, and 3 pictures to display one of two pictures randomly."

Could you please provide a more detailed explanation and a concrete example of what you envision the end result to be?
Apologies, I'll try to explain more clearly. Subjects in the study will always be in the 'responder' position, and over the course of the study will be presented with three different 'partners' (photo stimuli). The stimuli/partner will change after each block with the way the file is currently set up.

For control reasons, though subjects are only presented with three stimuli over the course of the experiment, each stimuli has an alternate photo. For explanation, we will call the stimuli photo1 through photo6. During the first block of the study, participants should be 'partnered' with either photo1 or photo2, the second block photo3 or photo4, and the third block photo5 or photo6. Although the order the photos are presented in is not important (participants could just as easily see photo 5 or 6 first instead of 1 or 2) the 'pairs' are, subjects should never be partnered with more than one photo from each 'pair'. Ideally, the output of the file should document which photo the subject was exposed to for each input as well. My issue that i was trying to explain is that I am having trouble randomizing between the two photos on each block in this way.

To try to be clear
Photo1.jpg or Photo2.jpg - Stimuli 1
Photo3.jpg or Photo4.jpg - Stimuli 2
Photo5.jpg or Photo6.jpg - Stimuli 3

By Dave - 4/23/2017

Fen - Sunday, April 23, 2017
Dave - Wednesday, April 19, 2017
Fen - Tuesday, April 18, 2017
I've attached a "working" version of the script, (without the random picture element), and will continue to experiment in the meantime (and read more documentation). Thank you for any help.

P.S. Preferably, the random element would select for one of the two pictures for each block, even better if in a way I could code for/monitor. But at the moment i'm just trying to get it working at all.

Sorry, I find the description intensely confusing and it is not clear to me what exactly you want to achieve. Specifically, I'm having trouble parsing "I would like the 1, 2, and 3 pictures to display one of two pictures randomly."

Could you please provide a more detailed explanation and a concrete example of what you envision the end result to be?
Apologies, I'll try to explain more clearly. Subjects in the study will always be in the 'responder' position, and over the course of the study will be presented with three different 'partners' (photo stimuli). The stimuli/partner will change after each block with the way the file is currently set up.

For control reasons, though subjects are only presented with three stimuli over the course of the experiment, each stimuli has an alternate photo. For explanation, we will call the stimuli photo1 through photo6. During the first block of the study, participants should be 'partnered' with either photo1 or photo2, the second block photo3 or photo4, and the third block photo5 or photo6. Although the order the photos are presented in is not important (participants could just as easily see photo 5 or 6 first instead of 1 or 2) the 'pairs' are, subjects should never be partnered with more than one photo from each 'pair'. Ideally, the output of the file should document which photo the subject was exposed to for each input as well. My issue that i was trying to explain is that I am having trouble randomizing between the two photos on each block in this way.

To try to be clear
Photo1.jpg or Photo2.jpg - Stimuli 1
Photo3.jpg or Photo4.jpg - Stimuli 2
Photo5.jpg or Photo6.jpg - Stimuli 3


Thank you, that is much clearer. You can achieve this using <list> elements for selection. I.e.

<item partnerpictures>
/ 1 = "Subject3.jpg"
/ 2 = "Subject5.jpg"

/ 3 ="Subject16.jpg"
/ 4 ="Subject18.jpg"

/ 5 ="Subject19.jpg"
/ 6 ="Subject20.jpg"
</item>

<picture PlayerPic>
/ items = partnerpictures
/ select = values.partnerpicitem
/ position = (50%, 50%)
/ size = (50%, 50%)
</picture>

<list partnerpics_main>
/ items = (list.p1.nextvalue, list.p2.nextvalue, list.p3.nextvalue)
</list>

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

<list p2>
/ items = (3,4)
</list>

<list p3>
/ items = (5,6)
</list>

with values.partnerpicitem selected /onblockbegin

<block UG_Responder>
/ onblockbegin = [
    values.partnerpicitem = list.partnerpics_main.nextvalue;
]

/ trials = [1-16 = Responderseq]
/ branch = [
    if ((block.ug_responder.totalcount+1) < parameters.NumberofResponderBlocks)
        block.ug_responder
]
</block>