Group: Administrators
Posts: 13K,
Visits: 105K
|
The basic mechanics go like this (using <text> elements for the sake of example; it works the same with <picture> elements):
<block myblock> / trials = [1-10 = choicetrial] </block>
<trial choicetrial> / inputdevice = mouse / stimulusframes = [1=safe, risky] / validresponse = (safe, risky) / branch = [if (trial.choicetrial.response == "safe") list.safechoice.nextvalue] / branch = [if (trial.choicetrial.response == "risky") list.riskychoice.nextvalue] </trial>
<text safe> / items = ("SAFE") / position = (40%, 50%) </text>
<text risky> / items = ("RISKY") / position = (60%, 50%) </text>
<list safechoice> / items = (trial.20loss, trial.20gain, trial.10loss, trial.10gain) / itemprobabilities = (.10, .10, .40, .40) / poolsize = 10 / replace = true </list>
<list riskychoice> / items = (trial.20loss, trial.20gain, trial.10loss, trial.10gain) / itemprobabilities = (.40, .40, .10, .10) / poolsize = 10 / replace = true </list>
<trial 20loss> / stimulusframes = [1=20losstxt] / validresponse = (57) </trial>
<trial 20gain> / stimulusframes = [1=20gaintxt] / validresponse = (57) </trial>
<trial 10loss> / stimulusframes = [1=10losstxt] / validresponse = (57) </trial>
<trial 10gain> / stimulusframes = [1=10gaintxt] / validresponse = (57) </trial>
<text 20losstxt> / items = ("-20 points") </text>
<text 20gaintxt> / items = ("+20 points") </text>
<text 10losstxt> / items = ("-10 points") </text>
<text 10gaintxt> / items = ("+10 points") </text>
The two <list> elements are responsible for the varying probabilistic outcomes based on "safe" vs. "risyk" choice.
The 20gain, 20loss, etc. <trial> elements would be used to present the respective images instead of <text> elements; you would hanclle any scoring (if so desired) via /ontrialbegin or -end logic in those <trial> elements.
|