# How to build a grid and show stimuli at random positions

Hello everyone
In my experiment I want to build a grid of 16 positions and show between 3 and 8 squares randomly on the screen at random positions. The number of stimuli should change randomly on each of the ten trials.
So far, I used the builder and I can only present each stimuli at predefined positions (I defined them in the position field of each of the 16 image components) which means, the positions where the stimuli appear are the same for each trial, as well as the number of shown squares because I assigned the sqaure to each of the image components in order for them to be shown.

My question is now, how can I make the position of the shown stimuli completely random and the number between 3 and 8?
Do I have to solve this by going down to the code level and change it there?

Wanja

Hello Wanja,

You should start by working through this thread, and then come back to us:

It is not quite the same as what you want to do, but will be a good starting point to show how stimuli can be controlled dynamically rather than with fixed positions.

This is great Michael. The first part goes kind of in the same direction as my experiment.

I managed to use the opacity to randomly show the stimuli at every point on the grid by defining my condition file as stated.

Every image component in the builder gets its possible opacity states (1 and 0) from the condition file. Threre I created columns for every position on my grid and filled the rows with 1s and 0s. There is also a â€˜fullrandom loopâ€™ build around it that gives me differentiating inputs every trial.

My problem is now, that even if the order of the opacity of the shown stimuli differs from the order written in my conditions file (which is already great), it does not differ in between the stimuli. So the shown stimuli all change in the same order. How can I make everyone change individually?

Thanks

I donâ€™t really understand that. Can you expand this description with more precise detail, perhaps with some screenshots to illustrate?