Millisecond Forums

Showing each of 3 pictures exactly 9 times

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

By JuliaNo - 6/25/2017

Hey again, I have another question I cannot figure out...

in my experiment there are several trials where people should see (1) a random number out of a list of 27 numbers and (2) one out of three pictures (each 9 times). I solved this by making two lists of 27 items (the pictures are all 9 times in the list) and selecting an item from each list with noreplace for each new trial. However, what happens now is, that it works perfectly for the numbers, but not for the picture items. Users often see one of the pictures 8 times, and another picture 10 times. 

I use currentindex and nextindex several times and I guess that I might have done something wrong there, but I really don't know :( Thanks for helping me out!


********************************
The code
********************************
<text V2Instructions_D>
/ items = ("text")
/ halign = center
</text>

<text ClickToStart_D>
/ items = ("Klicken Sie hier um zu starten")
/ position = (50,80)
/ txbgcolor = grey)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>

<trial V2StartingExperiment_D>
/stimulusframes = [1= V2Instructions_D, ClickToStart_D]
/ validresponse = (ClickToStart_D)
/ inputdevice = mouse
</trial>

<item InitialsPlayerB>
/1= "1"
/2= "2"
/3= "3"
/4= "4"
/5= "5"
/6= "6"
/7= "7"
/8= "8"
/9= "9"
/10= "10"
/11= "11"
/12= "12"
/13= "13"
/14= "14"
/15= "15"
/16= "16"
/17= "17"
/18= "18"
/19= "19"
/20= "20"
/21= "21"
/22= "22"
/23= "23"
/24= "24"
/25= "25"
/26= "26"
/27= "27"
</item>

<text InitialsPlayerB>
/ items = InitialsPlayerB
/ select = noreplace
</text>

<text InitialsPlayerBShow>
/ items = ("<% text.initialsplayerb.item(text.InitialsPlayerB.currentindex) %>")
/ select = noreplace
/ position = (80,10)
/ font = ("Calibri", -20, 700, 0, 49)
/ fontstyle = ("Calibri", 5%)
</text>

<item FlagB>
/1 = "Flag_of_Portugal.png"
/2= "Flag_of_Portugal.png"
/3= "Flag_of_Portugal.png"
/4= "Flag_of_Portugal.png"
/5= "Flag_of_Portugal.png"
/6= "Flag_of_Portugal.png"
/7= "Flag_of_Portugal.png"
/8= "Flag_of_Portugal.png"
/9= "Flag_of_Portugal.png"
/10 = "Flag_of_Germany.png"
/11 = "Flag_of_Germany.png"
/12 = "Flag_of_Germany.png"
/13 = "Flag_of_Germany.png"
/14 = "Flag_of_Germany.png"
/15 = "Flag_of_Germany.png"
/16 = "Flag_of_Germany.png"
/17 = "Flag_of_Germany.png"
/18 = "Flag_of_Germany.png"
/19 = "no_flag.png"
/20 = "no_flag.png"
/21 = "no_flag.png"
/22 = "no_flag.png"
/23 = "no_flag.png"
/24 = "no_flag.png"
/25 = "no_flag.png"
/26 = "no_flag.png"
/27 = "no_flag.png"
</item>

<picture FlagB>
/ items = FlagB
/ select = noreplace
</picture>

<picture FlagBShow>
/ items = ("<% picture.FlagB.item(picture.FlagB.currentindex) %>")
/ position = (80, 20)
/ size = (90,60)
/ select =noreplace
</picture>

<text tokensQuestion_D>
/ items = ("Wie viele Spielmarken wollen Sie <% text.initialsplayerb.item(text.InitialsPlayerB.currentindex) %> geben?")
/ position = (50,45)
</text>

<shape line>
/ shape = rectangle
/ color = black
/ size = (50%, .6%)
/ position = (50%, 60%)
</shape>

