Millisecond Forums

Randomizing color of shapes

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

By Jackie - 2/15/2012

I am extremely new to using Inquisit so I may be missing something very obvious -- if so, my apologies for asking! But on each trial I want to be able to present in 4 different shapes (e.g., circle, square, diamond, square) each in a different random (with replacement) color. My question is regarding the presentation of the stimuli. I know that Inquisit includes a shape element but it is limited to circles, triangles, and rectangles (no diamond, which I need), so I assume that I need to create jpegs of the shapes in each possible color (i.e., 4 shapes x 4 colors = 16 pictures). There would, of course, be 4 possible stimulus positions on the screen but I am confused how would I restrict randomization to present each shape once and each color only once across the 4 positions. I'd appreciate any advice pointing me in the right direction!

By Dave - 2/15/2012

I assume that I need to create jpegs of the shapes in each possible color (i.e., 4 shapes x 4 colors = 16 pictures).


That is correct.


how would I restrict randomization to present each shape once and each color only once across the 4 positions.


Can you elaborate on this? I.e., what exactly is supposed to happen in a single trial as well as across the whole task? It's unfortunately not clear from your description, thus I can't give you any advice. I'm also confused by


4 different shapes (e.g., circle, square, diamond, square) each in a different random (with replacement) color.


which seems to contradict the above.


Regards,


~Dave


By Jackie - 2/15/2012

Thank you Dave for your speedy reply!   And yes, you're right -- I had meant "without replacement" in my first message. Sorry for the confusion.


On each trial, 4 different shapes will be presented, each in a different color; the shapes will all remain on the screen for 1 second. The shapes will be presented in a row centered on the screen, with 4 different positions--far left, near left, near right, far right, relative to the center.  Across trials, the placement of each shape should be random -- with the constraint that each shape is presented only once and that there is only one shape in each position. Similarly, the color of each shape should be random, with the constraint that each color should be presented only once per trial.


I hope that this makes more sense. Thank you!

By Dave - 2/15/2012

Thanks for the clarification.


On each trial, 4 different shapes will be presented, each in a different color; the shapes will all remain on the screen for 1 second. The shapes will be presented in a row centered on the screen, with 4 different positions--far left, near left, near right, far right, relative to the center.  Across trials, the placement of each shape should be random -- with the constraint that each shape is presented only once and that there is only one shape in each position. Similarly, the color of each shape should be random, with the constraint that each color should be presented only once per trial.


You'd essentially do something like this (option 1; grouped by shape)


<block myblock>
/ trials = [1-10=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=circle,diamond,rectangle,triangle]
/ validresponse = (anyresponse)
/ timeout = 5000
</trial>

<counter colorcounter>
/ items = (1,2,3,4)
/ select = noreplace
/ selectionrate = always
</counter>

<counter positioncounter>
/ items = (20%,40%,60%,80%)
/ select = noreplace
/ selectionrate = always
</counter>

<picture circle>
/ items = circleitems
/ select = colorcounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<picture diamond>
/ items = diamonditems
/ select = colorcounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<picture rectangle>
/ items = rectangleitems
/ select = colorcounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<picture triangle>
/ items = triangleitems
/ select = colorcounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<item circleitems>
/ 1 = "blue_circle.gif"
/ 2 = "green_circle.gif"
/ 3 = "red_circle.gif"
/ 4 = "yellow_circle.gif"
</item>

<item diamonditems>
/ 1 = "blue_diamond.gif"
/ 2 = "green_diamond.gif"
/ 3 = "red_diamond.gif"
/ 4 = "yellow_diamond.gif"
</item>

<item rectangleitems>
/ 1 = "blue_rectangle.gif"
/ 2 = "green_rectangle.gif"
/ 3 = "red_rectangle.gif"
/ 4 = "yellow_rectangle.gif"
</item>

<item triangleitems>
/ 1 = "blue_triangle.gif"
/ 2 = "green_triangle.gif"
/ 3 = "red_triangle.gif"
/ 4 = "yellow_triangle.gif"
</item>


or (option 2; grouped by color)


<block myblock>
/ trials = [1-10=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=blue,green,red,yellow]
/ validresponse = (anyresponse)
/ timeout = 5000
</trial>

<counter shapecounter>
/ items = (1,2,3,4)
/ select = noreplace
/ selectionrate = always
</counter>

<counter positioncounter>
/ items = (20%,40%,60%,80%)
/ select = noreplace
/ selectionrate = always
</counter>

<picture blue>
/ items = blueitems
/ select = shapecounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<picture green>
/ items = greenitems
/ select = shapecounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<picture red>
/ items = reditems
/ select = shapecounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<picture yellow>
/ items = yellowitems
/ select = shapecounter
/ hposition = counter.positioncounter.selectedvalue
/ size = (10%,10%)
</picture>

<item blueitems>
/ 1 = "blue_circle.gif"
/ 2 = "blue_diamond.gif"
/ 3 = "blue_rectangle.gif"
/ 4 = "blue_triangle.gif"
</item>

<item greenitems>
/ 1 = "green_circle.gif"
/ 2 = "green_diamond.gif"
/ 3 = "green_rectangle.gif"
/ 4 = "green_triangle.gif"
</item>

<item reditems>
/ 1 = "red_circle.gif"
/ 2 = "red_diamond.gif"
/ 3 = "red_rectangle.gif"
/ 4 = "red_triangle.gif"
</item>

<item yellowitems>
/ 1 = "yellow_circle.gif"
/ 2 = "yellow_diamond.gif"
/ 3 = "yellow_rectangle.gif"
/ 4 = "yellow_triangle.gif"
</item>


depending on which grouping better suits your needs. You can also find those two examples attached. I'm sure you can take it from there.


Regards,


~Dave

By Jackie - 2/16/2012

Thank you Dave! Your response is SO very helpful and so thorough --it would have taken me forever to figure this out on my own!