Millisecond Forums

Learning phase with correct score feedback

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

By davidbarton - 2/19/2014

Hi, I was hoping to get some help with an experiment I am designing.

Before participants proceed to another part of the experiment they need to learn the names of 4 faces. There are 4 different faces but only 2 names, so two faces share the same name. Participants get 40 trials to learn the face names after which if they scored 90% correct they proceed to the next phase. 

Please can I get some help with the code to record their responses, calculate their correct scores, display that score to the participant with either the message that they will proceed to the next phase or that they will have to redo the learning phase. Here is the code I have tested so far.

Thanks heaps for your kind assistance.

David Barton

****************************************************************
Stimulus Items
******************************************************************

<picture faces1>
/ items = faces1
/ select = faces1
/ size = (45%, 45%)
</picture>

<picture faces2>
/ items = faces2
/ select = faces2
/ size = (45%, 45%)
</picture>


<text NameleftA>
/ items = names1
/ valign = bottom
/ halign = left
/ position = (25,80)
/ txcolor = (0,0,0)
/ fontstyle = ("Arial", 40pt, true)
</text>


<text NamerightA>
/ items = names1
/ valign = bottom
/ halign = left
/ position = (70,80)
/ txcolor = (0,0,0)
/ fontstyle = ("Arial", 40pt, true)
</text>

<text NameleftB>
/ items = names2
/ valign = bottom
/ halign = left
/ position = (25,80)
/ txcolor = (0,0,0)
/ fontstyle = ("Arial", 40pt, true)
</text>


<text NamerightB>
/ items = names2
/ valign = bottom
/ halign = left
/ position = (70,80)
/ txcolor = (0,0,0)
/ fontstyle = ("Arial", 40pt, true)
</text>

-----------------------------------------------------------------
 Error
---------------------------------------------------------------------


<text error>
/ position = (50%,85%)
/ items = ("X")
/ color = (255, 0, 0)
/ fontstyle = ("Arial",10%, true)
</text>


*******************************************************************
Items
*******************************************************************
<item names1>
/1 = "Hugo"
</item>

<item names2>
/1= "Finn"
</item>

<item faces1>
/1="C:\Experiments\1403 IAT\learning\Roundface 1.JPG"
/2="C:\Experiments\1403 IAT\learning\Roundface 2.JPG"
</item>

<item faces2>
/1="C:\Experiments\1403 IAT\learning\Roundface 3.JPG"
/2="C:\Experiments\1403 IAT\learning\Roundface 4.JPG"
</item>

<counter faces1>
/ select = noreplace (1-2)
/ selectionrate = always
</counter>

<counter faces2>
/ select = noreplace (1-2)
/ selectionrate = always
</counter>


***************************************************************************************************************************************************************************************
           Trials
***************************************************************************************************************************************************************************************

<trial learning1>
/ validresponse = ("z", "/")
/ correctresponse = ("z")
/ stimulusframes = [1=NameleftA,NamerightB,faces1]
/ posttrialpause = 250
</trial>


<trial learning2>
/ validresponse = ("z", "/")
/ correctresponse = ("/")
/ stimulusframes = [1=NameleftB,NamerightA,faces1]
/ posttrialpause = 250
</trial>

<trial learning3>
/ validresponse = ("z", "/")
/ correctresponse = ("/")
/ stimulusframes = [1=NameleftA,NamerightB,faces2]
/ posttrialpause = 250
</trial>


<trial learning4>
/ validresponse = ("z", "/")
/ correctresponse = ("z")
/ stimulusframes = [1=NameleftB,NamerightA,faces2]
/ posttrialpause = 250
</trial>

******************************************************************************************************************************************************************************************
                 Blocks
*****************************************************************************************************************************************************************************************


<block Election>
/ trials = [1-40 = noreplace(learning1,learning2,learning3,learning4)]
/ errormessage = true(error,200)
/responsemode=correct
/ recorddata = true
</block>

By Dave - 2/19/2014

You'll want to look at the documentation for the /correcttarget attribute. You'll also want to look at block- and/or trial-level properties such as correctcount and percentcorrect, all of which can be found detailed in the language reference.

If you want more control, it is easy to do those basic calculations yourself using <values>, <expressions> and a bit of logic in /ontrialbegin and /ontrialend attributes.

You can report feedback either via standard <text> / <trial> elements or -- if you prefer -- <page> elements. Very basic feedback features are also available via the /blockfeedback attribute.
By davidbarton - 2/19/2014

Hi Dave

Should the following block repeat itself unless the participant gets 90% or better correct? And can blockfeedback be used here to display the correct % before moving on?

Regards
David




<block Election>

/ trials = [1-12 = noreplace(learning1,learning2,learning3,learning4)]

/ errormessage = true(error,200)

/responsemode=correct

/ recorddata = true

/ blockfeedback = (correct)

/ correcttarget=(percentcorrect, 90, 0)

</block>

By Dave - 2/19/2014

Yes.
By davidbarton - 2/19/2014

For some reason it just terminates after if gives me the correct % and doesn't rerun.  Have I missed anything?

By Dave - 2/19/2014

That's not what I'm seeing. E.g.

<expt>
/ blocks = [1=myblock]
</expt>

<block myblock>
/ trials = [1-10=mytrial]
/ blockfeedback = (correct)
/ correcttarget = (percentcorrect, 90, 0)
/ response = correct
</block>

<trial mytrial>
/ posttrialpause = 500
/ stimulusframes = [1=mytext]
/ validresponse = (57, 28)
/ correctresponse = (57)
</trial>

<text mytext>
/ items = ("A")
</text>

which is in essence the exact same thing, behaves as expected. Is your Inquisit installation up to date (i.e. at 3.0.6.0)?

Also note that you *must* specify an <expt> element. Otherwise you don't really have a fully functional script.
By davidbarton - 2/19/2014

Hi, yes all up to date, and I got it working, forgot to include

<expt>

/ blocks = [1=Election]

</expt>


All good now. Many thanks