Storing stimuli and its locations to show the same stimuli once again in the same locations and same...


Storing stimuli and its locations to show the same stimuli once again...
Author
Message
aarthiravi
aarthiravi
Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)
Group: Forum Members
Posts: 15, Visits: 133
Hi,
I have just started using Inquisit for two weeks now.
I am trying to create an experiment where 3 images are shown one after the other in 3 different locations on the screen. 
I am randomly pairing 3 images together without replacement after which they will be presented in the sequence below. I would like to present the same sequence, the same pairings, same image locations once again to the same participant. 

The next participant will get a different pairing and so on.

So one block would be
Study trial :
1st presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12
Repeat presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12

Test Trial: ...

More blocks of the same type would follow with a study trial (fixation plus 12 images presented twice) and then a test trial immediately after.
 
So far, I have been successful in randomly pairing the images in groups of 3, presenting the images, storing their locations, and the name of the image presented.

Please help me code how to present the same sequence once more.
Thanks!

This is my code so far...
**************************************************************************************************************
**************************************************************************************************************
    PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ index = 1
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ select = values.index
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS     
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [

    if (parameters.randomPairings == 1){
        values.index = list.tripletnumbers.nextvalue;
        list.imagenumbers.insertitem(values.index, 1);    
    
    } else {
        values.index += 1;
        list.imagenumbers.insertitem(values.index, 1);    
    };

]
/ branch = [
    if (list.imagenumbers.itemcount < 3){
        return trial.pairings;
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.imagenumbers.nextindex;
    
    picture.tripletimage.hposition = list.xpos.nextvalue;
    picture.tripletimage.vposition = list.ypos.nextvalue;]
    / stimulustimes = [0=picture.tripletimage]
    / timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ onblockbegin = [
    list.imagenumbers.reset();
    values.index = 0;
]
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1= pairings; 2 = encodingphase]
</expt>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
aarthiravi - 2/18/2022
Hi,
I have just started using Inquisit for two weeks now.
I am trying to create an experiment where 3 images are shown one after the other in 3 different locations on the screen. 
I am randomly pairing 3 images together without replacement after which they will be presented in the sequence below. I would like to present the same sequence, the same pairings, same image locations once again to the same participant. 

The next participant will get a different pairing and so on.

So one block would be
Study trial :
1st presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12
Repeat presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12

Test Trial: ...

More blocks of the same type would follow with a study trial (fixation plus 12 images presented twice) and then a test trial immediately after.
 
So far, I have been successful in randomly pairing the images in groups of 3, presenting the images, storing their locations, and the name of the image presented.

Please help me code how to present the same sequence once more.
Thanks!

This is my code so far...
**************************************************************************************************************
**************************************************************************************************************
    PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ index = 1
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ select = values.index
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS     
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [

    if (parameters.randomPairings == 1){
        values.index = list.tripletnumbers.nextvalue;
        list.imagenumbers.insertitem(values.index, 1);    
    
    } else {
        values.index += 1;
        list.imagenumbers.insertitem(values.index, 1);    
    };

]
/ branch = [
    if (list.imagenumbers.itemcount < 3){
        return trial.pairings;
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.imagenumbers.nextindex;
    
    picture.tripletimage.hposition = list.xpos.nextvalue;
    picture.tripletimage.vposition = list.ypos.nextvalue;]
    / stimulustimes = [0=picture.tripletimage]
    / timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ onblockbegin = [
    list.imagenumbers.reset();
    values.index = 0;
]
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1= pairings; 2 = encodingphase]
</expt>

I don't understand what your pairings block / trial is supposed to do. As far as I can see, it does absolutely nothing? Please explain.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Dave - 2/18/2022
aarthiravi - 2/18/2022
Hi,
I have just started using Inquisit for two weeks now.
I am trying to create an experiment where 3 images are shown one after the other in 3 different locations on the screen. 
I am randomly pairing 3 images together without replacement after which they will be presented in the sequence below. I would like to present the same sequence, the same pairings, same image locations once again to the same participant. 

The next participant will get a different pairing and so on.

So one block would be
Study trial :
1st presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12
Repeat presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12

Test Trial: ...

More blocks of the same type would follow with a study trial (fixation plus 12 images presented twice) and then a test trial immediately after.
 
So far, I have been successful in randomly pairing the images in groups of 3, presenting the images, storing their locations, and the name of the image presented.

Please help me code how to present the same sequence once more.
Thanks!

This is my code so far...
**************************************************************************************************************
**************************************************************************************************************
    PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ index = 1
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ select = values.index
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS     
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [

    if (parameters.randomPairings == 1){
        values.index = list.tripletnumbers.nextvalue;
        list.imagenumbers.insertitem(values.index, 1);    
    
    } else {
        values.index += 1;
        list.imagenumbers.insertitem(values.index, 1);    
    };

]
/ branch = [
    if (list.imagenumbers.itemcount < 3){
        return trial.pairings;
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.imagenumbers.nextindex;
    
    picture.tripletimage.hposition = list.xpos.nextvalue;
    picture.tripletimage.vposition = list.ypos.nextvalue;]
    / stimulustimes = [0=picture.tripletimage]
    / timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ onblockbegin = [
    list.imagenumbers.reset();
    values.index = 0;
]
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1= pairings; 2 = encodingphase]
</expt>

I don't understand what your pairings block / trial is supposed to do. As far as I can see, it does absolutely nothing? Please explain.

Anyway, going by your description, you should do something like this:


**************************************************************************************************************
**************************************************************************************************************
PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletxpos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletypos>
/ selectionmode = sequence
/ selectionrate = always
</list>


**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [
    list.imagenumbers.reset();
    list.tripletnumbers.reset();
    list.tripletxpos.reset();
    list.tripletypos.reset();
    var i = 0;
    while (i < list.imagenumbers.itemcount){
        i += 1;
        list.tripletnumbers.appenditem(list.imagenumbers.nextvalue);
        list.tripletxpos.appenditem(list.xpos.nextvalue);
        list.tripletypos.appenditem(list.ypos.nextvalue);
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.tripletnumbers.nextvalue;
    picture.tripletimage.hposition = list.tripletxpos.nextvalue;
    picture.tripletimage.vposition = list.tripletypos.nextvalue;
]
/ stimulustimes = [0=picture.tripletimage]
/ timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [
1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;

17 = encodingfixation; 18 = encodingimage; 19 = encodingimage; 20 = encodingimage;
21 = encodingfixation; 22 = encodingimage; 23 = encodingimage; 24 = encodingimage;
25 = encodingfixation; 26 = encodingimage; 27 = encodingimage; 28 = encodingimage;
29 = encodingfixation; 30 = encodingimage; 31 = encodingimage; 32 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1 = pairings; 2 = encodingphase; ]
</expt>

aarthiravi
aarthiravi
Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)
Group: Forum Members
Posts: 15, Visits: 133
Dave - 2/18/2022
Dave - 2/18/2022
aarthiravi - 2/18/2022
Hi,
I have just started using Inquisit for two weeks now.
I am trying to create an experiment where 3 images are shown one after the other in 3 different locations on the screen. 
I am randomly pairing 3 images together without replacement after which they will be presented in the sequence below. I would like to present the same sequence, the same pairings, same image locations once again to the same participant. 

The next participant will get a different pairing and so on.

So one block would be
Study trial :
1st presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12
Repeat presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12

Test Trial: ...

More blocks of the same type would follow with a study trial (fixation plus 12 images presented twice) and then a test trial immediately after.
 
So far, I have been successful in randomly pairing the images in groups of 3, presenting the images, storing their locations, and the name of the image presented.

Please help me code how to present the same sequence once more.
Thanks!

This is my code so far...
**************************************************************************************************************
**************************************************************************************************************
    PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ index = 1
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ select = values.index
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS     
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [

    if (parameters.randomPairings == 1){
        values.index = list.tripletnumbers.nextvalue;
        list.imagenumbers.insertitem(values.index, 1);    
    
    } else {
        values.index += 1;
        list.imagenumbers.insertitem(values.index, 1);    
    };

]
/ branch = [
    if (list.imagenumbers.itemcount < 3){
        return trial.pairings;
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.imagenumbers.nextindex;
    
    picture.tripletimage.hposition = list.xpos.nextvalue;
    picture.tripletimage.vposition = list.ypos.nextvalue;]
    / stimulustimes = [0=picture.tripletimage]
    / timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ onblockbegin = [
    list.imagenumbers.reset();
    values.index = 0;
]
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1= pairings; 2 = encodingphase]
</expt>

I don't understand what your pairings block / trial is supposed to do. As far as I can see, it does absolutely nothing? Please explain.

Anyway, going by your description, you should do something like this:


**************************************************************************************************************
**************************************************************************************************************
PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletxpos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletypos>
/ selectionmode = sequence
/ selectionrate = always
</list>


**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [
    list.imagenumbers.reset();
    list.tripletnumbers.reset();
    list.tripletxpos.reset();
    list.tripletypos.reset();
    var i = 0;
    while (i < list.imagenumbers.itemcount){
        i += 1;
        list.tripletnumbers.appenditem(list.imagenumbers.nextvalue);
        list.tripletxpos.appenditem(list.xpos.nextvalue);
        list.tripletypos.appenditem(list.ypos.nextvalue);
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.tripletnumbers.nextvalue;
    picture.tripletimage.hposition = list.tripletxpos.nextvalue;
    picture.tripletimage.vposition = list.tripletypos.nextvalue;
]
/ stimulustimes = [0=picture.tripletimage]
/ timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [
1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;

17 = encodingfixation; 18 = encodingimage; 19 = encodingimage; 20 = encodingimage;
21 = encodingfixation; 22 = encodingimage; 23 = encodingimage; 24 = encodingimage;
25 = encodingfixation; 26 = encodingimage; 27 = encodingimage; 28 = encodingimage;
29 = encodingfixation; 30 = encodingimage; 31 = encodingimage; 32 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1 = pairings; 2 = encodingphase; ]
</expt>

Hi Dave,
Thank you so much! This is exactly what I was looking for. The initial trial "pairings" code randomly paired the stimuli into groups of three and presented them. But I think that approach was wrong compared to yours. Anyways, thank you!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
aarthiravi - 2/18/2022
Dave - 2/18/2022
Dave - 2/18/2022
aarthiravi - 2/18/2022
Hi,
I have just started using Inquisit for two weeks now.
I am trying to create an experiment where 3 images are shown one after the other in 3 different locations on the screen. 
I am randomly pairing 3 images together without replacement after which they will be presented in the sequence below. I would like to present the same sequence, the same pairings, same image locations once again to the same participant. 

The next participant will get a different pairing and so on.

So one block would be
Study trial :
1st presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12
Repeat presentation: Fixation cross -> image1 -> image2-> image3 -> Fixation cross -> image4 -> image5-> image6 -> Fixation cross -> image7 -> image8-> image9 -> Fixation cross -> image10 -> image11-> image12

Test Trial: ...

More blocks of the same type would follow with a study trial (fixation plus 12 images presented twice) and then a test trial immediately after.
 
So far, I have been successful in randomly pairing the images in groups of 3, presenting the images, storing their locations, and the name of the image presented.

Please help me code how to present the same sequence once more.
Thanks!

This is my code so far...
**************************************************************************************************************
**************************************************************************************************************
    PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ index = 1
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ select = values.index
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS     
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [

    if (parameters.randomPairings == 1){
        values.index = list.tripletnumbers.nextvalue;
        list.imagenumbers.insertitem(values.index, 1);    
    
    } else {
        values.index += 1;
        list.imagenumbers.insertitem(values.index, 1);    
    };

]
/ branch = [
    if (list.imagenumbers.itemcount < 3){
        return trial.pairings;
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.imagenumbers.nextindex;
    
    picture.tripletimage.hposition = list.xpos.nextvalue;
    picture.tripletimage.vposition = list.ypos.nextvalue;]
    / stimulustimes = [0=picture.tripletimage]
    / timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ onblockbegin = [
    list.imagenumbers.reset();
    values.index = 0;
]
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1= pairings; 2 = encodingphase]
</expt>

I don't understand what your pairings block / trial is supposed to do. As far as I can see, it does absolutely nothing? Please explain.

Anyway, going by your description, you should do something like this:


**************************************************************************************************************
**************************************************************************************************************
PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
</parameters>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item oldstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"
</item>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.oldstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ tripletimage = 1
</values>

**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletxpos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletypos>
/ selectionmode = sequence
/ selectionrate = always
</list>


**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, expressions.canvasRatio)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
/locationx =
</expressions>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [
    list.imagenumbers.reset();
    list.tripletnumbers.reset();
    list.tripletxpos.reset();
    list.tripletypos.reset();
    var i = 0;
    while (i < list.imagenumbers.itemcount){
        i += 1;
        list.tripletnumbers.appenditem(list.imagenumbers.nextvalue);
        list.tripletxpos.appenditem(list.xpos.nextvalue);
        list.tripletypos.appenditem(list.ypos.nextvalue);
    };
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
    values.tripletimage = list.tripletnumbers.nextvalue;
    picture.tripletimage.hposition = list.tripletxpos.nextvalue;
    picture.tripletimage.vposition = list.tripletypos.nextvalue;
]
/ stimulustimes = [0=picture.tripletimage]
/ timeout = parameters.stimulusduration
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [
1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;

17 = encodingfixation; 18 = encodingimage; 19 = encodingimage; 20 = encodingimage;
21 = encodingfixation; 22 = encodingimage; 23 = encodingimage; 24 = encodingimage;
25 = encodingfixation; 26 = encodingimage; 27 = encodingimage; 28 = encodingimage;
29 = encodingfixation; 30 = encodingimage; 31 = encodingimage; 32 = encodingimage;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1 = pairings; 2 = encodingphase; ]
</expt>

Hi Dave,
Thank you so much! This is exactly what I was looking for. The initial trial "pairings" code randomly paired the stimuli into groups of three and presented them. But I think that approach was wrong compared to yours. Anyways, thank you!

> The initial trial "pairings" code randomly paired the stimuli into groups of three and presented them.

For the record: It did not. That code was entirely unfunctional, it did not do a single thing.
aarthiravi
aarthiravi
Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)
Group: Forum Members
Posts: 15, Visits: 133
Hi!

So in my study, I am grouping stimuli into sets of three called triplets. One of the conditions is to present the images one by one in a certain order in the study phase. In the test phase, there are two types of trials. Target trials and Lure trials. In target trials, the images are presented in the original order as in the study phase. In lure trials, two of the images would have switched their order position.  Here is my code for each of the trials types - encoding, retrieval target, and retrieval lure.

I am finding difficulty in randomly selecting one triplet from the encoding phase every time a new retrieval trial is presented. The same triplet is being presented for all retrieval trials. Please let me know where I'm going wrong with the coding.

**************************************************************************************************************
**************************************************************************************************************
PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
/ probeduration = 2000
/ probeduritemtime = 3000
/ responsewindow = 60000
/ yesKey = "E"
/ noKey = "I"
</parameters>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item allstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"

/13="13.jpg"
/14="14.jpg"
/15="15.jpg"
/16="16.jpg"
/17="17.jpg"
/18="18.jpg"
/19="19.jpg"
/20="20.jpg"
</item>

// i13 to 20 are the new stims, will not be used in the triplets presented
<list newstims>
/ items = (13,14,15,16,17,18,19,20)
/ selectionrate = always
</list>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.allstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

<picture orderpic1>
/ items = item.allstims
/ select = values.orderpic1
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<picture orderpic2>
/ items = item.allstims
/ select = values.orderpic2
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<picture orderpic3>
/ items = item.allstims
/ select = values.orderpic3
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<text yes>
/ items = ("YES")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (10%, 3%)
/ txcolor = black
</text>

<text no>
/ items = ("NO")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (10%, 3%)
/ txcolor = black
</text>

// Probe Questions //
<text itemtimequestion>
/ items = ("Same order?")
/ position = (50%, 40%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (30%, 15%)
/ txcolor = black
</text>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ tripletimage = 1
/ orderpic1 = 1
/ orderpic2 = 1
/ orderpic3 = 1
/ pic1x = 0%
/ pic2x = 0%
/ pic3x = 0%
/ pic1y = 0%
/ pic2y = 0%
/ pic3y = 0%
/ whichtriplet = 0
/ whichluretype = 0
/ responseCategory = ""
</values>


**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

// list of locations for the encoding trials

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>


// list of locations for the test/probe trials for order condition

<list orderxpos>
/ items = (50%, 50%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list orderypos>
/ items = (50%, 50%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ selectionmode = sequence
/ selectionrate = always
</list>


<list tripletxpos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletypos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list anytriplet>
/ items = (1,2,3,4)
/ replace = true
/ selectionrate = always
</list>

<list luretypes>
/ items = (1,2,3)
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, stimulusitem, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, parameters.probeduration, parameters.probeduritemtime, expressions.canvasRatio, values.responseCategory, correct, latency,
values.whichtriplet,values.pic1, values.pic2, values.pic3,values.orderpic1, values.orderpic2, values.orderpic3, values.pic1x, values.pic1y, values.pic2x, values.pic2y, values.pic3x, values.pic3y,
)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
</expressions>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [
//list.imagenumbers.reset();
list.tripletnumbers.reset();
list.tripletxpos.reset();
list.tripletypos.reset();
var i = 0;
while (i < 12){
 i += 1;
 list.tripletnumbers.appenditem(list.imagenumbers.nextvalue);
 list.tripletxpos.appenditem(list.xpos.nextvalue);
 list.tripletypos.appenditem(list.ypos.nextvalue);
};
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
values.tripletimage = list.tripletnumbers.nextvalue;
picture.tripletimage.hposition = list.tripletxpos.nextvalue;
picture.tripletimage.vposition = list.tripletypos.nextvalue;
]
/ stimulustimes = [0=picture.tripletimage]
/ timeout = parameters.stimulusduration
</trial>

// 1st triplet starts at 1
// 2nd triplet starts at 4
// 3rd triplet starts at 7
// 4th triplet starts at 10

<list tripletstart>
/ items = (1,4,7,10)
/ selectionrate = always
</list>

<list itemwithintriplet>
/ items = (0,1,2)
/ selectionrate = always
/ replace = true
</list>


// Item-Time Condition /////////////////////////////////////////////////////////////////////////////////////////////////////////


**Target trial**

<trial itemtimetarget>
/ ontrialbegin = [values.whichtriplet=list.anytriplet.currentvalue;]
/ ontrialbegin = [
    list.tripletstart.reset()
    values.pic1x = picture.orderpic1.hposition;
  values.pic2x = picture.orderpic2.hposition;
  values.pic3x = picture.orderpic3.hposition;
    values.pic1y = picture.orderpic1.vposition;
  values.pic2y = picture.orderpic2.vposition;
  values.pic3y = picture.orderpic3.vposition;
    
    // randomly select one of the presented triplets, select first item within that triplet, assign to orderpics
    
    if(values.whichtriplet=1){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3));
    
    } elseif (values.whichtriplet=2){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3));
    
    } elseif (values.whichtriplet=3){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3));
    
    } elseif (values.whichtriplet=4){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3));
  block.encodingphase
    } 
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
  return (
  (trial.itemtimetarget.responsetext == parameters.yesKey) ||
  (trial.itemtimetarget.responsetext == parameters.noKey));
]
</trial>


**Lure trial**

<trial itemtimelure>
/ ontrialbegin = [values.whichluretype=list.luretypes.currentvalue;]
/ ontrialbegin = [values.whichtriplet=list.anytriplet.currentvalue;]
/ ontrialbegin = [
    list.tripletstart.reset()
    values.pic1x = picture.orderpic1.hposition;
  values.pic2x = picture.orderpic2.hposition;
  values.pic3x = picture.orderpic3.hposition;
    values.pic1y = picture.orderpic1.vposition;
  values.pic2y = picture.orderpic2.vposition;
  values.pic3y = picture.orderpic3.vposition;
    
    //select a random triplet, select a random lure type (mixed order positions for two out of three images),
    //assign to the orderpics
    
    if(values.whichtriplet=1){    
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2)); 
        }
    
    } elseif (values.whichtriplet=2){    
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2)); 
        }
        
    } elseif (values.whichtriplet=3){    
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2)); 
        }
    
    } elseif (values.whichtriplet=4){
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2)); 
        }
    } 
   
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
  return (
  (trial.itemtimetarget.responsetext == parameters.yesKey) ||
  (trial.itemtimetarget.responsetext == parameters.noKey));
]
/ ontrialend = [
    list.anytriplet.reset()
    list.luretypes.reset()
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [
1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;

17 = encodingfixation; 18 = encodingimage; 19 = encodingimage; 20 = encodingimage;
21 = encodingfixation; 22 = encodingimage; 23 = encodingimage; 24 = encodingimage;
25 = encodingfixation; 26 = encodingimage; 27 = encodingimage; 28 = encodingimage;
29 = encodingfixation; 30 = encodingimage; 31 = encodingimage; 32 = encodingimage;
]
</block>

<block retrievalphase>
/ ontrialbegin = [
  values.responseCategory = "";
]
/ trials = [1-2=itemtimetarget,itemtimelure]

/ ontrialend = [
  if (block.retrievaltrialtarget.responsetext == parameters.noKey){
   values.responseCategory = "no";
  } else if (block.retrievaltrialtarget.responsetext == parameters.yesKey){
   values.responseCategory = "yes";
  }
]
</block>



**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1 = pairings; 2 = encodingphase; 3 = retrievalphase]
</expt>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
aarthiravi - 2/20/2022
Hi!

