Reply To: Randomising serially presented text items within a trial

PennController for IBEX Forums Support Randomising serially presented text items within a trial Reply To: Randomising serially presented text items within a trial

#7195
Jeremy
Keymaster

Hi,

The most efficient solution here is probably to use javascript to randomly determine which premises you’ll pick as the first, second and third ones. And since you don’t need to do it during runtime, you can randomize those things for each trial when generating them, in the function you pass to Template

To give you an idea, you would start your Template command like this:

Template("fillers.csv", row => {
    row.premiseIndices = [1,2,3];
    fisherYates(row.premiseIndices);
    return newTrial("filler-trial",

You can find the full code (and its demo) here: https://farm.pcibex.net/r/WKBLfB/

Jeremy