Millisecond Forums

Avoiding False Collects on the BART

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

By JDC - 2/19/2013

Hi,


I'm using the Balloon Analogue Risk Task (BART) template from the Inquisit Task Library, but I'm having a problem with it - if a participant presses Collect twice in a row (which is easy to do by accident), then they are recorded as having made zero button presses for that balloon, which artificially drags down the adjusted average (as the balloon is not considered to have exploded either).


I'd like to modify the template so that the Collect button cannot be pressed until the Pump button has been pressed at least once on each balloon, but I'm having difficulty with this (my solutions have mostly involved the / validresponse expression but if it considers every Collect press to be invalid then it breaks the program).


Does anybody know of a solution to this problem?


Thank-you for your time,


James

By Dave - 2/19/2013

You could add


/ isvalidresponse = [values.pumpcount<1 && trial.choice.response=="pumpbutton"]
/ isvalidresponse = [values.pumpcount>=1 && trial.choice.response=="pumpbutton"]
/ isvalidresponse = [values.pumpcount>=1 && trial.choice.response=="collectbutton"]


to <trial choice>, which will basically disable the collectbutton for the 1st pump trial. I.e., subjects have to pump at least *once* before they can collect.


Regards,


~Dave

By JDC - 2/20/2013

Excellent, thanks very much for your help Dave, that worked perfectly!


- James

By RH - 6/15/2014

Hi Dave,


This is great advice. When inserting this into the script where would you put it? (I am sorry if this is really obvious it is my first time working with a program like this).

<trial choice>
/ ontrialbegin = [values.countchoice += 1]
/ ontrialbegin = [values.pumpresult = list.pumpresult.nextvalue]
/ontrialbegin = [if (values.pumpsound == 1) trial.choice.insertstimulustime(sound.inflatesound,0)]
/ontrialbegin = [values.pumpsound = 0]
/ stimulustimes = [1=collectbutton, balloon, pumpbutton, totalearnings, pumpcount, potentialearnings, ballooncount]
/ inputdevice = mouse
/ validresponse = (collectbutton, pumpbutton)
/ monkeyresponse = ("collectbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton",
                    "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton", "pumpbutton")
/ ontrialend = [if (trial.choice.response == "pumpbutton" && values.countchoice == 1)
      values.timebefore1stpump = trial.choice.latency ]
/ ontrialend = [if (trial.choice.response == "pumpbutton"  && values.countchoice > 1)
      {values.timebtwpumps = trial.choice.latency;
      values.sum_timebtwpumps += values.timebtwpumps }]
/ ontrialend = [if (trial.choice.response == "collectbutton" && values.countchoice == 1)
      values.timebeforecollectwithoutpump =  trial.choice.latency ]
/ ontrialend = [if (trial.choice.response == "collectbutton" && values.countchoice > 1)
      values.timebtwlastpumpandcollect =  trial.choice.latency ]
/ ontrialend = [if (trial.choice.response == "pumpbutton") picture.balloon.width += values.balloonsizeincrement]
/ ontrialend = [if (trial.choice.response == "pumpbutton")picture.balloon.height += values.balloonsizeincrement]
/ ontrialend = [if (trial.choice.response == "pumpbutton")shape.blank.width = picture.balloon.width]
/ ontrialend = [if (trial.choice.response == "pumpbutton")shape.blank.height = picture.balloon.height]
/ ontrialend = [if (trial.choice.response == "pumpbutton")values.pumpcount += 1]
/ ontrialend = [if (trial.choice.response == "pumpbutton")values.totalpumpcount += 1]
/ ontrialend = [if (trial.choice.response == "pumpbutton" && values.ballooncount < 11) values.totalpumpcount_10 += 1]
/ ontrialend = [if (trial.choice.response == "pumpbutton" && values.ballooncount > 10 && values.ballooncount <21 ) values.totalpumpcount_20 += 1]
/ ontrialend = [if (trial.choice.response == "pumpbutton" && values.ballooncount > 20 && values.ballooncount <31 ) values.totalpumpcount_30 += 1]
/ ontrialend = [if (trial.choice.response == "pumpbutton" && values.pumpcount >1) values.mean_timebtwpumps = values.sum_timebtwpumps / (values.pumpcount-1) ]
/ontrialend = [trial.choice.resetstimulusframes()]
 
/ branch = [if (values.pumpresult == 1 && trial.choice.response == "pumpbutton") trial.pop]
/ branch = [if ( trial.choice.response == "pumpbutton") {values.pumpsound = 1; trial.choice}]
/ branch = [if ( trial.choice.response == "collectbutton") trial.collect]
/ recorddata = true
</trial>


Thank you,

Rachel
By Dave - 6/15/2014

As the post says, you add it somewhere in <trial choice>. Exactly where does not matter in this case, but I would put it in the vicinity of / below the existing /validresponse attribute.
By RH - 6/15/2014

Thanks for your help :)