How to keep track of stimuli used in block1, so that they aren't used in block2?


How to keep track of stimuli used in block1, so that they aren't used...
Author
Message
James Rounds
James Rounds
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 20, Visits: 80
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James
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: 82K
James Rounds - 3/17/2022
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James

See e.g. https://forums.millisecond.com/FindPost17070.aspx or https://forums.millisecond.com/FindPost21829.aspx

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: 82K
Dave - 3/17/2022
James Rounds - 3/17/2022
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James

See e.g. https://forums.millisecond.com/FindPost17070.aspx or https://forums.millisecond.com/FindPost21829.aspx

In a nutshell:

<expt>
/ onexptbegin = [
    // take random 5 item numbers from list.itemnumbers and assign them as "old," i.e. to be learned items
    var i = 0;
    while (i < 5) {
        list.oldlist.appenditem(list.itemnumbers.nextindex);
        i += 1;
    };
    // take random 5 item numbers from list.itemnumbers and assign them as "new," i.e. not to be learned items
    i = 0;
    while (i < 5) {
        list.newlist.appenditem(list.itemnumbers.nextindex);
        i += 1;
    };
]
/ blocks = [1=learningblock; 2=recognitionblock]
</expt>

// 20 items in this example
<list itemnumbers>
/ poolsize = 20
/ selectionrate = always
</list>

<list oldlist>
</list>

<list newlist>
</list>

<values>
/ currentitemnumber = 0
</values>

<block learningblock>
/ trials = [1-5 = learningtrial]
</block>

<block recognitionblock>
/ trials = [1-10 = noreplace(oldtrial, newtrial)]
</block>

<trial learningtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.oldlist.nextvalue;
]
/ stimulusframes = [1=clearscreen, stimulus]
/ validresponse = (57)
</trial>

<trial oldtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.oldlist.nextvalue;
]
/ stimulusframes = [1=clearscreen, stimulus, q]
/ validresponse = ("y", "n")
/ correctresponse = ("y")
</trial>

<trial newtrial>
/ ontrialbegin = [
    values.currentitemnumber = list.newlist.nextvalue;
]
/ stimulusframes = [1=clearscreen, stimulus, q]
/ validresponse = ("y", "n")
/ correctresponse = ("n")
</trial>

<text stimulus>
/ items = stimulusitems
/ select = values.currentitemnumber
</text>

<text q>
/ items = ("Seen previously?")
/ position = (50%, 20%)
</text>

<item stimulusitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
/ 5 = "E"
/ 6 = "F"
/ 7 = "G"
/ 8 = "H"
/ 9 = "I"
/ 10 = "J"
/ 11 = "K"
/ 12 = "L"
/ 13 = "M"
/ 14 = "N"
/ 15 = "O"
/ 16 = "P"
/ 17 = "Q"
/ 18 = "R"
/ 19 = "S"
/ 20 = "T"
</item>

James Rounds
James Rounds
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 20, Visits: 80
James Rounds - 3/17/2022
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James

Here is a simplified version of the code I'm working with. One idea I thought of was to try to have an overall list of all 640 images I plan to use, and then use the "removeitem" function when an item is selected, but I intended to have several lists (different trial types would pull from different lists), so I don't yet know how to execute that.

======================
SAMPLE CODE:
("frownmen1a" is the categorization block, and "identity_recall_block" is the recall block)
=======================

<defaults>
/ font = ("Arial", -32, 700, 0, 34)
/ screencolor = (128,128,128)
/ txcolor = (0, 0, 0)
/ pretrialpause = 250
/ posttrialpause = 250
</defaults>

<data>
/ columns = [date time build subject blocknum blockcode trialnum trialcode response correct latency stimulusitem stimulusitem stimulusitem stimulusitem stimulusitem stimulusonset stimulusonset stimulusonset stimulusonset stimulusonset]
/ labels = true
</data>

* The while loop below is just following https://forums.millisecond.com/Topic33620.aspx#33624
* Basically, while the blockcount is not yet 2, (so still in the first task/block),
* I want the list "task1_used_stimuli" to collect the names of all the stimuli used.

<expt main_expt1>
/ onexptbegin = [
  var i = 2;
  while (expt.main_expt1.currentblocknumber < i) {
   list.task1_used_stimuli.appenditem(picture.FM.currentitem);
    };
            
        for (1 expt.main_expt1.blockscount)    
 
]
/ blocks = [1-2=sequence( frownmen1a, identity_recall_block)]
/ subjects = (1 of 1)
</expt>

*** This list keeps track of which trials were presented in the gender categorization task, using the above "while" loop.

<list task1_used_stimuli>
</list>


------------------------------------------------------------------------------------
*** Trials & Blocks MALE FROWN***
------------------------------------------------------------------------------------



<trial standardmale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, SM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SM.currentvalue)]
</trial>


<trial targetfemale1a>
/ validresponse = (" ")

/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SW]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SW.currentvalue)]

</trial>


<trial distractormale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, FM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [FM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.FM.currentvalue)]
</trial>


<block frownmen1a>
/ preinstructions = (frownmeninstruct1, meninstruct2)
/ trials = [ 1-8=noreplace(standardmale1a, standardmale1a, standardmale1a,
standardmale1a, targetfemale1a, distractormale1a,
targetfemale1a, distractormale1a)]
</block>

------------------------------------------------------------------------------------
*** FACE IDENTITY RECALL TASK ***
------------------------------------------------------------------------------------



<block identity_recall_block>
/ preinstructions = (recall_pre_instruction1, recall_pre_instruction2)
/ trials = [1-8=noreplace(id_recall_FM, id_recall_SM, id_recall_SW,
                            id_recall_FW, id_recall_new_FW, id_recall_new_SW, id_recall_new_FM, id_recall_new_SM)]
/
</block>

* So, how to make sure that this trial selects an image from
the picture element "SM" (which itself uses a selectmode of "noreplace"), so that
for half the trials, it checks to make sure the chosen item is not contained in the list?

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</trial>

<trial id_recall_target_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000

</trial>

<trial id_recall_new_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

------------------------------------------------------------------------------------
*** Frown Male Pictures *** Including
------------------------------------------------------------------------------------


<picture FM>
/ items = FM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FM_pics_list>
/ items = ("CFD-BM-001-022-A.jpg", "CFD-BM-002-016-A.jpg", "CFD-BM-003-030-A.jpg", "CFD-BM-005-010-A.jpg")
</list>
/ items = (FM_pics);

<item FM_pics>
/ 1="CFD-BM-001-022-A.jpg"
/ 2="CFD-BM-002-016-A.jpg"
/ 3="CFD-BM-003-030-A.jpg"
/ 4="CFD-BM-005-010-A.jpg"
</item>



------------------------------------------------------------------------------------
*** Smile Male Pictures ***
------------------------------------------------------------------------------------

<picture SM>
/ items = SM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SM_pics_list>
/ items = ("CFD-BM-002-011-HC.jpg","CFD-BM-009-006-HC.jpg","CFD-BM-011-019-HC.jpg","CFD-BM-013-014-HC.jpg")
</list>

<item SM_pics>
/ 1="CFD-BM-002-011-HC.jpg"
/ 2="CFD-BM-009-006-HC.jpg"
/ 3="CFD-BM-011-019-HC.jpg"
/ 4="CFD-BM-013-014-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** Frown Female Pictures ***
------------------------------------------------------------------------------------

<picture FW>
/ items = FW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FW_pics_list>
/ items = ("CFD-BF-001-026-A.jpg", "CFD-BF-002-018-A.jpg", "CFD-BF-003-016-A.jpg","CFD-BF-004-021-A.jpg")
</list>
/ items = (FW_pics);
<item FW_pics>
/ 1="CFD-BF-001-026-A.jpg"
/ 2="CFD-BF-002-018-A.jpg"
/ 3="CFD-BF-003-016-A.jpg"
/ 4="CFD-BF-004-021-A.jpg"
</item>

------------------------------------------------------------------------------------
*** Smile Female Pictures ***
------------------------------------------------------------------------------------

<picture SW>
/ items = SW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SW_pics_list>
/ items = ("CFD-BF-001-021-HC.jpg", "CFD-BF-002-006-HC.jpg","CFD-BF-003-007-HC.jpg","CFD-BF-004-008-HC.jpg")
</list>
/ items = (SW_pics);
<item SW_pics>
/ 1="CFD-BF-001-021-HC.jpg"
/ 2="CFD-BF-002-006-HC.jpg"
/ 3="CFD-BF-003-007-HC.jpg"
/ 4="CFD-BF-004-008-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** INSTRUCTION PAGES -- ALL *****
------------------------------------------------------------------------------------

<instruct>
/ inputdevice = mouse
/ nextlabel = "Click the left mouse button to continue"
/ prevlabel = "Click the right mouse button to go back one screen"
/ fontstyle = ("Gill Sans MT", 1.83%, false, false, false, false, 5, 0)
/ txcolor = (0, 0, 0)
</instruct>


------------------------------------------------------------------------------------
*** Recall Task Instructions ***
------------------------------------------------------------------------------------

<page recall_pre_instruction1>
You are about to perform a simple memory task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will appear in the center of the screen.
^^ As soon as it appears, please indicate if this is a face you've seen earlier in this study.
^^ Press the "A" key if you have seen it before.
^^ Press the "L" key if you have not seen it before.
^^The face will stay on the screen for a few seconds, and then will disappear on its own.
^^After the next instruction page, the task will begin.
</page>

<page recall_pre_instruction2>
REMEMBER,
^^
^^IF YOU REMEMBER SEEING THE FACE, PRESS THE "A" KEY;
^^OTHERWISE, IF YOU DO not REMEMBER SEEING THE FACE, PRESS THE "L" KEY.
^^ Some faces will be ones you have seen, and others will be new faces.
^^After this page, the task will begin.
</page>

<page recall_pre_instruction3>
After you decide whether you have seen the face or not, please rate your confidence in your decision.
^^ Please use a scale from 0 to 10, with 0 being very NOT confident (or no confidence), and 10 being very confident.
^^After this page, the task will begin.
</page>


<page frownwomeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>


<page frownmeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page frownmeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page meninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS FEMALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>

<page frownmeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>


<page frownwomeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page frownwomeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page womeninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS MALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>


------------------------------------------------------------------------------------
*** Fixation Point & Response Indicator***
------------------------------------------------------------------------------------

<text fixation>
/ numitems = 1
/ items = (" + ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<text respondcue>
/ numitems = 1
/ items = (" ? ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<picture blank>
/ numitems = 1
/ items = ("blank.bmp")
/ size = (500, 500)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>












James Rounds
James Rounds
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 20, Visits: 80
James Rounds - 3/18/2022
James Rounds - 3/17/2022
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James

Here is a simplified version of the code I'm working with. One idea I thought of was to try to have an overall list of all 640 images I plan to use, and then use the "removeitem" function when an item is selected, but I intended to have several lists (different trial types would pull from different lists), so I don't yet know how to execute that.

======================
SAMPLE CODE:
("frownmen1a" is the categorization block, and "identity_recall_block" is the recall block)
=======================

<defaults>
/ font = ("Arial", -32, 700, 0, 34)
/ screencolor = (128,128,128)
/ txcolor = (0, 0, 0)
/ pretrialpause = 250
/ posttrialpause = 250
</defaults>

<data>
/ columns = [date time build subject blocknum blockcode trialnum trialcode response correct latency stimulusitem stimulusitem stimulusitem stimulusitem stimulusitem stimulusonset stimulusonset stimulusonset stimulusonset stimulusonset]
/ labels = true
</data>

* The while loop below is just following https://forums.millisecond.com/Topic33620.aspx#33624
* Basically, while the blockcount is not yet 2, (so still in the first task/block),
* I want the list "task1_used_stimuli" to collect the names of all the stimuli used.

<expt main_expt1>
/ onexptbegin = [
  var i = 2;
  while (expt.main_expt1.currentblocknumber < i) {
   list.task1_used_stimuli.appenditem(picture.FM.currentitem);
    };
            
        for (1 expt.main_expt1.blockscount)    
 
]
/ blocks = [1-2=sequence( frownmen1a, identity_recall_block)]
/ subjects = (1 of 1)
</expt>

*** This list keeps track of which trials were presented in the gender categorization task, using the above "while" loop.

<list task1_used_stimuli>
</list>


------------------------------------------------------------------------------------
*** Trials & Blocks MALE FROWN***
------------------------------------------------------------------------------------



<trial standardmale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, SM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SM.currentvalue)]
</trial>


<trial targetfemale1a>
/ validresponse = (" ")

/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SW]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SW.currentvalue)]

</trial>


<trial distractormale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, FM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [FM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.FM.currentvalue)]
</trial>


<block frownmen1a>
/ preinstructions = (frownmeninstruct1, meninstruct2)
/ trials = [ 1-8=noreplace(standardmale1a, standardmale1a, standardmale1a,
standardmale1a, targetfemale1a, distractormale1a,
targetfemale1a, distractormale1a)]
</block>

------------------------------------------------------------------------------------
*** FACE IDENTITY RECALL TASK ***
------------------------------------------------------------------------------------



<block identity_recall_block>
/ preinstructions = (recall_pre_instruction1, recall_pre_instruction2)
/ trials = [1-8=noreplace(id_recall_FM, id_recall_SM, id_recall_SW,
                            id_recall_FW, id_recall_new_FW, id_recall_new_SW, id_recall_new_FM, id_recall_new_SM)]
/
</block>

* So, how to make sure that this trial selects an image from
the picture element "SM" (which itself uses a selectmode of "noreplace"), so that
for half the trials, it checks to make sure the chosen item is not contained in the list?

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</trial>

<trial id_recall_target_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000

</trial>

<trial id_recall_new_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

------------------------------------------------------------------------------------
*** Frown Male Pictures *** Including
------------------------------------------------------------------------------------


<picture FM>
/ items = FM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FM_pics_list>
/ items = ("CFD-BM-001-022-A.jpg", "CFD-BM-002-016-A.jpg", "CFD-BM-003-030-A.jpg", "CFD-BM-005-010-A.jpg")
</list>
/ items = (FM_pics);

<item FM_pics>
/ 1="CFD-BM-001-022-A.jpg"
/ 2="CFD-BM-002-016-A.jpg"
/ 3="CFD-BM-003-030-A.jpg"
/ 4="CFD-BM-005-010-A.jpg"
</item>



------------------------------------------------------------------------------------
*** Smile Male Pictures ***
------------------------------------------------------------------------------------

<picture SM>
/ items = SM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SM_pics_list>
/ items = ("CFD-BM-002-011-HC.jpg","CFD-BM-009-006-HC.jpg","CFD-BM-011-019-HC.jpg","CFD-BM-013-014-HC.jpg")
</list>

<item SM_pics>
/ 1="CFD-BM-002-011-HC.jpg"
/ 2="CFD-BM-009-006-HC.jpg"
/ 3="CFD-BM-011-019-HC.jpg"
/ 4="CFD-BM-013-014-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** Frown Female Pictures ***
------------------------------------------------------------------------------------

<picture FW>
/ items = FW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FW_pics_list>
/ items = ("CFD-BF-001-026-A.jpg", "CFD-BF-002-018-A.jpg", "CFD-BF-003-016-A.jpg","CFD-BF-004-021-A.jpg")
</list>
/ items = (FW_pics);
<item FW_pics>
/ 1="CFD-BF-001-026-A.jpg"
/ 2="CFD-BF-002-018-A.jpg"
/ 3="CFD-BF-003-016-A.jpg"
/ 4="CFD-BF-004-021-A.jpg"
</item>

------------------------------------------------------------------------------------
*** Smile Female Pictures ***
------------------------------------------------------------------------------------

<picture SW>
/ items = SW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SW_pics_list>
/ items = ("CFD-BF-001-021-HC.jpg", "CFD-BF-002-006-HC.jpg","CFD-BF-003-007-HC.jpg","CFD-BF-004-008-HC.jpg")
</list>
/ items = (SW_pics);
<item SW_pics>
/ 1="CFD-BF-001-021-HC.jpg"
/ 2="CFD-BF-002-006-HC.jpg"
/ 3="CFD-BF-003-007-HC.jpg"
/ 4="CFD-BF-004-008-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** INSTRUCTION PAGES -- ALL *****
------------------------------------------------------------------------------------

<instruct>
/ inputdevice = mouse
/ nextlabel = "Click the left mouse button to continue"
/ prevlabel = "Click the right mouse button to go back one screen"
/ fontstyle = ("Gill Sans MT", 1.83%, false, false, false, false, 5, 0)
/ txcolor = (0, 0, 0)
</instruct>


------------------------------------------------------------------------------------
*** Recall Task Instructions ***
------------------------------------------------------------------------------------

<page recall_pre_instruction1>
You are about to perform a simple memory task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will appear in the center of the screen.
^^ As soon as it appears, please indicate if this is a face you've seen earlier in this study.
^^ Press the "A" key if you have seen it before.
^^ Press the "L" key if you have not seen it before.
^^The face will stay on the screen for a few seconds, and then will disappear on its own.
^^After the next instruction page, the task will begin.
</page>

<page recall_pre_instruction2>
REMEMBER,
^^
^^IF YOU REMEMBER SEEING THE FACE, PRESS THE "A" KEY;
^^OTHERWISE, IF YOU DO not REMEMBER SEEING THE FACE, PRESS THE "L" KEY.
^^ Some faces will be ones you have seen, and others will be new faces.
^^After this page, the task will begin.
</page>

<page recall_pre_instruction3>
After you decide whether you have seen the face or not, please rate your confidence in your decision.
^^ Please use a scale from 0 to 10, with 0 being very NOT confident (or no confidence), and 10 being very confident.
^^After this page, the task will begin.
</page>


<page frownwomeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>


<page frownmeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page frownmeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page meninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS FEMALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>

<page frownmeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>


<page frownwomeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page frownwomeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page womeninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS MALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>


------------------------------------------------------------------------------------
*** Fixation Point & Response Indicator***
------------------------------------------------------------------------------------

<text fixation>
/ numitems = 1
/ items = (" + ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<text respondcue>
/ numitems = 1
/ items = (" ? ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<picture blank>
/ numitems = 1
/ items = ("blank.bmp")
/ size = (500, 500)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>












ALSO, sorry, I accidentally left in some "branch" Inquisit sample code verbatim, so I know that will need to change. I think my code will need a solution like it, though (re-pasted below)...

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</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: 82K
James Rounds - 3/18/2022
James Rounds - 3/18/2022
James Rounds - 3/17/2022
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James

Here is a simplified version of the code I'm working with. One idea I thought of was to try to have an overall list of all 640 images I plan to use, and then use the "removeitem" function when an item is selected, but I intended to have several lists (different trial types would pull from different lists), so I don't yet know how to execute that.

======================
SAMPLE CODE:
("frownmen1a" is the categorization block, and "identity_recall_block" is the recall block)
=======================

<defaults>
/ font = ("Arial", -32, 700, 0, 34)
/ screencolor = (128,128,128)
/ txcolor = (0, 0, 0)
/ pretrialpause = 250
/ posttrialpause = 250
</defaults>

<data>
/ columns = [date time build subject blocknum blockcode trialnum trialcode response correct latency stimulusitem stimulusitem stimulusitem stimulusitem stimulusitem stimulusonset stimulusonset stimulusonset stimulusonset stimulusonset]
/ labels = true
</data>

* The while loop below is just following https://forums.millisecond.com/Topic33620.aspx#33624
* Basically, while the blockcount is not yet 2, (so still in the first task/block),
* I want the list "task1_used_stimuli" to collect the names of all the stimuli used.

<expt main_expt1>
/ onexptbegin = [
  var i = 2;
  while (expt.main_expt1.currentblocknumber < i) {
   list.task1_used_stimuli.appenditem(picture.FM.currentitem);
    };
            
        for (1 expt.main_expt1.blockscount)    
 
]
/ blocks = [1-2=sequence( frownmen1a, identity_recall_block)]
/ subjects = (1 of 1)
</expt>

*** This list keeps track of which trials were presented in the gender categorization task, using the above "while" loop.

<list task1_used_stimuli>
</list>


------------------------------------------------------------------------------------
*** Trials & Blocks MALE FROWN***
------------------------------------------------------------------------------------



<trial standardmale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, SM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SM.currentvalue)]
</trial>


<trial targetfemale1a>
/ validresponse = (" ")

/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SW]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SW.currentvalue)]

</trial>


<trial distractormale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, FM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [FM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.FM.currentvalue)]
</trial>


<block frownmen1a>
/ preinstructions = (frownmeninstruct1, meninstruct2)
/ trials = [ 1-8=noreplace(standardmale1a, standardmale1a, standardmale1a,
standardmale1a, targetfemale1a, distractormale1a,
targetfemale1a, distractormale1a)]
</block>

------------------------------------------------------------------------------------
*** FACE IDENTITY RECALL TASK ***
------------------------------------------------------------------------------------



<block identity_recall_block>
/ preinstructions = (recall_pre_instruction1, recall_pre_instruction2)
/ trials = [1-8=noreplace(id_recall_FM, id_recall_SM, id_recall_SW,
                            id_recall_FW, id_recall_new_FW, id_recall_new_SW, id_recall_new_FM, id_recall_new_SM)]
/
</block>

* So, how to make sure that this trial selects an image from
the picture element "SM" (which itself uses a selectmode of "noreplace"), so that
for half the trials, it checks to make sure the chosen item is not contained in the list?

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</trial>

<trial id_recall_target_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000

</trial>

<trial id_recall_new_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

------------------------------------------------------------------------------------
*** Frown Male Pictures *** Including
------------------------------------------------------------------------------------


<picture FM>
/ items = FM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FM_pics_list>
/ items = ("CFD-BM-001-022-A.jpg", "CFD-BM-002-016-A.jpg", "CFD-BM-003-030-A.jpg", "CFD-BM-005-010-A.jpg")
</list>
/ items = (FM_pics);

<item FM_pics>
/ 1="CFD-BM-001-022-A.jpg"
/ 2="CFD-BM-002-016-A.jpg"
/ 3="CFD-BM-003-030-A.jpg"
/ 4="CFD-BM-005-010-A.jpg"
</item>



------------------------------------------------------------------------------------
*** Smile Male Pictures ***
------------------------------------------------------------------------------------

<picture SM>
/ items = SM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SM_pics_list>
/ items = ("CFD-BM-002-011-HC.jpg","CFD-BM-009-006-HC.jpg","CFD-BM-011-019-HC.jpg","CFD-BM-013-014-HC.jpg")
</list>

<item SM_pics>
/ 1="CFD-BM-002-011-HC.jpg"
/ 2="CFD-BM-009-006-HC.jpg"
/ 3="CFD-BM-011-019-HC.jpg"
/ 4="CFD-BM-013-014-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** Frown Female Pictures ***
------------------------------------------------------------------------------------

<picture FW>
/ items = FW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FW_pics_list>
/ items = ("CFD-BF-001-026-A.jpg", "CFD-BF-002-018-A.jpg", "CFD-BF-003-016-A.jpg","CFD-BF-004-021-A.jpg")
</list>
/ items = (FW_pics);
<item FW_pics>
/ 1="CFD-BF-001-026-A.jpg"
/ 2="CFD-BF-002-018-A.jpg"
/ 3="CFD-BF-003-016-A.jpg"
/ 4="CFD-BF-004-021-A.jpg"
</item>

------------------------------------------------------------------------------------
*** Smile Female Pictures ***
------------------------------------------------------------------------------------

<picture SW>
/ items = SW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SW_pics_list>
/ items = ("CFD-BF-001-021-HC.jpg", "CFD-BF-002-006-HC.jpg","CFD-BF-003-007-HC.jpg","CFD-BF-004-008-HC.jpg")
</list>
/ items = (SW_pics);
<item SW_pics>
/ 1="CFD-BF-001-021-HC.jpg"
/ 2="CFD-BF-002-006-HC.jpg"
/ 3="CFD-BF-003-007-HC.jpg"
/ 4="CFD-BF-004-008-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** INSTRUCTION PAGES -- ALL *****
------------------------------------------------------------------------------------

<instruct>
/ inputdevice = mouse
/ nextlabel = "Click the left mouse button to continue"
/ prevlabel = "Click the right mouse button to go back one screen"
/ fontstyle = ("Gill Sans MT", 1.83%, false, false, false, false, 5, 0)
/ txcolor = (0, 0, 0)
</instruct>


------------------------------------------------------------------------------------
*** Recall Task Instructions ***
------------------------------------------------------------------------------------

<page recall_pre_instruction1>
You are about to perform a simple memory task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will appear in the center of the screen.
^^ As soon as it appears, please indicate if this is a face you've seen earlier in this study.
^^ Press the "A" key if you have seen it before.
^^ Press the "L" key if you have not seen it before.
^^The face will stay on the screen for a few seconds, and then will disappear on its own.
^^After the next instruction page, the task will begin.
</page>

<page recall_pre_instruction2>
REMEMBER,
^^
^^IF YOU REMEMBER SEEING THE FACE, PRESS THE "A" KEY;
^^OTHERWISE, IF YOU DO not REMEMBER SEEING THE FACE, PRESS THE "L" KEY.
^^ Some faces will be ones you have seen, and others will be new faces.
^^After this page, the task will begin.
</page>

<page recall_pre_instruction3>
After you decide whether you have seen the face or not, please rate your confidence in your decision.
^^ Please use a scale from 0 to 10, with 0 being very NOT confident (or no confidence), and 10 being very confident.
^^After this page, the task will begin.
</page>


<page frownwomeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>


<page frownmeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page frownmeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page meninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS FEMALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>

<page frownmeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>


<page frownwomeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page frownwomeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page womeninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS MALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>


------------------------------------------------------------------------------------
*** Fixation Point & Response Indicator***
------------------------------------------------------------------------------------