<text 00>
/ items = ("0")
/ txbgcolor = grey)
/ position = (25%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 01>
/ items = ("1")
/ txbgcolor = grey)
/ position = (30%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 02>
/ items = ("2")
/ txbgcolor = grey)
/ position = (35%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 03>
/ items = ("3")
/ txbgcolor = grey)
/ position = (40%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 04>
/ items = ("4")
/ txbgcolor = grey)
/ position = (45%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 05>
/ items = ("5")
/ txbgcolor = grey)
/ position = (50%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 06>
/ items = ("6")
/ txbgcolor = grey)
/ position = (55%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 07>
/ items = ("7")
/ txbgcolor = grey)
/ position = (60%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 08>
/ items = ("8")
/ txbgcolor = grey)
/ position = (65%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 09>
/ items = ("9")
/ txbgcolor = grey)
/ position = (70%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 10>
/ items = ("10")
/ txbgcolor = grey)
/ position = (75%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<trial TokensGivenV2_D>
/ stimulusframes = [1=line, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, tokensQuestion_D, InitialsPlayerBShow, FlagBShow]
/ inputdevice = mouse
/ validresponse = (00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10)
</trial>

<text NextPlayerB_D>
/ items = ("Next round Player B is")
/ fontstyle = ("Calibri", 5%)
/ position = (50,35)
</text>

<text NextPlayerB2_D>
/ items = ("<% text.InitialsPlayerB.item(text.InitialsPlayerB.nextindex) %>")
/ fontstyle = ("Calibri", 5%)
/ position = (50,48)
</text>

<picture NextFlag>
/ items = ("<% picture.FlagB.item(picture.FlagB.nextindex) %>")
/ position = (50,55)
/ size = (99,66)
</picture>

<text ClickForNext_D>
/ items = ("Click for next round")
/ position = (50,80)
/ txbgcolor = grey)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>

<trial PreScreenPlayerB_D>
/stimulusframes = [1= NextPlayerB_D, NextPlayerB2_D, NextFlag, ClickForNext_D]
/ validresponse = (ClickForNext_D)
/ inputdevice = mouse
/ recorddata = FALSE
</trial>

<text ScoreSummaryText_D>
/items = ("The end.")
/ halign = center
</text>

<text ClickHere_D>
/ items = ("Klicken Sie hier")
/ position = (50,80)
/ txbgcolor = grey)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>

<trial ScoreSummary_D>
/stimulusframes = [1= ScoreSummaryText_D, ClickHere_D]
/inputdevice = mouse
/ validresponse = (ClickHere_D)
</trial>

<block PrisonersDilemmaV2_D>
/ trials = [1 = V2StartingExperiment_D; 2-28 = sequence(PreScreenPlayerB_D, TokensGivenV2_D); 29=ScoreSummary_D]
</block>

By Dave - 6/26/2017

JuliaNo - Monday, June 26, 2017
Hey again, I have another question I cannot figure out...

in my experiment there are several trials where people should see (1) a random number out of a list of 27 numbers and (2) one out of three pictures (each 9 times). I solved this by making two lists of 27 items (the pictures are all 9 times in the list) and selecting an item from each list with noreplace for each new trial. However, what happens now is, that it works perfectly for the numbers, but not for the picture items. Users often see one of the pictures 8 times, and another picture 10 times. 

I use currentindex and nextindex several times and I guess that I might have done something wrong there, but I really don't know :( Thanks for helping me out!


********************************
The code
********************************
<text V2Instructions_D>
/ items = ("text")
/ halign = center
</text>

<text ClickToStart_D>
/ items = ("Klicken Sie hier um zu starten")
/ position = (50,80)
/ txbgcolor = grey)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>

<trial V2StartingExperiment_D>
/stimulusframes = [1= V2Instructions_D, ClickToStart_D]
/ validresponse = (ClickToStart_D)
/ inputdevice = mouse
</trial>

<item InitialsPlayerB>
/1= "1"
/2= "2"
/3= "3"
/4= "4"
/5= "5"
/6= "6"
/7= "7"
/8= "8"
/9= "9"
/10= "10"
/11= "11"
/12= "12"
/13= "13"
/14= "14"
/15= "15"
/16= "16"
/17= "17"
/18= "18"
/19= "19"
/20= "20"
/21= "21"
/22= "22"
/23= "23"
/24= "24"
/25= "25"
/26= "26"
/27= "27"
</item>

<text InitialsPlayerB>
/ items = InitialsPlayerB
/ select = noreplace
</text>

<text InitialsPlayerBShow>
/ items = ("<% text.initialsplayerb.item(text.InitialsPlayerB.currentindex) %>")
/ select = noreplace
/ position = (80,10)
/ font = ("Calibri", -20, 700, 0, 49)
/ fontstyle = ("Calibri", 5%)
</text>