So in my study, I am grouping stimuli into sets of three called triplets. One of the conditions is to present the images one by one in a certain order in the study phase. In the test phase, there are two types of trials. Target trials and Lure trials. In target trials, the images are presented in the original order as in the study phase. In lure trials, two of the images would have switched their order position.  Here is my code for each of the trials types - encoding, retrieval target, and retrieval lure.

I am finding difficulty in randomly selecting one triplet from the encoding phase every time a new retrieval trial is presented. The same triplet is being presented for all retrieval trials. Please let me know where I'm going wrong with the coding.

**************************************************************************************************************
**************************************************************************************************************
PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
/ probeduration = 2000
/ probeduritemtime = 3000
/ responsewindow = 60000
/ yesKey = "E"
/ noKey = "I"
</parameters>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item allstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"

/13="13.jpg"
/14="14.jpg"
/15="15.jpg"
/16="16.jpg"
/17="17.jpg"
/18="18.jpg"
/19="19.jpg"
/20="20.jpg"
</item>

// i13 to 20 are the new stims, will not be used in the triplets presented
<list newstims>
/ items = (13,14,15,16,17,18,19,20)
/ selectionrate = always
</list>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.allstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

<picture orderpic1>
/ items = item.allstims
/ select = values.orderpic1
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<picture orderpic2>
/ items = item.allstims
/ select = values.orderpic2
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<picture orderpic3>
/ items = item.allstims
/ select = values.orderpic3
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<text yes>
/ items = ("YES")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (10%, 3%)
/ txcolor = black
</text>

<text no>
/ items = ("NO")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (10%, 3%)
/ txcolor = black
</text>

// Probe Questions //
<text itemtimequestion>
/ items = ("Same order?")
/ position = (50%, 40%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (30%, 15%)
/ txcolor = black
</text>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ tripletimage = 1
/ orderpic1 = 1
/ orderpic2 = 1
/ orderpic3 = 1
/ pic1x = 0%
/ pic2x = 0%
/ pic3x = 0%
/ pic1y = 0%
/ pic2y = 0%
/ pic3y = 0%
/ whichtriplet = 0
/ whichluretype = 0
/ responseCategory = ""
</values>


**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

// list of locations for the encoding trials

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>


// list of locations for the test/probe trials for order condition

<list orderxpos>
/ items = (50%, 50%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list orderypos>
/ items = (50%, 50%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ selectionmode = sequence
/ selectionrate = always
</list>


<list tripletxpos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletypos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list anytriplet>
/ items = (1,2,3,4)
/ replace = true
/ selectionrate = always
</list>

<list luretypes>
/ items = (1,2,3)
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, stimulusitem, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, parameters.probeduration, parameters.probeduritemtime, expressions.canvasRatio, values.responseCategory, correct, latency,
values.whichtriplet,values.pic1, values.pic2, values.pic3,values.orderpic1, values.orderpic2, values.orderpic3, values.pic1x, values.pic1y, values.pic2x, values.pic2y, values.pic3x, values.pic3y,
)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
</expressions>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [
//list.imagenumbers.reset();
list.tripletnumbers.reset();
list.tripletxpos.reset();
list.tripletypos.reset();
var i = 0;
while (i < 12){
 i += 1;
 list.tripletnumbers.appenditem(list.imagenumbers.nextvalue);
 list.tripletxpos.appenditem(list.xpos.nextvalue);
 list.tripletypos.appenditem(list.ypos.nextvalue);
};
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
values.tripletimage = list.tripletnumbers.nextvalue;
picture.tripletimage.hposition = list.tripletxpos.nextvalue;
picture.tripletimage.vposition = list.tripletypos.nextvalue;
]
/ stimulustimes = [0=picture.tripletimage]
/ timeout = parameters.stimulusduration
</trial>

// 1st triplet starts at 1
// 2nd triplet starts at 4
// 3rd triplet starts at 7
// 4th triplet starts at 10

<list tripletstart>
/ items = (1,4,7,10)
/ selectionrate = always
</list>

<list itemwithintriplet>
/ items = (0,1,2)
/ selectionrate = always
/ replace = true
</list>


// Item-Time Condition /////////////////////////////////////////////////////////////////////////////////////////////////////////


**Target trial**

<trial itemtimetarget>
/ ontrialbegin = [values.whichtriplet=list.anytriplet.currentvalue;]
/ ontrialbegin = [
    list.tripletstart.reset()
    values.pic1x = picture.orderpic1.hposition;
  values.pic2x = picture.orderpic2.hposition;
  values.pic3x = picture.orderpic3.hposition;
    values.pic1y = picture.orderpic1.vposition;
  values.pic2y = picture.orderpic2.vposition;
  values.pic3y = picture.orderpic3.vposition;
    
    // randomly select one of the presented triplets, select first item within that triplet, assign to orderpics
    
    if(values.whichtriplet=1){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3));
    
    } elseif (values.whichtriplet=2){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3));
    
    } elseif (values.whichtriplet=3){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3));
    
    } elseif (values.whichtriplet=4){
    values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1));
  values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2));
  values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3));
  block.encodingphase
    } 
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
  return (
  (trial.itemtimetarget.responsetext == parameters.yesKey) ||
  (trial.itemtimetarget.responsetext == parameters.noKey));
]
</trial>


**Lure trial**