<text fixation>
/ numitems = 1
/ items = (" + ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<text respondcue>
/ numitems = 1
/ items = (" ? ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<picture blank>
/ numitems = 1
/ items = ("blank.bmp")
/ size = (500, 500)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>












ALSO, sorry, I accidentally left in some "branch" Inquisit sample code verbatim, so I know that will need to change. I think my code will need a solution like it, though (re-pasted below)...

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</trial>

And what's your question, given that I've already proposed a solution?
James Rounds
James Rounds
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 20, Visits: 80
Dave - 3/18/2022
James Rounds - 3/18/2022
James Rounds - 3/18/2022
James Rounds - 3/17/2022
Hello!

I have a fair bit of Inquisit experience, and have been scouring the forums but can't quite find an answer to this question, and haven't yet figured out how to do it myself.

The question is:
a) how do i keep track of all stimuli that were selected from a list - StimulusListA - to be presented in Task 1 (for simplicity let's say Task 1 is all in  a block called "categorization_task_block")
SO THAT
b) I can make sure those previously used stimuli are NOT selected from the SAME LIST on a subsequent task, block "recall_task_block".

Basically, I am asking participants in the categorization_task_block to simply categorize stimuli that are presented one at a time. We have working code for this, and I know I can store the names of the stimuli presented, which were pulled randomly from a large list.

THEN, in the recall_task_block, I want participants to do a recall test. Critically, half of the stimuli used for this recall_task_block will be stimuli they were presented during the categorization task, and half will be stimuli THEY HAVEN'T SEEN, but were also in StimulusListA.
I can't quite figure out how to make sure that the recall_task_block checks the list of previously presented stimuli from the categorization_task_block?

Thank you! I will post some example code in a moment.

James

Here is a simplified version of the code I'm working with. One idea I thought of was to try to have an overall list of all 640 images I plan to use, and then use the "removeitem" function when an item is selected, but I intended to have several lists (different trial types would pull from different lists), so I don't yet know how to execute that.

======================
SAMPLE CODE:
("frownmen1a" is the categorization block, and "identity_recall_block" is the recall block)
=======================

<defaults>
/ font = ("Arial", -32, 700, 0, 34)
/ screencolor = (128,128,128)
/ txcolor = (0, 0, 0)
/ pretrialpause = 250
/ posttrialpause = 250
</defaults>

<data>
/ columns = [date time build subject blocknum blockcode trialnum trialcode response correct latency stimulusitem stimulusitem stimulusitem stimulusitem stimulusitem stimulusonset stimulusonset stimulusonset stimulusonset stimulusonset]
/ labels = true
</data>

* The while loop below is just following https://forums.millisecond.com/Topic33620.aspx#33624
* Basically, while the blockcount is not yet 2, (so still in the first task/block),
* I want the list "task1_used_stimuli" to collect the names of all the stimuli used.

<expt main_expt1>
/ onexptbegin = [
  var i = 2;
  while (expt.main_expt1.currentblocknumber < i) {
   list.task1_used_stimuli.appenditem(picture.FM.currentitem);
    };
            
        for (1 expt.main_expt1.blockscount)    
 
]
/ blocks = [1-2=sequence( frownmen1a, identity_recall_block)]
/ subjects = (1 of 1)
</expt>

*** This list keeps track of which trials were presented in the gender categorization task, using the above "while" loop.

<list task1_used_stimuli>
</list>


------------------------------------------------------------------------------------
*** Trials & Blocks MALE FROWN***
------------------------------------------------------------------------------------



<trial standardmale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, SM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SM.currentvalue)]
</trial>


<trial targetfemale1a>
/ validresponse = (" ")

/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [SW]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.SW.currentvalue)]

</trial>


<trial distractormale1a>
/ validresponse = (" ")

/ correctresponse = (noresponse)
/ stimulustimes = [0 = fixation;
1000 = blank, FM;
1200 = blank, respondcue]
/ responsetime = 1000
/ timeout = 2200
/ trialdata = [FM]
/ ontrialend = [list.task1_used_stimuli.appenditem(picture.FM.currentvalue)]
</trial>


<block frownmen1a>
/ preinstructions = (frownmeninstruct1, meninstruct2)
/ trials = [ 1-8=noreplace(standardmale1a, standardmale1a, standardmale1a,
standardmale1a, targetfemale1a, distractormale1a,
targetfemale1a, distractormale1a)]
</block>

------------------------------------------------------------------------------------
*** FACE IDENTITY RECALL TASK ***
------------------------------------------------------------------------------------



<block identity_recall_block>
/ preinstructions = (recall_pre_instruction1, recall_pre_instruction2)
/ trials = [1-8=noreplace(id_recall_FM, id_recall_SM, id_recall_SW,
                            id_recall_FW, id_recall_new_FW, id_recall_new_SW, id_recall_new_FM, id_recall_new_SM)]
/
</block>

* So, how to make sure that this trial selects an image from
the picture element "SM" (which itself uses a selectmode of "noreplace"), so that
for half the trials, it checks to make sure the chosen item is not contained in the list?

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</trial>

<trial id_recall_target_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_target_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000

</trial>

<trial id_recall_new_SM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SM ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_FW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

<trial id_recall_new_SW>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, SW ;
3000 = blank, respondcue]
/ responsetime = 1000
/ timeout = 5000

</trial>

------------------------------------------------------------------------------------
*** Frown Male Pictures *** Including
------------------------------------------------------------------------------------


<picture FM>
/ items = FM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FM_pics_list>
/ items = ("CFD-BM-001-022-A.jpg", "CFD-BM-002-016-A.jpg", "CFD-BM-003-030-A.jpg", "CFD-BM-005-010-A.jpg")
</list>
/ items = (FM_pics);

<item FM_pics>
/ 1="CFD-BM-001-022-A.jpg"
/ 2="CFD-BM-002-016-A.jpg"
/ 3="CFD-BM-003-030-A.jpg"
/ 4="CFD-BM-005-010-A.jpg"
</item>



------------------------------------------------------------------------------------
*** Smile Male Pictures ***
------------------------------------------------------------------------------------

<picture SM>
/ items = SM_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SM_pics_list>
/ items = ("CFD-BM-002-011-HC.jpg","CFD-BM-009-006-HC.jpg","CFD-BM-011-019-HC.jpg","CFD-BM-013-014-HC.jpg")
</list>

