Random item display from one of two lists


Author
Message
pawelstrojny
pawelstrojny
Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)
Group: Forum Members
Posts: 43, Visits: 76
Hi,

It is possible that I have wrong assumptions - in thta case, please let me know.
I need to prepare script which is based on this description from Bellaera et al. (2013):

"visual search task, which consisted of one practice and 16 experimental blocks, with 24 trials in each block (total 408 trials). The main independent variable was display type (old or new). In old displays, the same 12 randomly gener- ated configurations were shown repeatedly across blocks. In these the target was presented in the same location within any particular configuration, and thus the target–distractor spatial layout was consistent (but not the target orientation). For new displays, 192 different configurations were randomly generated for 12 new configurations in every block. To rule out location probability effects, the target appeared equally often in each of 24 possible locations throughout the experiment (12 target locations used for old and new, respect- ively)."

So, I figured it out that I need 16 blocks containing 24 trials each. For every trial it has to be used random stimulus from one of two (???) lists. First list should contain 12 stimuli and the second - 192 stimyli.

The stimulus used in any particular trial should be randomly chosen from one of two lists (probability=0,5); from 1st list with replacement or from 2nd list without replacement.

Of course I need to prepare 204 *png files with different patterns, for now I have 12 "filler" pictures. My concern is the construction of the script - graphics will follow the script :)

Is my reasoning correct? Is that possible to do it in Inquisit? Maybe there is another (simplier) way?

My script for now is as fllows:

EXPERIMENT

<expt>
/postinstructions = (end)
/blocks = [1 = generalinstructions; 2 = practice; 3-18 = testblock]
</expt>

BLOCKS

<block testblock>
/trials = [1 = instr; 2-25 = test; 26 = rest]
</block>

<block generalinstructions>
/trials = [1 = generalinstructions]
</block>

<block practice>
/trials = [1 = practice]
</block>

TRIALS

<trial test>
/ ontrialbegin = [values.counttrials += 1]
/ stimulustimes = [ 0 = fixation; 750 = eraser; 1000 = list.items ]
/ beginresponsetime = 1000
/ontrialend = [trial.test.resetstimulusframes()]
/beginresponsetime = (values.fixationduration)
/responseinterrupt = immediate
/ validresponse = (79, 89)
/ monkeyresponse = (79, 89)
/recorddata = true
</trial>

<trial practice>
/ ontrialbegin = [values.counttrials += 1]
/ stimulustimes = [ 0 = fixation; 750 = eraser; 1000 = list.items ]
/ beginresponsetime = 1000
/ontrialend = [trial.test.resetstimulusframes()]
/beginresponsetime = (values.fixationduration)
/responseinterrupt = immediate
/ validresponse = (79, 89)
/ monkeyresponse = (79, 89)
/recorddata = FALSE
</trial>

<trial instr>
/stimulusframes = [1 = instr]
/ correctresponse = (" ")
</trial>

<trial generalinstructions>
/stimulusframes = [1 = generalinstructions]
/ correctresponse = (" ")
</trial>

<trial rest>
/stimulusframes = [1 = resttimer]
/timeout = clock.resttimer.timeout
/recorddata = true
</trial>


OTHERS

<picture instr>
/items = instr
/position = (50%, 50%)
/size = (100%, 100%)
</picture>

<item instr>
/ 1= "instr.png"
</item>

<picture generalinstructions>
/items = generalinstructions
/position = (50%, 50%)
/size = (100%, 100%)
</picture>

<item generalinstructions>
/ 1= "generalinstructions.png"
</item>

<list items>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ itemprobabilities = (.083, .083, .083, .083, .083, .083, .083, .083, .083, .083, .083, .083)
/ poolsize = 36
/replace = false
/resetinterval = 1
</list>

<item stims>
/1 = "Tc.png"
/2 = "Ts.png"
/3 = "Td.png"
/4 = "Ct.png"
/5 = "Cs.png"
/6 = "Cd.png"
/7 = "Dc.png"
/8 = "Ds.png"
/9 = "Dt.png"
/10 = "Sc.png"
/11 = "Sd.png"
/12 = "St.png"
</item>

