Millisecond Forums

Giving participants the option to repeat a practice trial

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

By Nick Riches - 11/12/2017

Hi

I'd like to give participants the option to repeat a practice trial. I have looked on this forum, and tried to replicate code which people have posted to achieve this. Below is a Minimal Worked Example (MWE). The critical line is the branch within the block 'practiceBlock'. Unfortunately this does not seem to work.

Does anyone have any suggestions?

Cheerio

Nick

<item practiceItems>
/ 1 = "Press Y or N"
/ 2 = "Press Y for Yes, or N for No"
</item>

<text practiceText>
/ items = practiceItems
</text>

<trial practiceTrial>
/ stimulusframes = [1 = practiceText]
/ validresponse = ("y", "n")
/ correctresponse = ("y")
</trial>

<block practiceBlock>
/ trials = [1-2 = practiceTrial]
/ branch = [if(trial.repeattrial.response=="yes")block.practiceBlock]
</block>

<trial repeattrial>
/ stimulusframes = [1=ask,yes,no]
/ inputdevice = mouse
/ validresponse = (yes,no)
</trial>

<text ask>
/ items = ("Wanna repeat the block?")
</text>

<text yes>
/ items = ("Yes, I do.")
/ position = (40%, 60%)
</text>

<text no>
/ items = ("No, I don't.")
/ position = (60%, 60%)
</text>


<expt exp>
/ blocks = [1 = practiceBlock]
</expt>
By Dave - 11/13/2017

Nick Riches - Monday, November 13, 2017
Hi

I'd like to give participants the option to repeat a practice trial. I have looked on this forum, and tried to replicate code which people have posted to achieve this. Below is a Minimal Worked Example (MWE). The critical line is the branch within the block 'practiceBlock'. Unfortunately this does not seem to work.

Does anyone have any suggestions?

Cheerio

Nick

<item practiceItems>
/ 1 = "Press Y or N"
/ 2 = "Press Y for Yes, or N for No"
</item>

<text practiceText>
/ items = practiceItems
</text>

<trial practiceTrial>
/ stimulusframes = [1 = practiceText]
/ validresponse = ("y", "n")
/ correctresponse = ("y")
</trial>

<block practiceBlock>
/ trials = [1-2 = practiceTrial]
/ branch = [if(trial.repeattrial.response=="yes")block.practiceBlock]
</block>

<trial repeattrial>
/ stimulusframes = [1=ask,yes,no]
/ inputdevice = mouse
/ validresponse = (yes,no)
</trial>

<text ask>
/ items = ("Wanna repeat the block?")
</text>

<text yes>
/ items = ("Yes, I do.")
/ position = (40%, 60%)
</text>

<text no>
/ items = ("No, I don't.")
/ position = (60%, 60%)
</text>


<expt exp>
/ blocks = [1 = practiceBlock]
</expt>

The /branch isn't the problem. The problem is that you don't ever actually execute <trial repeattrial>. Your code should read:

<block practiceBlock>
/ trials = [1-2 = practiceTrial; 3 = repeattrial]
/ branch = [if(trial.repeattrial.response=="yes")block.practiceBlock]
</block>
By Nick Riches - 11/14/2017

Dave - Monday, November 13, 2017
Nick Riches - Monday, November 13, 2017
Hi

I'd like to give participants the option to repeat a practice trial. I have looked on this forum, and tried to replicate code which people have posted to achieve this. Below is a Minimal Worked Example (MWE). The critical line is the branch within the block 'practiceBlock'. Unfortunately this does not seem to work.

Does anyone have any suggestions?

Cheerio

Nick

<item practiceItems>
/ 1 = "Press Y or N"
/ 2 = "Press Y for Yes, or N for No"
</item>

<text practiceText>
/ items = practiceItems
</text>

<trial practiceTrial>
/ stimulusframes = [1 = practiceText]
/ validresponse = ("y", "n")
/ correctresponse = ("y")
</trial>

<block practiceBlock>
/ trials = [1-2 = practiceTrial]
/ branch = [if(trial.repeattrial.response=="yes")block.practiceBlock]
</block>

<trial repeattrial>
/ stimulusframes = [1=ask,yes,no]
/ inputdevice = mouse
/ validresponse = (yes,no)
</trial>

<text ask>
/ items = ("Wanna repeat the block?")
</text>

<text yes>
/ items = ("Yes, I do.")
/ position = (40%, 60%)
</text>

<text no>
/ items = ("No, I don't.")
/ position = (60%, 60%)
</text>


<expt exp>
/ blocks = [1 = practiceBlock]
</expt>

The /branch isn't the problem. The problem is that you don't ever actually execute <trial repeattrial>. Your code should read:

<block practiceBlock>
/ trials = [1-2 = practiceTrial; 3 = repeattrial]
/ branch = [if(trial.repeattrial.response=="yes")block.practiceBlock]
</block>

Many thanks. That works a treat. And so simple....!