<item SM_pics>
/ 1="CFD-BM-002-011-HC.jpg"
/ 2="CFD-BM-009-006-HC.jpg"
/ 3="CFD-BM-011-019-HC.jpg"
/ 4="CFD-BM-013-014-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** Frown Female Pictures ***
------------------------------------------------------------------------------------

<picture FW>
/ items = FW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list FW_pics_list>
/ items = ("CFD-BF-001-026-A.jpg", "CFD-BF-002-018-A.jpg", "CFD-BF-003-016-A.jpg","CFD-BF-004-021-A.jpg")
</list>
/ items = (FW_pics);
<item FW_pics>
/ 1="CFD-BF-001-026-A.jpg"
/ 2="CFD-BF-002-018-A.jpg"
/ 3="CFD-BF-003-016-A.jpg"
/ 4="CFD-BF-004-021-A.jpg"
</item>

------------------------------------------------------------------------------------
*** Smile Female Pictures ***
------------------------------------------------------------------------------------

<picture SW>
/ items = SW_pics
/ numitems = 4
/ select = noreplace
/ size = (200, 200)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>

<list SW_pics_list>
/ items = ("CFD-BF-001-021-HC.jpg", "CFD-BF-002-006-HC.jpg","CFD-BF-003-007-HC.jpg","CFD-BF-004-008-HC.jpg")
</list>
/ items = (SW_pics);
<item SW_pics>
/ 1="CFD-BF-001-021-HC.jpg"
/ 2="CFD-BF-002-006-HC.jpg"
/ 3="CFD-BF-003-007-HC.jpg"
/ 4="CFD-BF-004-008-HC.jpg"
</item>

------------------------------------------------------------------------------------
*** INSTRUCTION PAGES -- ALL *****
------------------------------------------------------------------------------------

<instruct>
/ inputdevice = mouse
/ nextlabel = "Click the left mouse button to continue"
/ prevlabel = "Click the right mouse button to go back one screen"
/ fontstyle = ("Gill Sans MT", 1.83%, false, false, false, false, 5, 0)
/ txcolor = (0, 0, 0)
</instruct>


------------------------------------------------------------------------------------
*** Recall Task Instructions ***
------------------------------------------------------------------------------------

<page recall_pre_instruction1>
You are about to perform a simple memory task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will appear in the center of the screen.
^^ As soon as it appears, please indicate if this is a face you've seen earlier in this study.
^^ Press the "A" key if you have seen it before.
^^ Press the "L" key if you have not seen it before.
^^The face will stay on the screen for a few seconds, and then will disappear on its own.
^^After the next instruction page, the task will begin.
</page>

<page recall_pre_instruction2>
REMEMBER,
^^
^^IF YOU REMEMBER SEEING THE FACE, PRESS THE "A" KEY;
^^OTHERWISE, IF YOU DO not REMEMBER SEEING THE FACE, PRESS THE "L" KEY.
^^ Some faces will be ones you have seen, and others will be new faces.
^^After this page, the task will begin.
</page>

<page recall_pre_instruction3>
After you decide whether you have seen the face or not, please rate your confidence in your decision.
^^ Please use a scale from 0 to 10, with 0 being very NOT confident (or no confidence), and 10 being very confident.
^^After this page, the task will begin.
</page>


<page frownwomeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>


<page frownmeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page frownmeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
</page>

<page meninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS FEMALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>

<page frownmeninstruct1>
You are about to perform a simple categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a FEMALE FACE, hit the SPACE BAR.
^^IF the picture was of a MALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>


<page frownwomeninstruct2>
You are about to perform a DIFFERENT categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page frownwomeninstructagain>
You are about to perform another block of the same categorization task.
^^Each trial of the task will start with a '+' in the center of the screen.
^This '+' serves to alert you that a picture of a face is about to appear on the screen.
^^Next, a picture of a face will briefly appear in the center of the screen.
^^After the face disappears, a '?' will appear in the center of the screen.
^When the '?' appears, you need to categorize the face that just appeared.
^^IF the picture was of a MALE FACE, hit the SPACE BAR.
^^IF the picture was of a FEMALE FACE, DO NOT RESPOND (just let the '?' disappear on its own).
^^After this page, the task will begin.
</page>

<page womeninstruct2>
REMEMBER,
^^IMMEDIATELY AFTER YOU SEE THE FACE:
^^IF THE FACE WAS MALE, PRESS THE SPACE BAR;
^^OTHERWISE, DO NOTHING AND A NEW TRIAL WILL BEGIN.
^^After this page, the task will begin.
</page>


------------------------------------------------------------------------------------
*** Fixation Point & Response Indicator***
------------------------------------------------------------------------------------

<text fixation>
/ numitems = 1
/ items = (" + ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<text respondcue>
/ numitems = 1
/ items = (" ? ")
/ position = (50, 50)
/ erase = true(255,255,255)
</text>

<picture blank>
/ numitems = 1
/ items = ("blank.bmp")
/ size = (500, 500)
/ position = (50, 50)
/ erase = true(255,255,255)
</picture>












ALSO, sorry, I accidentally left in some "branch" Inquisit sample code verbatim, so I know that will need to change. I think my code will need a solution like it, though (re-pasted below)...

<trial id_recall_target_FM>
/ validresponse = (" ")
/ correctresponse = (" ")
/ stimulustimes = [0 = fixation;
1000 = blank, FM ;
3000 = blank, respondcue]
/ responsetime = 300
/ timeout = 5000
/ branch = [
if (list.player1schedule.nextvalue == 2) {
return trial.1to2;
} else if (list.player1schedule.nextvalue == 3) {
return trial.1to3;
};
]
</trial>

And what's your question, given that I've already proposed a solution?

Thank you so much Dave! When I made those additional posts, I guess my browser didn't update the page, so I didn't realize you had responded. This is wonderful. The idea that I can generate a unique, random, subset of stimuli at the beginning of the experiment is brilliant. I didn't realize that "nextvalue" would pull items randomly from the list. Thank you so much again!!

James
James Rounds
James Rounds
Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)Expert (1.3K reputation)
Group: Forum Members
Posts: 20, Visits: 80
Hello Millisecond folks and forum users,

