Dont know whats wrong


Author
Message
nashby
nashby
Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)
Group: Forum Members
Posts: 78, Visits: 159
So I thought my experiment was ready to go. When I run through the first block it works fine. But, then on all the blocks that follow if I press say the right button feedback shows up on the other button, on both, or not at all. I am not sure why this is the case being as every block is nearly indentical save the names. Anyone (Dave) know what the problem is?

**************************************************************************************************************
**************************************************************************************************************
Open Sample with No Info
**************************************************************************************************************
**************************************************************************************************************

**************************************************************************************************************
**************************************************************************************************************
                                       SCRIPT INFO

last updated: 18-07-2013
**************************************************************************************************************
**************************************************************************************************************
                                    DEFAULT SCREEN SETTING
**************************************************************************************************************
**************************************************************************************************************
requires Inquisit 4.0.0.0

<defaults>
/ minimumversion = "4.0.0.0"
/ inputdevice = mouse
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
</defaults>
**************************************************************************************************************
**************************************************************************************************************
                                             VALUES
**************************************************************************************************************
**************************************************************************************************************
****************
****************
currenttotal:                     the amount of money currently owned
                                 startamount (default) = 0

<values>
/ currenttotal = 0
</values>

***************
the remaining parameters are updated automatically during runtime
***************
samples:                     the number of samples
outcome:                     outcome of sample
option selected:               which option         

<values>
/ samples = 0
/ outcome = 0

/ ow1a = 1
/ ow1b = 22
/ ow1c = 43
/ pw1a = 10
/ pw1b = 39
/ pw1c = 100

/ on1a = 1
/ on1b = 22
/ on1c = 43
/ pn1a = 24
/ pn1b = 61
/ pn1c = 100

/ ow2a = 47
/ ow2b = 26
/ ow2c = 5
/ pw2a = 12
/ pw2b = 37
/ pw2c = 100

/ on2a = 47
/ on2b = 26
/ on2c = 5
/ pn2a = 26
/ pn2b = 59
/ pn2c = 100

/ ow3a = 2
/ ow3b = 21
/ ow3c = 53
/ pw3a = 11
/ pw3b = 47
/ pw3c = 100

/ on3a = 16
/ on3b = 29
/ on3c = 31
/ pn3a = 11
/ pn3b = 47
/ pn3c = 100

/ ow4a = 52
/ ow4b = 19
/ ow4c = 1
/ pw4a = 15
/ pw4b = 43
/ pw4c = 100

/ on4a = 30
/ on4b = 27
/ on4c = 15
/ pn4a = 15
/ pn4b = 43
/ pn4c = 100


/ola = 0
/olb = 0
/olc = 0
/pla = 0
/plb = 0

/ora = 0
/orb = 0
/orc = 0
/pra = 0
/prb = 0


/ outcomeR = 0
/ outcomeL = 0

/ side = round(rand(1,100))

/ gamble = 0

/ tot = 0 
/ ran = round(rand(1,100))

/ pass = 0

/ picked = 0
/ spicked = 0

/ adjusted = 0
/ totadjusted = 0

/ best = 0

/ samplesl = 0
/ samplesr = 0
</values>




Properties


**************************************************************************************************************
**************************************************************************************************************
                                             DATA
**************************************************************************************************************
**************************************************************************************************************

********************
raw data
********************
<data>
/file = "Samples1.iqdat"
/ columns = [subject, values.pass, values.samples, values.samplesl, values.samplesr, response, latency, values.outcome, values.side, values.gamble,  values.spicked, values.ran,  trialcode, expt.main.totalsumlatency]
/separatefiles = true
</data>

**************************************************************************************************************
**************************************************************************************************************
                                 INSTRUCTIONS ELEMENTS
**************************************************************************************************************
**************************************************************************************************************

****************************************************
NOTE: instructions can be changed here:

<item instructions>

/ 1 = "Thank you very much for participating in this study!
 
We are interested in learning how people make repeated choices from options with varying amounts of information about the possible outcomes they contain, and the probabilities they will occur at. Your goal is to earn as many points as you can: the more points you earn the more money you will earn. Specifically, the points you earn will be converted to cash (10 points = $0.01). At the end of this study you will earn an amount which could be over $1.00 ( based on the points accumulated) in addition the base payment amount.
 