<item FlagB>
/1 = "Flag_of_Portugal.png"
/2= "Flag_of_Portugal.png"
/3= "Flag_of_Portugal.png"
/4= "Flag_of_Portugal.png"
/5= "Flag_of_Portugal.png"
/6= "Flag_of_Portugal.png"
/7= "Flag_of_Portugal.png"
/8= "Flag_of_Portugal.png"
/9= "Flag_of_Portugal.png"
/10 = "Flag_of_Germany.png"
/11 = "Flag_of_Germany.png"
/12 = "Flag_of_Germany.png"
/13 = "Flag_of_Germany.png"
/14 = "Flag_of_Germany.png"
/15 = "Flag_of_Germany.png"
/16 = "Flag_of_Germany.png"
/17 = "Flag_of_Germany.png"
/18 = "Flag_of_Germany.png"
/19 = "no_flag.png"
/20 = "no_flag.png"
/21 = "no_flag.png"
/22 = "no_flag.png"
/23 = "no_flag.png"
/24 = "no_flag.png"
/25 = "no_flag.png"
/26 = "no_flag.png"
/27 = "no_flag.png"
</item>

<picture FlagB>
/ items = FlagB
/ select = noreplace
</picture>

<picture FlagBShow>
/ items = ("<% picture.FlagB.item(picture.FlagB.currentindex) %>")
/ position = (80, 20)
/ size = (90,60)
/ select =noreplace
</picture>

<text tokensQuestion_D>
/ items = ("Wie viele Spielmarken wollen Sie <% text.initialsplayerb.item(text.InitialsPlayerB.currentindex) %> geben?")
/ position = (50,45)
</text>

<shape line>
/ shape = rectangle
/ color = black
/ size = (50%, .6%)
/ position = (50%, 60%)
</shape>

<text 00>
/ items = ("0")
/ txbgcolor = grey)
/ position = (25%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 01>
/ items = ("1")
/ txbgcolor = grey)
/ position = (30%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 02>
/ items = ("2")
/ txbgcolor = grey)
/ position = (35%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 03>
/ items = ("3")
/ txbgcolor = grey)
/ position = (40%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 04>
/ items = ("4")
/ txbgcolor = grey)
/ position = (45%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 05>
/ items = ("5")
/ txbgcolor = grey)
/ position = (50%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 06>
/ items = ("6")
/ txbgcolor = grey)
/ position = (55%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 07>
/ items = ("7")
/ txbgcolor = grey)
/ position = (60%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 08>
/ items = ("8")
/ txbgcolor = grey)
/ position = (65%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 09>
/ items = ("9")
/ txbgcolor = grey)
/ position = (70%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<text 10>
/ items = ("10")
/ txbgcolor = grey)
/ position = (75%, 60%)
/ size = (3%, 4%)
/ vjustify = center
</text>

<trial TokensGivenV2_D>
/ stimulusframes = [1=line, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, tokensQuestion_D, InitialsPlayerBShow, FlagBShow]
/ inputdevice = mouse
/ validresponse = (00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10)
</trial>

<text NextPlayerB_D>
/ items = ("Next round Player B is")
/ fontstyle = ("Calibri", 5%)
/ position = (50,35)
</text>

<text NextPlayerB2_D>
/ items = ("<% text.InitialsPlayerB.item(text.InitialsPlayerB.nextindex) %>")
/ fontstyle = ("Calibri", 5%)
/ position = (50,48)
</text>

<picture NextFlag>
/ items = ("<% picture.FlagB.item(picture.FlagB.nextindex) %>")
/ position = (50,55)
/ size = (99,66)
</picture>

<text ClickForNext_D>
/ items = ("Click for next round")
/ position = (50,80)
/ txbgcolor = grey)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>

<trial PreScreenPlayerB_D>
/stimulusframes = [1= NextPlayerB_D, NextPlayerB2_D, NextFlag, ClickForNext_D]
/ validresponse = (ClickForNext_D)
/ inputdevice = mouse
/ recorddata = FALSE
</trial>

<text ScoreSummaryText_D>
/items = ("The end.")
/ halign = center
</text>

<text ClickHere_D>
/ items = ("Klicken Sie hier")
/ position = (50,80)
/ txbgcolor = grey)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>

<trial ScoreSummary_D>
/stimulusframes = [1= ScoreSummaryText_D, ClickHere_D]
/inputdevice = mouse
/ validresponse = (ClickHere_D)
</trial>

<block PrisonersDilemmaV2_D>
/ trials = [1 = V2StartingExperiment_D; 2-28 = sequence(PreScreenPlayerB_D, TokensGivenV2_D); 29=ScoreSummary_D]
</block>


You should do

<picture NextFlag>
/ items = flagb
/ position = (50,55)
/ size = (99,66)
/ select = noreplace
</picture>

with

<picture FlagBShow>
/ items = flagb
/ position = (80, 20)
/ size = (90,60)
/ select = picture.nextflag.currentindex
</picture>
By JuliaNo - 6/26/2017


Thank you for the quick help (with both of my questions). This makes sense!