<trial itemtimelure>
/ ontrialbegin = [values.whichluretype=list.luretypes.currentvalue;]
/ ontrialbegin = [values.whichtriplet=list.anytriplet.currentvalue;]
/ ontrialbegin = [
    list.tripletstart.reset()
    values.pic1x = picture.orderpic1.hposition;
  values.pic2x = picture.orderpic2.hposition;
  values.pic3x = picture.orderpic3.hposition;
    values.pic1y = picture.orderpic1.vposition;
  values.pic2y = picture.orderpic2.vposition;
  values.pic3y = picture.orderpic3.vposition;
    
    //select a random triplet, select a random lure type (mixed order positions for two out of three images),
    //assign to the orderpics
    
    if(values.whichtriplet=1){    
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(1) + list.itemwithintriplet.item(2)); 
        }
    
    } elseif (values.whichtriplet=2){    
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(2) + list.itemwithintriplet.item(2)); 
        }
        
    } elseif (values.whichtriplet=3){    
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(3) + list.itemwithintriplet.item(2)); 
        }
    
    } elseif (values.whichtriplet=4){
        if (values.whichluretype=1){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3)); 
        }elseif (values.whichluretype=2){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1)); 
        }elseif(values.whichluretype=3){
          values.orderpic1 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(1));
            values.orderpic2 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(3));
            values.orderpic3 = list.tripletnumbers.item(list.tripletstart.item(4) + list.itemwithintriplet.item(2)); 
        }
    } 
   
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
  return (
  (trial.itemtimetarget.responsetext == parameters.yesKey) ||
  (trial.itemtimetarget.responsetext == parameters.noKey));
]
/ ontrialend = [
    list.anytriplet.reset()
    list.luretypes.reset()
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [
1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;

17 = encodingfixation; 18 = encodingimage; 19 = encodingimage; 20 = encodingimage;
21 = encodingfixation; 22 = encodingimage; 23 = encodingimage; 24 = encodingimage;
25 = encodingfixation; 26 = encodingimage; 27 = encodingimage; 28 = encodingimage;
29 = encodingfixation; 30 = encodingimage; 31 = encodingimage; 32 = encodingimage;
]
</block>

<block retrievalphase>
/ ontrialbegin = [
  values.responseCategory = "";
]
/ trials = [1-2=itemtimetarget,itemtimelure]

/ ontrialend = [
  if (block.retrievaltrialtarget.responsetext == parameters.noKey){
   values.responseCategory = "no";
  } else if (block.retrievaltrialtarget.responsetext == parameters.yesKey){
   values.responseCategory = "yes";
  }
]
</block>



**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1 = pairings; 2 = encodingphase; 3 = retrievalphase]
</expt>

// 1st triplet starts at 1
// 2nd triplet starts at 4
// 3rd triplet starts at 7
// 4th triplet starts at 10
<list tripletstart>
/ items = (1,4,7,10)
/ selectionrate = always
</list>

To randomly select a triplet, sample a value from the above list. That gives you the start index of either the 1st, 2nd, 3rd or 4th triplet. The other items in the selected triplet, by way of simple math, are at the selected start index +1 and +2.
aarthiravi
aarthiravi
Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)
Group: Forum Members
Posts: 15, Visits: 133
Okay, so I did something like this. But the value of "values.whichtriplet" is still not changing for every trial. The same triplet is being shown for all trials whereas it should change.

<values>
/ whichtriplet = 1
</values>

**Target trial**

<trial itemtimetarget>
/ ontrialbegin = [
  list.tripletstart.reset()
    values.whichtriplet=list.tripletstart.nextvalue;
  values.pic1x = picture.orderpic1.hposition;
    values.pic2x = picture.orderpic2.hposition;
    values.pic3x = picture.orderpic3.hposition;
  values.pic1y = picture.orderpic1.vposition;
    values.pic2y = picture.orderpic2.vposition;
    values.pic3y = picture.orderpic3.vposition;
 
  // randomly select one of the presented triplets, select first item within that triplet, assign to orderpics
 
  values.orderpic1 = getitem(list.tripletnumbers, values.whichtriplet);
    values.orderpic2 = getitem(list.tripletnumbers, values.whichtriplet+1);
    values.orderpic3 = getitem(list.tripletnumbers, values.whichtriplet+2);
 
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
return (
(trial.itemtimetarget.responsetext == parameters.yesKey) ||
(trial.itemtimetarget.responsetext == parameters.noKey));
]
</trial>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
aarthiravi - 2/21/2022
Okay, so I did something like this. But the value of "values.whichtriplet" is still not changing for every trial. The same triplet is being shown for all trials whereas it should change.

<values>
/ whichtriplet = 1
</values>

**Target trial**

<trial itemtimetarget>
/ ontrialbegin = [
  list.tripletstart.reset()
    values.whichtriplet=list.tripletstart.nextvalue;
  values.pic1x = picture.orderpic1.hposition;
    values.pic2x = picture.orderpic2.hposition;
    values.pic3x = picture.orderpic3.hposition;
  values.pic1y = picture.orderpic1.vposition;
    values.pic2y = picture.orderpic2.vposition;
    values.pic3y = picture.orderpic3.vposition;
 
  // randomly select one of the presented triplets, select first item within that triplet, assign to orderpics
 
  values.orderpic1 = getitem(list.tripletnumbers, values.whichtriplet);
    values.orderpic2 = getitem(list.tripletnumbers, values.whichtriplet+1);
    values.orderpic3 = getitem(list.tripletnumbers, values.whichtriplet+2);
 
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
return (
(trial.itemtimetarget.responsetext == parameters.yesKey) ||
(trial.itemtimetarget.responsetext == parameters.noKey));
]
</trial>