In this task you will choose between different pairs of options labeled A and B.  Each option contains three possible outcomes that occur at different probabilities. Information about the three outcomes and their probabilities of occurring may or may not be provided. However, you will be allowed to simulate playing each option up to a 10 times to gain a greater feeling for what each option is worth. Each time you simulate playing an option the outcome you would have obtained had you played it for real will be displayed directly under it and will remain until you simulate playing the same or a different option, or you choose to make your one choice for real. 

Once you feel you have simulated playing each option enough, simply press the play once for real button. You will then be asked which option you think is of higher value, how confident you are that the option you indicated is of higher value, and then you will select the option you want to play for real; you will not receive information about the outcome of your choice, but it will be recorded and displayed at the end of this study so you know how much you have earned.
 
Click Proceed to begin the task:"


/ 2 = "Please select an option to simulate playing it. You can simulate playing each option 100 times. If you simulate an option more than 100 times that option will disappear to ensure you do not sample from it anymore.

If you are ready to make your final consequential choice click Play Once For Real."

</item>


****************************************************


<text Instructions>
/ items = instructions
/ select = 1
/ position = (50%, 5%)
/ size = (80%, 10%)
/ hjustify = center
/ valign = top
/ txcolor = (black)
</text>

<text IntaskInstructions>
/ items = instructions
/ select = 2
/ position = (50%, 5%)
/ size = (80%, 10%)
/ hjustify = center
/ valign = top
</text>

<text empty>
/ items = (" ")
/ position = (50%, 40%)
/ size = (80%, 50%)
/ txbgcolor = (transparent)
/ txcolor = (black)
</text>



<text EarnedSoFar>
/ items = ("Your choice paid out <%values.outcome%> pts.

So far you have won a total of <%values.tot%> pts. which would equate to $<%values.adjusted%>. 

Please press Proceed to continue.")
/ position = (50%, 50%)
/ size = (80%, 50%)
/ txbgcolor = (transparent)
/ txcolor = (black)
</text>


<text whichisbetter>
/ items = ("Please indicate which of the two options which you were just sampling from is of higher average value by clicking it.")
/ position = (50%, 10%)
/ txcolor = black
/ txbgcolor = (transparent)
/ size = (80%, 10%)
</text>



<text forreal>
/ items = ("Please indicate which of the two options you were just sampling from you would like to play once for real: the outcome that occurs on this choice will be added to your base payment.")
/ position = (50%, 10%)
/ txcolor = black
/ txbgcolor = (transparent)
/ size = (80%, 10%)
</text>

<text Done>
/ items = ("You have won a total of <% values.tot%> pts during this task. For this you will receive a bonus payment of $<%values.adjusted%> which will be added to your base payment of $2.25.

Please press Proceed to continue.")
/ position = (50%, 50%)
/ txbgcolor = (transparent)
/ txcolor = (black)
/ size = (80%, 50%)
</text>

<text Proceed>
/ items = ("Proceed")
/ position = (50%, 80%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
/ txcolor = darkgreen
/ txbgcolor = (transparent)
</text>

<text Play>
/ items = ("Play Once For Real")
/ position = (50%, 90%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ txcolor = darkred
/ txbgcolor = (transparent)
</text>

<text LOutcome>
/ items = (" ")
/ position = (35%, 50%)
/ valign = top
/ txcolor = black
/ txbgcolor = (transparent)
</text>

<text ROutcome>
/ items = (" ")
/ position = (65%, 50%)
/ valign = top
/ txcolor = black
/ txbgcolor = (transparent)
</text>


<text LabelA>
/ items = ("Option A")
/ position = (35%, 45%)
/ size = (10%, 20%)
/ txbgcolor = (grey)
</text>

<text LabelB>
/ items = ("Option B")
/ position = (65%, 45%)
/ size = (10%, 20%)
/ txbgcolor = (grey)
</text>


**************************************************************************************************************
**************************************************************************************************************
                                          STIMULI
**************************************************************************************************************
**************************************************************************************************************

*************************************************************************************************************
**************************************************************************************************************
                                          MAIN TRIALS
**************************************************************************************************************
**************************************************************************************************************

<slider conscale>
/ caption = "      Please use the scale below to indicate how confident you are that you know which option is better. 
               Press Proceed when you are ready to continue."
/ slidersize = (75%, 10%)
/ size = (90%, 80%)
/ position = (3%, 10%)
/ showticks = false
/ showtooltips = false
/ required = true
/ range = (1,100)
/ labels = ("



Not at all confident", "



Very confident")
</slider>


<surveypage confidence>
/ questions = [1= conscale]
/ finishlabel = "Proceed"
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ showquestionnumbers = false
/ nextbuttonposition = (45%, 85%)
</surveypage>


<trial instructions>
/ stimulusframes = [1=Instructions, Proceed]
/ validresponse = (Proceed)
/ recorddata = false
</trial>


<trial exit>
/ stimulusframes = [1=Done, Proceed]
/ trialduration = 3000
/ recorddata = false
</trial>



<trial mytrial1>
/ stimulusframes = [1= InTaskInstructions ; 2= Play; 3= LabelA; 4= LabelB; 5=  Loutcome; 6 = ROutcome;]
/ isvalidresponse = [values.samplesl < 100 && trial.mytrial1.response == "LabelA"]
/ isvalidresponse = [values.samplesr < 100 && trial.mytrial1.response == "LabelB"]
/ isvalidresponse = [trial.mytrial1.response == "Play"]
/ inputdevice = mouse

/ ontrialend = [values.samples += 1]

/ ontrialbegin = [values.ran = round(rand(1,100))]

/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran <= values.pw1a && values.side  <= 50) {values.outcome=values.ow1a; values.spicked = 0; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pw1a && values.ran <= values.pw1b && values.side  <= 50) {values.outcome=values.ow1b; values.spicked = 0; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pw1b && values.side  <= 50) {values.outcome=values.ow1c; values.spicked = 0;}]

/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran <= values.pn1a && values.side  <= 50) {values.outcome=values.on1a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pn1a && values.ran <= values.pn1b && values.side  <= 50) {values.outcome=values.on1b; values.spicked = 1; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pn1b && values.side  <= 50) {values.outcome=values.on1c; values.spicked = 1;}]


/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran <= values.pw1a && values.side  > 50) {values.outcome=values.ow1a; values.spicked = 1; }]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pw1a && values.ran <= values.pw1b && values.side  > 50) {values.outcome=values.ow1b; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelB" && values.ran > values.pw1b && values.side  > 50) {values.outcome=values.ow1c; values.spicked = 1;  }]

/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran <= values.pn1a && values.side  > 50) {values.outcome=values.on1a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pn1a && values.ran <= values.pn1b && values.side  > 50) {values.outcome=values.on1b; ; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial1.response == "LabelA" && values.ran > values.pn1b && values.side  > 50) {values.outcome=values.on1c; values.spicked = 0;}]


/ ontrialend = [if (trial.mytrial1.response == "LabelA") {text.Loutcome = "<% values.outcome %> pts."; text.routcome = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial1.response == "LabelB") {text.Routcome = "<% values.outcome %> pts."; text.loutcome = "  "; values.samplesr += 1;}]

/ ontrialbegin = [if (values.samplesl >= 100) {trial.mytrial1.removestimulusframe(3);trial.mytrial1.removestimulusframe(5);}]
/ ontrialbegin = [if (values.samplesr >= 100) {trial.mytrial1.removestimulusframe(4);trial.mytrial1.removestimulusframe(6);}]
</trial>

<trial mytrial2>
/ stimulusframes = [1= InTaskInstructions ; 2= Play; 3= LabelA; 4= LabelB; 5=  Loutcome; 6 = ROutcome;]
/ isvalidresponse = [values.samplesl < 100 && trial.mytrial2.response == "LabelA"]
/ isvalidresponse = [values.samplesr < 100 && trial.mytrial2.response == "LabelB"]
/ isvalidresponse = [trial.mytrial2.response == "Play"]
/ inputdevice = mouse

/ ontrialend = [values.samples += 1]

/ ontrialbegin = [values.ran = round(rand(1,100))]

