Millisecond Forums

Display trials once per block in random order?

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

By Inquisitor88 - 11/30/2014

Hello everyone,
I need some assistance figuring out why my Stroop task isn't working. I have 16 trials per block, and 16 distinct trials that I want to occur in random order once per block. I have already listed out all of the trials and stimuli I need (each word/color combination), and in the trial selection within the block, set "noreplace". Yet, when I run the experiment, expecting it to select every trial only once, it repeats certain ones.
Is my problem in the trial selection or somewhere else in the code? I've also tried "noreplacenorepeat" to no avail.
Help is much appreciated!

<block stroop>
...
/trials=[1-16=noreplace(Rred, Rblue, Ryellow, Rgreen, Ured, Ublue, Uyellow, Ugreen, Yred, Yblue, Yyellow, Ygreen, Gred, Gblue, Gyellow, Ggreen)]
...
</block>
By Dave - 11/30/2014

The code you posted, namely

/trials=[1-16=noreplace(Rred, Rblue, Ryellow, Rgreen, Ured, Ublue, Uyellow, Ugreen, Yred, Yblue, Yyellow, Ygreen, Gred, Gblue, Gyellow, Ggreen)]

*will* present each of the listed <trial> elements exactly once. You are drawing 16 samples (1-16) from a pool of 16 elements (Rred, ..., Ggreen) randomly without replacement (noreplace). If you examine the data file's trialcode column, I'm sure you'll find that this is exactly the case. There'll be exactly one instance of trial Rred, one instance of Rblue, one instance of trial Ryellow, etc.

Note that the sampling of trials at the block level *has nothing to do* with how those trial elements may sample from any *stimulus elements* they display.
By Inquisitor88 - 11/30/2014

If the trial selection is working properly, then how do I work with the trials' stimulus element selection?
Shouldn't this trial "Rred" select the text element "Rred", which will draw from the items "colors"? Do I need to make items for each different trial? 

<trial Rred>
/stimulustimes = [0=fixation; 500=Rred]
/beginresponseframe = 500
/posttrialpause = 1500
/validresponse = ("red" "green" "blue" "yellow")
/correctresponse = ("red")
</trial>

<text Rred>
/items=colors
/color = (255,0,0)
</text>

<item colors>
/1 ="   RED   "
/2 ="   GREEN   "
/3 ="   BLUE   "
/4 ="   YELLOW   "
</item>
By Dave - 11/30/2014

Your <block> will run the <trial> Rred a single time. That single instance of the trial will draw a single sample from <text Rred>. It could be any of the four. This will not affect what any *other* <trial> elements do with any *other* <text> elements. I.e., if you have

<trial Rblue>
/stimulustimes = [0=fixation; 500=Rblue]
/beginresponseframe = 500
/posttrialpause = 1500
/validresponse = ("red" "green" "blue" "yellow")
/correctresponse = ("red")
</trial>

<text Rblue>
/items=colors
/color = (255,0,0)
</text>

<item colors>
/1 ="   RED   "
/2 ="   GREEN   "
/3 ="   BLUE   "
/4 ="   YELLOW   "
</item>


nothing prevents the same item (e.g. "YELLOW") being sampled as in <trial Rred> / <text Rred>.

<text Rred> and <text Rblue> are *entirely independent* of each other. It's the same as having two identical decks of 4 cards lying in front of you and drawing one card from each.
                               
By Inquisitor88 - 12/1/2014

The deck of cards analogy helped a lot. Now I need to know how put all of those "cards" in the same deck, with only one of each card. Is there a command or some reformatting I can do to that effect? 
By Dave - 12/1/2014

<text Rcolors>
/ items = colors
...
</text>

<trial Rred>
/stimulustimes = [0=fixation; 500=Rcolors]
...
</trial>

<trial Rblue>
/stimulustimes = [0=fixation; 500=Rcolors]
...
</trial>

...
By Inquisitor88 - 12/4/2014

It's working now! I needed to rework my items lists and use less similar terms for all of my items. Thank you for your help, Dave!