Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delay Randomization
#2
Hi there!

Thanks for posting your question. There is no direct support for what you are trying to do, but depending on the exact outcome you're looking for, there are a couple options that I think should get the desired result. All of these assume you have some number of stimuli (n), each of which is to be displayed with 1 of 3 possible delay values.

Option 1: If you want each stimulus to appear once, with a truly random selection of 1 of the 3 delay possibilities.
Make 3 versions of each stimulus, one for each of the delay possibilities you want to select from. For example, if you have some stimulus (let's call it "stimulus 1"), you would make 3 versions of that stimulus, each with a different delay value (e.g., "stimulus 1-0" has delay set to 0, "stimulus 1-05" has delay set to 0.5, and "stimulus 1-1" has delay set to 1). Next, set up a custom attribute defining the underlying stimulus (e.g., "base_stimulus": "stimulus 1").

Now, in your trial template, include all of these stimuli---including all 3 versions of each---under your "stimuli" property (e.g., "stimuli": ["stimulus 1-0", "stimulus 1-05", "stimulus 1-1", ...]). Then, set the "stimulus_pattern" property like so:

"stimulus_pattern": {
    "order": "random",
    "unique_by": ["base_stimulus"]
}

What this will do is randomly select stimuli from the list to generate each trial, but making sure only one of each "base_stimulus" is selected. Once every base stimulus type has been used once, the template will cease to generate trials. See the reference for unique_by for more info.

Option 2: If you want each stimulus to appear N times, with a truly random selection of 1 of the 3 delay possibilities.
Set everything up exactly like in option 1 above, but when you set up the block containing this trial template, set the value of the "repeat" property (under the "pattern" property) of the block to be N. This will repeat the trial template N times, and each iteration will be a truly random selection of one of the delay options per base stimulus.

Option 3: If you want each stimulus and delay possibility to appear at most once.
In this case, when setting up your stimuli, you'll need to include an additional custom attribute signaling the value of that stimulus version's delay property. For example, you may have "stimulus 1-0" defined like so:

{
    "type": <input the stimulus type here>,
    "content": <input the stimulus content here>,
    "delay": 0,
    "base_stimulus": "stimulus 1",
    "delay_option": 0
}

Once you've set up all stimuli with custom attributes for both "base_stimulus" and "delay_option" (or whatever you wish to call them), define your trial template just like in option 1 above but with this change to the stimulus_pattern:
"stimulus_pattern": {
    "order": "random",
    "unique_by": ["base_stimulus", "delay_option"]
}

Assuming you have 3 delay options and at least 3 base stimuli, this will cause a total of 3 trials to be generated. Each trial will have a different base stimulus and a different delay option, with no repeats.

As with option 2 above, you can have this process repeat itself using the "repeat" property of the "pattern" property of the block in which this trial template is placed.

I hope this helps! If you have further design constraints or follow-up questions, just reply here.
Noah Nelson
VP of Product @ FindingFive
Reply


Messages In This Thread
Delay Randomization - by [email protected] - 12-09-2025, 02:21 PM
RE: Delay Randomization - by noah.nelson - 12-09-2025, 07:32 PM
RE: Delay Randomization - by [email protected] - 12-12-2025, 07:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)