/ ontrialend = [ if (trial.mytrial2.response == "LabelA" && values.ran <= values.pw2a && values.side  <= 50) {values.outcome=values.ow2a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelA" && values.ran > values.pw2a && values.ran <= values.pw2b && values.side  <= 50) {values.outcome=values.ow2b; values.spicked = 0; ;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelA" && values.ran > values.pw2b && values.side  <= 50) {values.outcome=values.ow2c; values.spicked = 0;}]

/ ontrialend = [ if (trial.mytrial2.response == "LabelB" && values.ran <= values.pn2a && values.side  <= 50) {values.outcome=values.on2a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelB" && values.ran > values.pn2a && values.ran <= values.pn2b && values.side  <= 50) {values.outcome=values.on2b; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelB" && values.ran > values.pn2b && values.side  <= 50) {values.outcome=values.on2c; values.spicked = 1;}]


/ ontrialend = [ if (trial.mytrial2.response == "LabelB" && values.ran <= values.pw2a && values.side  > 50) {values.outcome=values.ow2a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelB" && values.ran > values.pw2a && values.ran <= values.pw2b && values.side  > 50) {values.outcome=values.ow2b; values.spicked = 1; ;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelB" && values.ran > values.pw2b && values.side  > 50) {values.outcome=values.ow2c; values.spicked = 1;}]

/ ontrialend = [ if (trial.mytrial2.response == "LabelA" && values.ran <= values.pn2a && values.side  > 50) {values.outcome=values.on2a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelA" && values.ran > values.pn2a && values.ran <= values.pn2b && values.side  > 50) {values.outcome=values.on2b; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial2.response == "LabelA" && values.ran > values.pn2b && values.side  > 50) {values.outcome=values.on2c; values.spicked = 0;}]


/ ontrialend = [if (trial.mytrial2.response == "LabelA") {text.Loutcome = "<% values.outcome %> pts."; text.routcome = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial2.response == "LabelB") {text.Routcome = "<% values.outcome %> pts."; text.loutcome = "  "; values.samplesr += 1;}]

/ ontrialbegin = [if (values.samplesl >= 100) {trial.mytrial2.removestimulusframe(3);trial.mytrial2.removestimulusframe(5);}]
/ ontrialbegin = [if (values.samplesr >= 100) {trial.mytrial2.removestimulusframe(4);trial.mytrial2.removestimulusframe(6);}]
</trial>

<trial mytrial3>
/ stimulusframes = [1= InTaskInstructions ; 2= Play; 3= LabelA; 4= LabelB; 5=  Loutcome; 6 = ROutcome;]
/ isvalidresponse = [values.samplesl < 100 && trial.mytrial3.response == "LabelA"]
/ isvalidresponse = [values.samplesr < 100 && trial.mytrial3.response == "LabelB"]
/ isvalidresponse = [trial.mytrial3.response == "Play"]
/ inputdevice = mouse

/ ontrialend = [values.samples += 1]

/ ontrialbegin = [values.ran = round(rand(1,100))]

/ ontrialend = [ if (trial.mytrial3.response == "LabelA" && values.ran <= values.pw3a && values.side  <= 50) {values.outcome=values.ow3a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelA" && values.ran > values.pw3a && values.ran <= values.pw3b && values.side  <= 50) {values.outcome=values.ow3b; values.spicked = 0; ;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelA" && values.ran > values.pw3b && values.side  <= 50) {values.outcome=values.ow3c; values.spicked = 0;}]

/ ontrialend = [ if (trial.mytrial3.response == "LabelB" && values.ran <= values.pn3a && values.side  <= 50) {values.outcome=values.on3a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelB" && values.ran > values.pn3a && values.ran <= values.pn3b && values.side  <= 50) {values.outcome=values.on3b; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelB" && values.ran > values.pn3b && values.side  <= 50) {values.outcome=values.on3c; values.spicked = 1;}]


/ ontrialend = [ if (trial.mytrial3.response == "LabelB" && values.ran <= values.pw3a && values.side  > 50) {values.outcome=values.ow3a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelB" && values.ran > values.pw3a && values.ran <= values.pw3b && values.side  > 50) {values.outcome=values.ow3b; values.spicked = 1; ;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelB" && values.ran > values.pw3b && values.side  > 50) {values.outcome=values.ow3c; values.spicked = 1;}]

/ ontrialend = [ if (trial.mytrial3.response == "LabelA" && values.ran <= values.pn3a && values.side  > 50) {values.outcome=values.on3a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelA" && values.ran > values.pn3a && values.ran <= values.pn3b && values.side  > 50) {values.outcome=values.on3b; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial3.response == "LabelA" && values.ran > values.pn3b && values.side  > 50) {values.outcome=values.on3c; values.spicked = 0;}]


/ ontrialend = [if (trial.mytrial3.response == "LabelA") {text.Loutcome = "<% values.outcome %> pts."; text.routcome = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial3.response == "LabelB") {text.Routcome = "<% values.outcome %> pts."; text.loutcome = "  "; values.samplesr += 1;}]

/ ontrialbegin = [if (values.samplesl >= 100) {trial.mytrial3.removestimulusframe(3);trial.mytrial3.removestimulusframe(5);}]
/ ontrialbegin = [if (values.samplesr >= 100) {trial.mytrial3.removestimulusframe(4);trial.mytrial3.removestimulusframe(6);}]
</trial>


<trial mytrial4>
/ stimulusframes = [1= InTaskInstructions ; 2= Play; 3= LabelA; 4= LabelB; 5=  Loutcome; 6 = ROutcome;]
/ isvalidresponse = [values.samplesl < 100 && trial.mytrial4.response == "LabelA"]
/ isvalidresponse = [values.samplesr < 100 && trial.mytrial4.response == "LabelB"]
/ isvalidresponse = [trial.mytrial4.response == "Play"]
/ inputdevice = mouse

/ ontrialend = [values.samples += 1]

/ ontrialbegin = [values.ran = round(rand(1,100))]

/ ontrialend = [ if (trial.mytrial4.response == "LabelA" && values.ran <= values.pw4a && values.side  <= 50) {values.outcome=values.ow4a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelA" && values.ran > values.pw4a && values.ran <= values.pw4b && values.side  <= 50) {values.outcome=values.ow4b; values.spicked = 0; ;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelA" && values.ran > values.pw4b && values.side  <= 50) {values.outcome=values.ow4c; values.spicked = 0;}]

/ ontrialend = [ if (trial.mytrial4.response == "LabelB" && values.ran <= values.pn4a && values.side  <= 50) {values.outcome=values.on4a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelB" && values.ran > values.pn4a && values.ran <= values.pn4b && values.side  <= 50) {values.outcome=values.on4b; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelB" && values.ran > values.pn4b && values.side  <= 50) {values.outcome=values.on4c; values.spicked = 1;}]


/ ontrialend = [ if (trial.mytrial4.response == "LabelB" && values.ran <= values.pw4a && values.side  > 50) {values.outcome=values.ow4a; values.spicked = 1;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelB" && values.ran > values.pw4a && values.ran <= values.pw4b && values.side  > 50) {values.outcome=values.ow4b; values.spicked = 1; ;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelB" && values.ran > values.pw4b && values.side  > 50) {values.outcome=values.ow4c; values.spicked = 1;}]

/ ontrialend = [ if (trial.mytrial4.response == "LabelA" && values.ran <= values.pn4a && values.side  > 50) {values.outcome=values.on4a; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelA" && values.ran > values.pn4a && values.ran <= values.pn4b && values.side  > 50) {values.outcome=values.on4b; values.spicked = 0;}]
/ ontrialend = [ if (trial.mytrial4.response == "LabelA" && values.ran > values.pn4b && values.side  > 50) {values.outcome=values.on4c; values.spicked = 0;}]


/ ontrialend = [if (trial.mytrial4.response == "LabelA") {text.Loutcome = "<% values.outcome %> pts."; text.routcome = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial4.response == "LabelB") {text.Routcome = "<% values.outcome %> pts."; text.loutcome = "  "; values.samplesr += 1;}]

/ ontrialbegin = [if (values.samplesl >= 100) {trial.mytrial4.removestimulusframe(3);trial.mytrial4.removestimulusframe(5);}]
/ ontrialbegin = [if (values.samplesr >= 100) {trial.mytrial4.removestimulusframe(4);trial.mytrial4.removestimulusframe(6);}]
</trial>


<trial spacer>
/ stimulusframes = [1 = InTaskInstructions, play, empty;]
/ trialduration = 500
</trial>

<trial highervalue>
/ stimulusframes = [1= whichisbetter, LabelA, LabelB]
/ validresponse = (LabelA, LabelB)
/ inputdevice = mouse
</trial>

<trial choice>
/ stimulusframes = [1= forreal, LabelA, LabelB]
/ validresponse = (LabelA, LabelB)
/ ontrialbegin = [values.ran = round(rand(1,100))]

/ ontrialend = [ if (trial.choice.response == "LabelA" && values.ran <= values.pla ) {values.outcome=values.ola; values.spicked = 0}]
/ ontrialend = [ if (trial.choice.response == "LabelA" && values.ran > values.pla && values.ran <= values.plb ) {values.outcome=values.olb; values.spicked=0}]
/ ontrialend = [ if (trial.choice.response == "LabelA" && values.ran > values.plb ) {values.outcome=values.olc; values.spicked = 0;}]

/ ontrialend = [ if (trial.choice.response == "LabelB" && values.ran <= values.pra ) {values.outcome=values.ora; values.spicked = 1}]
/ ontrialend = [ if (trial.choice.response == "LabelB" && values.ran > values.pra && values.ran <= values.prb ) {values.outcome=values.orb; values.spicked=1}]
/ ontrialend = [ if (trial.choice.response == "LabelB" && values.ran > values.prb ) {values.outcome=values.orc; values.spicked = 1;}]

/ ontrialend = [values.tot += values.outcome;]
/ ontrialend = [values.adjusted = values.tot/1000]
/ inputdevice = mouse
</trial>


<trial cleanup>
/ stimulusframes = [1= earnedsofar, Proceed]
/ validresponse = (Proceed)
/ ontrialbegin = [values.pass += 1]
/ ontrialend = [values.side = round(rand(1,100)); text.Loutcome = "   "; text.routcome = "  ";]
/ ontrialend = [values.samples = 0; values.samplesl = 0; values.samplesr = 0; values.outcome = 0;]
/ recorddata = false
</trial>
**************************************************************************************************************

**************************************************************************************************************
<block instructions>
/ trials = [1 = instructions]
</block>

<block block1>
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,257,
259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,311,313,315,317,319,321,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,377,379,381,383,385,387,389,391,393,395,397,399 = mytrial1; 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388,390,392,394,396,398,400
= spacer;]
/ stop = [trial.mytrial1.response == "Play"]
/ onblockbegin = [values.gamble = 1]
/ onblockbegin = [if (values.side <= 50) {values.ola = values.ow1a; values.olb = values.ow1b; values.olc = values.ow1c; values.pla = values.pw1a; values.plb = values.pw1b; }]
/ onblockbegin = [if (values.side <= 50) {values.ora = values.on1a; values.orb = values.on1b; values.orc = values.on1c; values.pra = values.pn1a; values.prb = values.pn1b;}]
/ onblockbegin = [if (values.side > 50) {values.ora = values.ow1a; values.orb = values.ow1b; values.orc = values.ow1c; values.pra = values.pw1a; values.prb = values.pw1b; }]
/ onblockbegin = [if (values.side > 50) {values.ola = values.on1a; values.olb = values.on1b; values.olc = values.on1c; values.pla = values.pn1a; values.plb = values.pn1b; }]
</block>

<block block2>
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,257,
259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,311,313,315,317,319,321,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,377,379,381,383,385,387,389,391,393,395,397,399 = mytrial2; 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388,390,392,394,396,398,400
= spacer;]
/ stop = [trial.mytrial2.response == "Play"]
/ onblockbegin = [values.gamble = 2]
/ onblockbegin = [if (values.side <= 50) {values.ola = values.ow2a; values.olb = values.ow2b; values.olc = values.ow2c; values.pla = values.pw2a; values.plb = values.pw2b; }]
/ onblockbegin = [if (values.side <= 50) {values.ora = values.on2a; values.orb = values.on2b; values.orc = values.on2c; values.pra = values.pn2a; values.prb = values.pn2b;}]
/ onblockbegin = [if (values.side > 50) {values.ora = values.ow2a; values.orb = values.ow2b; values.orc = values.ow2c; values.pra = values.pw2a; values.prb = values.pw2b; }]
/ onblockbegin = [if (values.side > 50) {values.ola = values.on2a; values.olb = values.on2b; values.olc = values.on2c; values.pla = values.pn2a; values.plb = values.pn2b; }]
</block>

<block block3>
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,257,
259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,311,313,315,317,319,321,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,377,379,381,383,385,387,389,391,393,395,397,399 = mytrial3; 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388,390,392,394,396,398,400
= spacer;]
/ stop = [trial.mytrial3.response == "Play"]
/ onblockbegin = [values.gamble = 3]
/ onblockbegin = [if (values.side <= 50) {values.ola = values.ow3a; values.olb = values.ow3b; values.olc = values.ow3c; values.pla = values.pw3a; values.plb = values.pw3b; }]
/ onblockbegin = [if (values.side <= 50) {values.ora = values.on3a; values.orb = values.on3b; values.orc = values.on3c; values.pra = values.pn3a; values.prb = values.pn3b;}]
/ onblockbegin = [if (values.side > 50) {values.ora = values.ow3a; values.orb = values.ow3b; values.orc = values.ow3c; values.pra = values.pw3a; values.prb = values.pw3b; }]
/ onblockbegin = [if (values.side > 50) {values.ola = values.on3a; values.olb = values.on3b; values.olc = values.on3c; values.pla = values.pn3a; values.plb = values.pn3b; }]
</block>

<block block4>
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,257,
259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,311,313,315,317,319,321,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,377,379,381,383,385,387,389,391,393,395,397,399 = mytrial4; 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388,390,392,394,396,398,400
= spacer;]
/ stop = [trial.mytrial4.response == "Play"]
/ onblockbegin = [values.gamble = 4]
/ onblockbegin = [if (values.side <= 50) {values.ola = values.ow4a; values.olb = values.ow4b; values.olc = values.ow4c; values.pla = values.pw4a; values.plb = values.pw4b; }]
/ onblockbegin = [if (values.side <= 50) {values.ora = values.on4a; values.orb = values.on4b; values.orc = values.on4c; values.pra = values.pn4a; values.prb = values.pn4b;}]
/ onblockbegin = [if (values.side > 50) {values.ora = values.ow4a; values.orb = values.ow4b; values.orc = values.ow4c; values.pra = values.pw4a; values.prb = values.pw4b; }]
/ onblockbegin = [if (values.side > 50) {values.ola = values.on4a; values.olb = values.on4b; values.olc = values.on4c; values.pla = values.pn4a; values.plb = values.pn4b; }]
</block>

<block finals>
/ trials = [1 = highervalue; 2 = confidence; 3 = choice; 4 = cleanup; ]
</block>


<block quit>
/ trials = [1 = exit]
</block>







**************************************************************************************************************
**************************************************************************************************************
,                                       EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt main>
/ blocks = [1 = instructions; 2,4,6,8= noreplace(block1, block2, block3, block4); 3,5,7,9 = finals;  10  = quit;]
</expt>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
What you are doing here

/ ontrialend = [if (trial.mytrial1.response == "LabelA") {text.Loutcome = "<% values.outcome %> pts."; text.routcome = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial1.response == "LabelB") {text.Routcome = "<% values.outcome %> pts."; text.loutcome = "  "; values.samplesr += 1;}]

is *adding* ever more items to those <text> elements. Hit CTRL+D after a bunch of trials and look at the text.Loutcome.itemcount property.

As there is no /select attribute specified for the respective <text> elements, they will sample from this ever-growing pool of items *without replacement* in subsequent blocks. What you'll want to do instead, of course, is to *replace* the 1st and only item for those <text> elements (not adding items over and over):

/ ontrialend = [if (trial.mytrial1.response == "LabelA") {text.Loutcome.item.1 = "<% values.outcome %> pts."; text.routcome.item.1 = "  "; values.samplesl += 1;}]
/ ontrialend = [if (trial.mytrial1.response == "LabelB") {text.Routcome.item.1 = "<% values.outcome %> pts."; text.loutcome.item.1 = "  "; values.samplesr += 1;}]
nashby
nashby
Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)
Group: Forum Members
Posts: 78, Visits: 159
Awesome that worked. Didn't know that it was just appending items to a list (seems kind of counter intuitive).
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search