Millisecond Forums

Response period gradually decreasing over course of task

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

By esummerell - 4/1/2023

I'm having an issue with this script whereby over the course of the task the window for participants to respond is gradually reduced. 

The task is set up such that:
0ms: display stimulus
4000ms: response period
8000-10000ms: post trial pause.

It should operate such that after a response during the response period, a response message is displayed until the end of the trial.

Something is happening whereby over the course of the task (specifically trials fair/medium/unfair) is that the response period is gradually reduced until it is so small that participants cannot respond. When this happens it is also the case that no response message is displayed in the post trial pause. Eg with no response, instead of latency consistently being 4000ms, it will be for example 1849, 1822, 1762... and gradually decreasing over subsequent trials.

Any idea what might be going on? Code below. 

<defaults>
/ canvasaspectratio = (4,3)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = black
/ txcolor = black
/ inputdevice = xid
/ screencolor = black
</defaults>

<xid responsepad>
/ product = lumina
</xid><expt>
/ blocks = [1 = game; 2 = finish]
</expt>

<block game>
/ trials = [1 = fixation1]
</block>

<block finish>
/ trials = [1 = finish]
</block>

<list triallist>
/items = (trial.unfair, trial.medium, trial.fair)
/poolsize = 36
/selectionmode = random
/replace = false
</list>

<trial fixation1>
/ stimulustimes = [1 = fixation]
/ isvalidresponse = [xid.responsepad.lasteventport == 2]
/ branch = [list.triallist.nextvalue]
</trial>

<trial fixation>
/ stimulusframes = [1 = fixation]
/ timeout = parameters.waitforproposaltime
/ branch = [if (list.triallist.selectedcount < 36)list.triallist.nextvalue else block.finish]
</trial>

<trial unfair>
/ stimulustimes = [0 = PtOfferUnfair, ProposerOffer, ProposalTextUnfair; 4000 = response]
/ beginresponsetime = 4000
/ isvalidresponse = [xid.responsepad.lasteventbutton == 1 && xid.responsepad.lasteventaction == 1 ||xid.responsepad.lasteventbutton == 2 && xid.responsepad.lasteventaction == 1
        ||xid.responsepad.lasteventbutton == 3 && xid.responsepad.lasteventaction == 1||xid.responsepad.lasteventbutton == 4 && xid.responsepad.lasteventaction == 1]
/ responsemessage = (112, text.rejected, 0)
/ responsemessage = (80, text.accepted, 0)
/ responsemessage = (, text.accepted, 0)
/ ontrialbegin = [values.PtOfferUnfair = list.PtOfferUnfair.nextvalue; values.ProposerOffer = parameters.sum - values.PtOfferUnfair; values.trialbegin = script.elapsedtime]
/ ontrialend = [
        if (xid.responsepad.lasteventbutton == 3) {
        values.outcome = "REJECTED";
        values.ProposerOffer = 0;
        values.PtOfferUnfair = 0;}
        else {
        values.outcome ="ACCEPTED";
        values.participanttotal += values.PtOfferUnfair;
        values.computertotal += values.ProposerOffer;}
    values.trialend = script.elapsedtime]
/ posttrialpause = 2000
/ trialduration = 10000
/ branch = [trial.fixation]
</trial>

<trial medium>
/ stimulustimes = [0 = PtOfferMedium, ProposerOffer, ProposalTextMedium; 4000 = response]
/ beginresponsetime = 4000
/ isvalidresponse = [xid.responsepad.lasteventbutton == 1 && xid.responsepad.lasteventaction == 1 ||xid.responsepad.lasteventbutton == 2 && xid.responsepad.lasteventaction == 1
        ||xid.responsepad.lasteventbutton == 3 && xid.responsepad.lasteventaction == 1||xid.responsepad.lasteventbutton == 4 && xid.responsepad.lasteventaction == 1]
/ responsemessage = (112, text.rejected, 0)
/ responsemessage = (80, text.accepted, 0)
/ responsemessage = (, text.accepted, 0)
/ ontrialbegin = [values.PtOfferMedium = list.PtOfferMedium.nextvalue;values.ProposerOffer = parameters.sum - values.PtOfferMedium; values.trialbegin = script.elapsedtime]
/ ontrialend = [
                if (xid.responsepad.lasteventbutton == 3) {
        values.outcome = "REJECTED";
        values.ProposerOffer = 0;
        values.PtOfferMedium = 0;}
        else {
        values.outcome ="ACCEPTED";
        values.participanttotal += values.PtOfferMedium;
        values.computertotal += values.ProposerOffer;}
    values.trialend = script.elapsedtime]
/ posttrialpause = 2000
/ trialduration = 10000
/ branch = [trial.fixation]
</trial>

<trial fair>
/ stimulustimes = [0 = PtOfferFair, ProposerOffer, ProposalTextFair; 4000 = response]
/ beginresponsetime = 4000
/ isvalidresponse = [xid.responsepad.lasteventbutton == 1 && xid.responsepad.lasteventaction == 1 ||xid.responsepad.lasteventbutton == 2 && xid.responsepad.lasteventaction == 1
        ||xid.responsepad.lasteventbutton == 3 && xid.responsepad.lasteventaction == 1||xid.responsepad.lasteventbutton == 4 && xid.responsepad.lasteventaction == 1]
/ responsemessage = (112, text.rejected, 0)
/ responsemessage = (80, text.accepted, 0)
/ responsemessage = (, text.accepted, 0)
/ ontrialbegin = [values.PtOfferFair = list.PtOfferFair.nextvalue; values.ProposerOffer = parameters.sum - values.PtOfferFair; values.trialbegin = script.elapsedtime]
/ ontrialend = [
                if (xid.responsepad.lasteventbutton == 3) {
        values.outcome = "REJECTED";
        values.ProposerOffer = 0;
        values.PtOfferFair = 0;}
        else {
        values.outcome ="ACCEPTED";
        values.participanttotal += values.PtOfferFair;
        values.computertotal += values.ProposerOffer;}
    values.trialend = script.elapsedtime]
/ posttrialpause = 2000
/ trialduration = 10000
/ branch = [trial.fixation]
</trial>

<trial finish>
/ stimulusframes = [1 = finish]
/ recorddata = false
/ timeout = 2000
</trial>

<list PtOfferPrac>
/ items = (18, 19, 20)
/ replace = false
</list>

<list PtOfferFair>
/ items = (17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20)
/ replace = false
</list>

<list PtOfferMedium>
/ items = (10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13)
/ replace = false
</list>

<list PtOfferUnfair>
/ items = (4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7)
/ replace = false
</list>

<list TextPrac>
/ items = ("I really need the money…"; "Hope you'll take it"; "Giving you a great offer")
</list>

<list TextFair>
/ items = ("You know what to do"; "Let's split it equally"; "Don't hesitate"; "Roll with me…"; "If you take it, we both win"; "Let's do this already"; "The offer speaks for itself :)";
"Hope I can count on you"; "I know you'll make the right choice"; "Equality for all!"; "I'm being fair, you should too"; "Let’s make a deal")
/ replace = false
</list>

<list TextMedium>
/ items = ("Dog eat dog, bitch!"; "Some people are just worth more"; "Don't be a jerk!"; "Don’t be stupid"; "Gotta be a psycho not to take this"; "No hard feelings honey!";
"All or nothing baby"; "Shame on you if you reject this"; "Maybe next time you'll get more"; "This game is not for the weak"; "That's the offer, deal with it";
"Honestly, I'm being generous here")
/ replace = false
</list>

<list TextUnfair>
/ items = ("Come on, loser!!!"; "Be happy you got anything at all"; "Who the hell are you?"; "You must be an a-hole if you reject"; "C'mon accept this, don’t be a loser";
"Kiddo, let me teach you about life"; "Be a good kid and take it"; "Don’t be a dumbass rookie"; "Take it! I have no time for this"; "Take it like a little bitch";
"more for me, less for you, all good"; "This is it hon")
/ replace = false
</list>

<list namesprac>
/ items = ("S.O."; "S.O."; "T.C."; "T.C."; "G.M."; "G.M.")
/ selectionmode = sequence
</list>

<list names>
/ items = ("Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2"; "Player 2";
"Player 2"; "Player 2"; "Player 2")
/ selectionmode = sequence
</list>

<text accepted>
/ items = ("ACCEPTED")
/ txcolor = green
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ position = (50%, 80%)
</text>

<text rejected>
/ items = ("REJECTED")
/ txcolor = red
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ position = (50%, 80%)
</text>

<text response>
/ items = ("do you accept or reject this offer?")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 80%)
</text>

<text ProposalTextFair>
/ items = ("<%list.names.nextvalue%> : <%list.TextFair.nextvalue%>")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 60%)
</text>

<text ProposalTextMedium>
/ items = ("<%list.names.nextvalue%> : <%list.TextMedium.nextvalue%>")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 60%)
</text>

<text ProposalTextUnfair>
/ items = ("<%list.names.nextvalue%> : <%list.TextUnfair.nextvalue%>")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 60%)
</text>

<text UnfairText>            
/items = ("Come on, loser!!!"; "Be happy you got anything at all"; "Who the hell are you?"; "You must be an a-hole if you reject"; "C'mon accept this, don’t be a loser";
"Kiddo, let me teach you about life"; "Be a good kid and take it"; "Don’t be a dumbass rookie"; "Take it! I have no time for this"; "Take it like a little bitch";
"more for me, less for you, all good"; "This is it hon")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 40%)
/ select = noreplacenorepeat
</text>

<text MediumText>            
/items = ("Dog eat dog, bitch!"; "Some people are just worth more"; "Don't be a jerk!"; "Don’t be stupid"; "Gotta be a psycho not to take this"; "No hard feelings honey!";
"All or nothing baby"; "Shame on you if you reject this"; "Maybe next time you'll get more"; "This game is not for the weak"; "That's the offer, deal with it";
"Honestly, I'm being generous here")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 40%)
/ select = noreplacenorepeat
</text>

<text FairText>                
/items = ("You know what to do"; "Let's split it equally"; "Don't hesitate"; "Roll with me…"; "If you take it, we both win"; "Let's do this already"; "The offer speaks for itself :)";
"Hope I can count on you"; "I know you'll make the right choice"; "Equality for all!"; "I'm being fair, you should too"; "Let’s make a deal")
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (50%, 40%)
/ select = noreplacenorepeat
</text>

<text ProposerOffer>
/ items = ("<%list.names.nextvalue%>
<%values.ProposerOffer%>")
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (60%, 40%)
/ halign = left
</text>

<text PtOfferFair>
/ items = ("You
<%values.PtOfferFair%>")
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (30%, 40%)
/ halign = left
</text>

<text PtOfferMedium>
/ items = ("You
<%values.PtOfferMedium%>")
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (30%, 40%)
/ halign = left
</text>

<text PtOfferUnfair>
/ items = ("You
<%values.PtOfferUnfair%>")
/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)
/ txcolor = white
/ position = (30%, 40%)
/ halign = left
</text>

<text fixation>
/ items = ("+")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ position = (50%, 50%)
/ txcolor = white
</text>

<text outcome>
/ items = ("<%values.outcome%>")
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ position = (50%, 80%)
</text>

<parameters>
/ sum = 40
/ NumberofResponderBlocks = 36
/ makeproposaltime = 0
/ waitforproposaltime = 2000
/ seeoutcome = 2000
</parameters>

<values>
/ role = 0
/ ProposerOfferPrac = 0
/ ProposerOffer = 0
/ PtOfferPrac = 0
/ PtOffer = 0
/ PtOfferFair = 0
/ PtOfferMedium = 0
/ PtOfferUnfair = 0
/ ResponderGainUnfair = 0
/ ResponderGainMedium = 0
/ ResponderGainFair = 0
/ participanttotalprac = 0
/ participanttotal = 0
/ computertotal = 0
/ outcome = 0
/ random = 0
/ trialbegin = 0
/ trialend = 0
/ responsemessage = 0
</values>

<expressions>
/ trialduration = values.trialend-values.trialbegin;
</expressions>



By seandr - 4/6/2023

Hello,

I'm trying to run your script, but it appears there's a missing stimulus called "finish" that is presented by the "finish" trial. Can you attach the full script (with the finish stimulus definition) so we can troubleshoot?

I did notice a couple errors in the script, although they may be unrelated to the issue you are observing.

1)
<trial fixation>
/ stimulusframes = [1 = fixation]
/ timeout = parameters.waitforproposaltime
/ branch = [if (list.triallist.selectedcount < 36)list.triallist.nextvalue else block.finish]
</trial>


Within a trial, you can only branch to other trials, so "else block.finish" should be removed. 

2) Within trials medium, fair, and unfair, you have the following 
/ responsemessage = (, text.accepted, 0)


If this is meant for no response, you should indicate the response value as "0".