<text fixation>
/items = ("+")
/ fontstyle = ("Arial", 33, false, false, false, false, 5, 1)
/ txcolor = (white)
/txbgcolor = (black)
/position = (50%, 50%)
</text>

<clock resttimer>
/ mode = timer
/ resetrate = block
/ erase = false
/ txcolor = yellow
/ txbgcolor = black
/ timeout = values.restduration
/ position = (50%, 50%)
/ format = "mm:ss"
/ fontstyle = ("Arial", 15%, false, false, false, false, 5, 1)
</clock>

<shape eraser>
/shape = rectangle
/color = black
/size = (100%, 100%)
/position = (50%, 50%)
</shape>

<values>
/restduration = 20000
/counttrials = 0
/ fixationduration = 750
</values>

<page end>
Ukończono tę część badania!
</page>


Dave
Dave
Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)
Group: Administrators
Posts: 10K, Visits: 51K
This is certainly possible to do with Inquisit. Since there is almost never only *one* way to program a given procedure, a lot depends on your personal preferences and exactly what you want to achieve.

You can use <list> elements, but your use of them is *wrong* in the code you posted. If you want to use a list in /stimulustimes

/ stimulustimes = [ 0 = fixation; 750 = eraser; 1000 = list.items ]

that <list> ought to return a *stimulus element* (e.g. a <picture>, which yours does not.

<list items>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ itemprobabilities = (.083, .083, .083, .083, .083, .083, .083, .083, .083, .083, .083, .083)
/ poolsize = 36
/replace = false
/resetinterval = 1
</list>

In general, it might be easier for you to set up two distinct <trial> elements for "old" and "new" configurations (along with the associated stimulus elements / items) and then sample from those two trial types at the block-level.

<block testblock>
/ trials = [1-24 = noreplace(old,new)]
...
</block>

If you don't want exactly 12 "old" and 12 "new" trials per 24-trial block, use a <list> element for trial-selection:

<block testblock>
/ trials = [1-24 = list.triallist]
...
</block>

<list triallist>
/ items = (trial.old, trial.new)
/ poolsize = 384
...
</list>

pawelstrojny
pawelstrojny
Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)Distinguished Member (4.6K reputation)
Group: Forum Members
Posts: 43, Visits: 76
Thanks,

I'll decide to use your suggestion. One more question:

If I use "block" to randomly select trial (old or new), I have to define trial like below:

<trial new>
/ stimulustimes = [ 0 = fixation; 750 = eraser; 1000 = noreplace(n1, n2, n3, n4, n5, n6, n7....n192) ]

right?
And if I do that - may I be sure that the stimulus used in previous BLOCK, will not be used again in the current one?

E.g. In Block 1st (of16), script randomly used n1-n12, isn't that possible that in Block 2nd it will use one (or many) of them again?

Dave
Dave
Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)Supreme Being (783K reputation)
Group: Administrators
Posts: 10K, Visits: 51K
> If I use "block" to randomly select trial (old or new), I have to define trial like below:
>
> <trial new>
> / stimulustimes = [ 0 = fixation; 750 = eraser; 1000 = noreplace(n1, n2, n3, n4, n5, n6, n7....n192) ]
>
> right?

No. You simply set up *one* stimulus element (e.g. <picture newpic>) with 192 items.

<trial new>
/ stimulustimes = [ 0 = fixation; 750 = eraser; 1000 = newpic ]
...
</trial>

<picture newpic>
/ items = newpicitems
...
</picture>


<item newpicitems>
/1 = "new001.jpg"
...
/192 = "new192.jpg"
</item>

> And if I do that - may I be sure that the stimulus used in previous BLOCK, will not be used again in the current one?

To keep a stimulus element's selection pool intact across blocks, use its /resetinterval attribute:

<picture newpic>
/ items = newpicitems
/ resetinterval = 0
...
</picture>

I would also recommend working through the tutorials included in the Inquisit documentation prior to moving on. They cover most of those basics. Hope this helps.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search