Millisecond Forums

How to set correctness of response - Police Officer's Dilemma Task

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

By Lindsayportney - 7/11/2017

I have downloaded the Police Officer's Dilemma Task and am attempting to run.  I have not made any changes except the filenames of the images that are linked to the script.  The snag I am running into is that the feedback conditions (whether or not the user hit the correct response) is not working, but only for the practice session specifically.  It is working correctly for the main section.

I do not know which part of the script corresponds to assigning correct responses (in this regard a keylabel) to different stimuli.  Once this is figured out, I should be able to figure out how to appropriately assign the correct feedback stimuli the each image.

Thank you.
Lindsay
By Dave - 7/12/2017

Lindsayportney - Wednesday, July 12, 2017
I have downloaded the Police Officer's Dilemma Task and am attempting to run.  I have not made any changes except the filenames of the images that are linked to the script.  The snag I am running into is that the feedback conditions (whether or not the user hit the correct response) is not working, but only for the practice session specifically.  It is working correctly for the main section.

I do not know which part of the script corresponds to assigning correct responses (in this regard a keylabel) to different stimuli.  Once this is figured out, I should be able to figure out how to appropriately assign the correct feedback stimuli the each image.

Thank you.
Lindsay

The correct response determination and the associated win/loss point calculations are tied to specific item numbers in <trial practiceobject>

<trial practiceobject>
/ontrialbegin = [reset(list.selectbackground)]
/ stimulusframes = [1 = object]

/ validresponse = (values.shootkey,values.noshootkey)
/ timeout = (parameters.timeout)
/ iscorrectresponse = [
                                    ((values.itemnumber == 4 || values.itemnumber == 7  || values.itemnumber == 8 ||
                                    values.itemnumber == 11 ||  values.itemnumber == 13 ||  values.itemnumber == 16 ||
                                    values.itemnumber == 17 ||  values.itemnumber == 18 ||  values.itemnumber == 19 ||
                                    values.itemnumber == 20)  && trial.practiceobject.response == values.shootkey) ||
                                    ((values.itemnumber != 4 &&  values.itemnumber !=7  && values.itemnumber !=8 &&
                                    values.itemnumber != 11 &&  values.itemnumber != 13 &&  values.itemnumber != 16 &&
                                    values.itemnumber!=17 &&  values.itemnumber != 18 &&  values.itemnumber != 19 &&
                                    values.itemnumber != 20)  && trial.practiceobject.response == values.noshootkey) ]

/ monkeyresponse = (values.shootkey, values.noshootkey)
/ ontrialend = [if ((values.itemnumber == 4 || values.itemnumber == 7  || values.itemnumber == 8 ||
                                    values.itemnumber == 11 ||  values.itemnumber == 13 ||  values.itemnumber == 16 ||
                                    values.itemnumber == 17 ||  values.itemnumber == 18 ||  values.itemnumber == 19 ||
                                    values.itemnumber == 20)  && trial.practiceobject.response == values.shootkey)
                                    {values.Hit = 1; values.total += parameters.HitReward}]
/ ontrialend = [if ((values.itemnumber == 4 || values.itemnumber == 7  || values.itemnumber == 8 ||
                                    values.itemnumber == 11 ||  values.itemnumber == 13 ||  values.itemnumber == 16 ||
                                    values.itemnumber == 17 ||  values.itemnumber == 18 ||  values.itemnumber == 19 ||
                                    values.itemnumber == 20)  && trial.practiceobject.response == values.noshootkey)
                                    {values.Miss = 1; values.total -= parameters.MissPunish}]
/ ontrialend = [if ((values.itemnumber != 4 &&  values.itemnumber !=7  && values.itemnumber !=8 &&
                                    values.itemnumber != 11 &&  values.itemnumber != 13 &&  values.itemnumber != 16 &&
                                    values.itemnumber!=17 &&  values.itemnumber != 18 &&  values.itemnumber != 19 &&
                                    values.itemnumber != 20)  && trial.practiceobject.response == values.noshootkey)
                                    {values.CR = 1; values.total += parameters.CRReward}]
/ ontrialend = [if ((values.itemnumber != 4 &&  values.itemnumber !=7  && values.itemnumber !=8 &&
                                    values.itemnumber != 11 &&  values.itemnumber != 13 &&  values.itemnumber != 16 &&
                                    values.itemnumber!=17 &&  values.itemnumber != 18 &&  values.itemnumber != 19 &&
                                    values.itemnumber != 20)  && trial.practiceobject.response == values.shootkey)
                                    {values.FA = 1; values.total = values.total - parameters.FAPunish}]

/ ontrialend = [if (trial.practiceobject.response == 0) values.total -= parameters.NoresponsePunish]
/ branch = [trial.feedback]
</trial>

You need to adjust these accordingly to match how you ordered your items in the respective <picture> elements.