I cannot tell you where your mistake is based on an isolated code snippet, which does not includ most of the relevant aspects.

aarthiravi
aarthiravi
Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)Associate Member (240 reputation)
Group: Forum Members
Posts: 15, Visits: 133
Dave - 2/21/2022
aarthiravi - 2/21/2022
Okay, so I did something like this. But the value of "values.whichtriplet" is still not changing for every trial. The same triplet is being shown for all trials whereas it should change.

<values>
/ whichtriplet = 1
</values>

**Target trial**

<trial itemtimetarget>
/ ontrialbegin = [
  list.tripletstart.reset()
    values.whichtriplet=list.tripletstart.nextvalue;
  values.pic1x = picture.orderpic1.hposition;
    values.pic2x = picture.orderpic2.hposition;
    values.pic3x = picture.orderpic3.hposition;
  values.pic1y = picture.orderpic1.vposition;
    values.pic2y = picture.orderpic2.vposition;
    values.pic3y = picture.orderpic3.vposition;
 
  // randomly select one of the presented triplets, select first item within that triplet, assign to orderpics
 
  values.orderpic1 = getitem(list.tripletnumbers, values.whichtriplet);
    values.orderpic2 = getitem(list.tripletnumbers, values.whichtriplet+1);
    values.orderpic3 = getitem(list.tripletnumbers, values.whichtriplet+2);
 
]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
return (
(trial.itemtimetarget.responsetext == parameters.yesKey) ||
(trial.itemtimetarget.responsetext == parameters.noKey));
]
</trial>

I cannot tell you where your mistake is based on an isolated code snippet, which does not includ most of the relevant aspects.

Oh sorry! It's pretty much the same code as in the previous post. I'll post the full code here once again for this particular condition. The new additions are in red color.
**************************************************************************************************************
**************************************************************************************************************
PARAMETERS
**************************************************************************************************************
**************************************************************************************************************
<parameters>
/ stimsize = 17%
/ stimulusduration = 1000
/ probeduration = 2000
/ probeduritemtime = 3000
/ responsewindow = 60000
/ yesKey = "E"
/ noKey = "I"
</parameters>

**************************************************************************************************************
**************************************************************************************************************
STIMULI
**************************************************************************************************************
**************************************************************************************************************

<item allstims>
/1="1.jpg"
/2="2.jpg"
/3="3.jpg"
/4="4.jpg"
/5="5.jpg"
/6="6.jpg"
/7="7.jpg"
/8="8.jpg"
/9="9.jpg"
/10="10.jpg"
/11="11.jpg"
/12="12.jpg"

/13="13.jpg"
/14="14.jpg"
/15="15.jpg"
/16="16.jpg"
/17="17.jpg"
/18="18.jpg"
/19="19.jpg"
/20="20.jpg"
</item>

// 13 to 20 are the new stims, will not be used in the triplets presented
<list newstims>
/ items = (13,14,15,16,17,18,19,20)
/ selectionrate = always
</list>

<item fixationcross>
/1="fixation.png"
</item>

<picture fixation>
/ items = item.fixationcross
/ position = (50%, 50%)
/ size = (40%,40%)
/ valign = center
/ halign = center
</picture>

<picture tripletimage>
/ items = item.allstims
/ select = values.tripletimage
/ size = (parameters.stimsize, parameters.stimsize)
</picture>

<picture orderpic1>
/ items = item.allstims
/ select = values.orderpic1
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<picture orderpic2>
/ items = item.allstims
/ select = values.orderpic2
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<picture orderpic3>
/ items = item.allstims
/ select = values.orderpic3
/ size = (parameters.stimsize, parameters.stimsize)
/ hposition = 50%
/ vposition = 50%
</picture>

<text yes>
/ items = ("YES")
/ position = (15%, 85%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (10%, 3%)
/ txcolor = black
</text>

<text no>
/ items = ("NO")
/ position = (85%, 85%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (10%, 3%)
/ txcolor = black
</text>

// Probe Questions //
<text itemtimequestion>
/ items = ("Same order?")
/ position = (50%, 40%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ size = (30%, 15%)
/ txcolor = black
</text>

**************************************************************************************************************
**************************************************************************************************************
VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************
<values>
/ tripletimage = 1
/ orderpic1 = 1
/ orderpic2 = 1
/ orderpic3 = 1
/ pic1x = 0%
/ pic2x = 0%
/ pic3x = 0%
/ pic1y = 0%
/ pic2y = 0%
/ pic3y = 0%
/ whichtriplet = 1
/ whichluretype = 1
/ responseCategory = ""
</values>


**************************************************************************************************************
**************************************************************************************************************
LISTS
**************************************************************************************************************
**************************************************************************************************************
<defaults>
/ canvasaspectratio = (1,1)
/ minimumversion = "6.5.1.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txbgcolor = white
/ txcolor = black
/ screencolor = white
</defaults>

// list of locations for the encoding trials

<list xpos>
/ items = (25%, 75%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list ypos>
/ items = (25%, 25%, 75%)
/ selectionmode = list.xpos.currentindex
/ selectionrate = always
</list>


// list of locations for the test/probe trials for order condition

<list orderxpos>
/ items = (50%, 50%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list orderypos>
/ items = (50%, 50%, 50%)
/ replace = false
/ selectionrate = always
</list>

<list imagenumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
/ selectionrate = always
</list>

<list tripletnumbers>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletxpos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list tripletypos>
/ selectionmode = sequence
/ selectionrate = always
</list>

<list luretypes>
/ items = (1,2,3)
/ selectionrate = always
</list>

**************************************************************************************************************
**************************************************************************************************************
DATA
**************************************************************************************************************
**************************************************************************************************************
***********************
raw data file
***********************
<data>
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum, stimulusnumber, stimulusitem, stimulusitem, stimulusitem, picture.tripletimage.hposition, picture.tripletimage.vposition,
parameters.stimulusduration, parameters.probeduration, parameters.probeduritemtime, expressions.canvasRatio, values.responseCategory, correct, latency,
values.whichtriplet,values.pic1, values.pic2, values.pic3,values.orderpic1, values.orderpic2, values.orderpic3, values.pic1x, values.pic1y, values.pic2x, values.pic2y, values.pic3x, values.pic3y,
)
</data>

<expressions>
/canvasRatio = (display.canvasheight/display.height)*100
</expressions>

**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************
<trial pairings>
/ ontrialbegin = [
//list.imagenumbers.reset();
list.tripletnumbers.reset();
list.tripletxpos.reset();
list.tripletypos.reset();
var i = 0;
while (i < 12){
i += 1;
list.tripletnumbers.appenditem(list.imagenumbers.nextvalue);
list.tripletxpos.appenditem(list.xpos.nextvalue);
list.tripletypos.appenditem(list.ypos.nextvalue);
};
]
/ recorddata = false
/ trialduration = 0
</trial>

<trial encodingfixation>
/ stimulustimes = [0=fixation]
/ timeout = parameters.stimulusduration
</trial>

<trial encodingimage>
/ ontrialbegin = [
values.tripletimage = list.tripletnumbers.nextvalue;
picture.tripletimage.hposition = list.tripletxpos.nextvalue;
picture.tripletimage.vposition = list.tripletypos.nextvalue;
]
/ stimulustimes = [0=picture.tripletimage]
/ timeout = parameters.stimulusduration
</trial>

// 1st triplet starts at 1
// 2nd triplet starts at 4
// 3rd triplet starts at 7
// 4th triplet starts at 10

<list tripletstart>
/ items = (1,4,7,10)
/ selectionrate = always
</list>

<list itemwithintriplet>
/ items = (0,1,2)
/ selectionrate = always
/ replace = true
</list>


// Item-Time Condition /////////////////////////////////////////////////////////////////////////////////////////////////////////


**Target trial**

<trial itemtimetarget>
/ ontrialbegin = [
list.tripletstart.reset()
  // randomly select one of the presented triplets
  values.whichtriplet=list.tripletstart.nextvalue;


  values.pic1x = picture.orderpic1.hposition;
  values.pic2x = picture.orderpic2.hposition;
  values.pic3x = picture.orderpic3.hposition;
  values.pic1y = picture.orderpic1.vposition;
  values.pic2y = picture.orderpic2.vposition;
  values.pic3y = picture.orderpic3.vposition;

// Select items within that triplet, assign to orderpics

  values.orderpic1 = getitem(list.tripletnumbers, values.whichtriplet);
  values.orderpic2 = getitem(list.tripletnumbers, values.whichtriplet+1);
  values.orderpic3 = getitem(list.tripletnumbers, values.whichtriplet+2);


]
/ stimulustimes = [0 = orderpic1; 1000 = clearscreen, orderpic2; 2000 = clearscreen, orderpic3; 3000 = clearscreen, itemtimequestion, yes, no]
/ beginresponsetime = parameters.probeduritemtime
/ response = timeout(parameters.responsewindow)
/ validresponse = (parameters.yesKey, parameters.nokey)
/ iscorrectresponse = [
return (
(trial.itemtimetarget.responsetext == parameters.yesKey) ||
(trial.itemtimetarget.responsetext == parameters.noKey));
]
</trial>

**************************************************************************************************************
**************************************************************************************************************
BLOCKS
**************************************************************************************************************
**************************************************************************************************************
<block pairings>
/ trials = [1 = pairings]
</block>

<block encodingphase>
/ trials = [
1 = encodingfixation; 2 = encodingimage; 3 = encodingimage; 4 = encodingimage;
5 = encodingfixation; 6 = encodingimage; 7 = encodingimage; 8 = encodingimage;
9 = encodingfixation; 10 = encodingimage; 11 = encodingimage; 12 = encodingimage;
13 = encodingfixation; 14 = encodingimage; 15 = encodingimage; 16 = encodingimage;

17 = encodingfixation; 18 = encodingimage; 19 = encodingimage; 20 = encodingimage;
21 = encodingfixation; 22 = encodingimage; 23 = encodingimage; 24 = encodingimage;
25 = encodingfixation; 26 = encodingimage; 27 = encodingimage; 28 = encodingimage;
29 = encodingfixation; 30 = encodingimage; 31 = encodingimage; 32 = encodingimage;
]
</block>

<block retrievalphase>
/ ontrialbegin = [
values.responseCategory = "";
]
/ trials = [1-2=itemtimetarget]

/ ontrialend = [
if (block.retrievaltrialtarget.responsetext == parameters.noKey){
 values.responseCategory = "no";
} else if (block.retrievaltrialtarget.responsetext == parameters.yesKey){
 values.responseCategory = "yes";
}
]
</block>



**************************************************************************************************************
**************************************************************************************************************
EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************

<expt>
/ blocks = [1 = pairings; 2 = encodingphase; 3 = retrievalphase]
</expt>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search