We are very close to having our complicated design working as intended, but we can't quite figure out (what I hope is) one remaining issue. The mystery now is that our "list"-based randomization scheme doesn't seem to generate a "nextvalue" for some lists, (as if the respective list isn't initialized) depending on whether a block occurs first or second, and only for some conditions and some subjects. The result is that, for whichever "list" doesn't get initialized properly, for that block the same image is used for every trial of that condition, instead of a randomly selected item from a larger list. Our experiment URL is: https://mili2nd.co/as6b

To recap, we have what is essentially a two-phase experiment - a block of face-gender categorization trials (as a 3-stim oddball paradigm, with a non-task-related dimension of facial expression) followed by a block of recall trials that features some faces from phase 1, and some new foils. Then these two blocks essentially repeat with different faces (and different emotional valences as targets in the gender-categorization block).
We are counterbalancing target gender, and target facial expression, in a mixed 2x2 design (target gender is counterbalanced across participants, but target facial expression is a within-subject factor. Thus, we have 4 "expt" elements ("subject = 1 of 4", "subject = 2 of 4", etc.), one for each cell of the design. In expt 1, for example, participants are told to categorize females (the target gender) on both blocks, but in the first gender-categorization block the target trials are smiling females, and in the second gender-categorization block the target trials are scowling females.
When the expt/subject that is run is 1 or 3, there are no problems. But when the expt/subject is 2 or 4, we get the issue where one of the lists used to populate the specific gender-emotion foil trials in the Recall phase isn't initialized. So in our data output table, which reports "values.currentitemnumber_AngryMale_list_Block2" for example, there's an empty cell for that column, starting on the row/trial when a face that will then end up being repeated occurs. In the attached data file, you can see this starts on row 83, in which the first "new_angry_female_stim_recall_Block2_trial" occurs. The "currentitemnumber_AngryFemale_list_Block2" is now empty (after having been initialized at 0 and listed as such on all preceding trials).

Part of what's especially confusing about this issue is that many of the same code components are used in the four different experiments. Why do we only see this "repeat image" issue (accompanied by a seemingly un-initialized list) only on experiments 2 and 4? Any insight or advice folks can suggest is very appreciated! We have scoured the code many times trying to identify the issue but can't see what is causing it. Thanks!

Attachments
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: 82K
James Rounds - 4/24/2022
Hello Millisecond folks and forum users,

We are very close to having our complicated design working as intended, but we can't quite figure out (what I hope is) one remaining issue. The mystery now is that our "list"-based randomization scheme doesn't seem to generate a "nextvalue" for some lists, (as if the respective list isn't initialized) depending on whether a block occurs first or second, and only for some conditions and some subjects. The result is that, for whichever "list" doesn't get initialized properly, for that block the same image is used for every trial of that condition, instead of a randomly selected item from a larger list. Our experiment URL is: https://mili2nd.co/as6b

To recap, we have what is essentially a two-phase experiment - a block of face-gender categorization trials (as a 3-stim oddball paradigm, with a non-task-related dimension of facial expression) followed by a block of recall trials that features some faces from phase 1, and some new foils. Then these two blocks essentially repeat with different faces (and different emotional valences as targets in the gender-categorization block).
We are counterbalancing target gender, and target facial expression, in a mixed 2x2 design (target gender is counterbalanced across participants, but target facial expression is a within-subject factor. Thus, we have 4 "expt" elements ("subject = 1 of 4", "subject = 2 of 4", etc.), one for each cell of the design. In expt 1, for example, participants are told to categorize females (the target gender) on both blocks, but in the first gender-categorization block the target trials are smiling females, and in the second gender-categorization block the target trials are scowling females.
When the expt/subject that is run is 1 or 3, there are no problems. But when the expt/subject is 2 or 4, we get the issue where one of the lists used to populate the specific gender-emotion foil trials in the Recall phase isn't initialized. So in our data output table, which reports "values.currentitemnumber_AngryMale_list_Block2" for example, there's an empty cell for that column, starting on the row/trial when a face that will then end up being repeated occurs. In the attached data file, you can see this starts on row 83, in which the first "new_angry_female_stim_recall_Block2_trial" occurs. The "currentitemnumber_AngryFemale_list_Block2" is now empty (after having been initialized at 0 and listed as such on all preceding trials).

Part of what's especially confusing about this issue is that many of the same code components are used in the four different experiments. Why do we only see this "repeat image" issue (accompanied by a seemingly un-initialized list) only on experiments 2 and 4? Any insight or advice folks can suggest is very appreciated! We have scoured the code many times trying to identify the issue but can't see what is causing it. Thanks!

Well, you need to make sure that the respective lists are actually filled with item numbers /onexptbegin in the respective conditions
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search