We have a list of 10 stimuli (images) repeating for 500 trials. We need to make sure that the same stimulus is not presented on consecutive trials. Is there any way to do this?
currently we are using:
var myArray = [1,2,3,4,5,6,7,8,9,10];
var shuffledArray = jsPsych.randomization.repeat(myArray, 50);
// output would present us with 500 random images, which is great, but some images will repeat
// output: shuffledArray = [1,6,4,2,2,5,7,7,3,10,....]
We would need the output such that no image would repeat, but would still be randomly assigned for 500 trials.
// output: shuffledArray = [1,9,4,2,3,7,5,8,10, 6,....]
From the jsPsych google group: