| Reference | Downloads | Github

Randomising number of stimuli, their colour, and locations on trials


I am trying to build a continuous response task to measure working memory precision. I need to randomise the number of stimuli (circles) presented on screen, their colours, and their locations on a given trial, before presenting one of these in the centre of the screen when the participant is required to click where that item first appeared. I have coded this in Python and Matlab - and both have worked fine - but we are looking to use it online, so are attempting to build it here. However, I can’t understand how to randomise the number of, colour, and locations of the circles. I have xlsx files of possible set sizes, locations and colours (including one master document), but I’m stumped for what comes next: I can only present one circle and randomise its colour, but not location?

I’ve tried looking at other questions, but none have helped so far. Thanks in advance for any advice.

Hi @smca64, a good place to start would be the Corsi block task demo on Pavlovia. It uses code to randomize the positions of the blocks, which can then be adapted to randomize the size etc

code repo: