First Experiment and Struggling: Randomizing Conditions with Multiples Condition Files and a Target Shape

I am trying to create an experiment involving multiple condition files. The participant has to use their keyboard to choose whether a dot is on the left or right side of the target shape. I created my condition files, but am struggling to figure out how to create the actual routine. So far, I have these parameters:

condition files

condition_files = [‘green_circle.xlsx’, ‘green_diamond.xlsx’, ‘red_diamond.xlsx’, ‘green_square.xlsx’, ‘red_square.xlsx’, ‘green_hexagon.xlsx’, ‘red_hexagon.xlsx’]
shuffle(condition_files)
condition_file = condition_files[0]

nBlock = 12

Graphics

colors

colors= {‘blue’:‘#00d2ff’,‘red’:‘#FF0000’,‘green’:‘#00a900’}

item positions

#r = .33
#all_positions = [(0.33, 0.0),(0.23, 0.23),(0, 0.33),(-0.23, 0.23),(-0.33, 0),(-0.23, -0.23),(0, -0.33),(0.23, -0.23)]
all_positions = [(0.33, 0.0),(0, 0.33),(-0.33, 0),(0, -0.33)]

dot offsets

dot_offsets = [-.04, .04, -.04, .04]

item sizes

size_circle = .116 # d
size_diamond = (.089,.089)
size_square = (.1, .1)
size_hexagon = (.122,.122)
size_dot = 0.01
size_fixation = .089 # d
size_box = (.15,.15)

instruction text size

text_size = .03

text_wrap

text_wrap = 1

These are what two of my condition files look like.


Any help would be appreciated! Thanks!

The main issue is that it isn’t possible to change the shape of a polygon after the component has been created. You could therefore either use four image components or have extra polygon components (e.g. three of each if that’s the maximum number that need to appear on screen at the same time). The image route will definitely be easier for you.

If you shuffle(all_positions) then you can set the positions as all_positions[0], all_positions[1], etc. and the colours as $Col1, etc.

Yeah, that’s the main issue I’ve been trying to figure out. Thanks so much for the help.