# Randomizing position of stim

Hey there,

I am presenting 6 images simultaneously. I somehow successfully randomized the order of images but it gues a bit controlled way; certain combinations are appearing in a randomized way but they are never randomized with the rest of the stims.

First, I defined all combinations in my condition file:

Then, set every combination of X and Y (X1-Y1, X1-Y2, X2-Y1 … etc.) as position conditions in image properties for all 6 images

Finally wrote the following code:

Problem is: This allows only certain types of combinations that I pre-determined in the .xlsx file, image properties, and the custom code. Could you please help me fullly randomize the positions?

Bests

Have a look at my independent randomisation demo.

Hi,

When I tried the procedure below, some of the items overlapped

Begin Exp:

``````sidesX = [-.43, 0, .43, -.43, 0, .43] #I repeated the numbers because when I include 3 of them, all items were overlapping.
sidesY=[-.3,.3,-.3,.3, -.3,.3]
``````

Begin Routine:

``````shuffle(sidesX)
shuffle(sidesY)
``````

Image properties for each image, set every repeat:
(sidesX[0], sidesY[0])
(sidesX[1], sidesY[1]) etc.

I want to see 3 images appear upper or lower portion of the screen side by side.
1 2 3
4 5 6
But this code gives me this:

You are shuffling the x and y coordinates separately.

``````# Begin Experiment
sides = [[-.43,-.3],[-.43, .3],[0, ,-.3],[0, .3],[.43, -.3],[.43, -.3]]

# Begin Routine
shuffle(sides)

# Image properties, set every repeat
(sides[0][0], sides[0][1])
(sides[1][0], sides[1][1]) etc.
``````

(sides[0][0], sides[0][1])
(sides[1][0], sides[1][1])

(sides[0][0], sides[1][0])
(sides[0][1], sides[1][1])
(sides[1][1], sides[1][0])
(sides[0][1], sides[0][0])

sorry, I could not understand the logic.

The coordinates of the ith position is:

(sides[i][0], sides[i][1])

So all of your horizontal coordinates should be sides[item number][0]