EthoVision’s trial control settings allow you to plan out sequences of events during a trial, with specified delays and durations. But sometimes it’s better to vary the delays or sequences unpredictably.
One option is simply to create multiple trial control settings profiles, and randomly assign them per trial. This keeps the trial control settings simple and has the advantage that trials with the same order of presentation can be grouped or labeled in the analysis results.
However, it’s also possible to vary both the timing and sequences of events within a single trial control settings profile.
The easiest way to add random variability is by varying the time between different events. Just as you can use a Time condition to add a delay of a fixed duration, you can specify a random duration:
If you want to randomly select between different events, e.g. selecting between two different stimuli, it is possible to do so using trial control variables. A variable just stores a numeric value. There is a trial control variable action which you can use to assign a random value to such a variable. Likewise there is a trial control variable condition which you could use to choose between two different paths. (You also have to create the variable. To do so, click the “TC Variables…” button in the settings for any trial control element that uses variables, then click Add and give it a name.) Variables can be used as counters but here we will use one to make a randomized choice.
Here's an example of a trial control sub-rule which randomly selects between presenting a noise stimulus (the upper path) and a tone stimulus (the lower path), and then afterwards waits for 5-30 seconds (after which the sub-rule could be made to repeat):
The first Action box (“Randomize”) assigns a random value between 0 and 10 to a trial control variable named “Choice.” We then have arrows going to two different conditions in order to pick which events should occur.
Two important things to note here:
In many cases, although the order of presentation should be randomized, the total number of presentations should be fixed. In this case, we want to make a random selection, but also keep a count of how many times each stimulus was presented. If we’ve reached the maximum number for the selected stimulus, we’ll switch to the other stimulus instead.
Here’s an example, using the same random selection of noise vs tone from above, but limiting each to a maximum of 5 presentations. Two additional variables have been created, ToneCount to count the number of tone stimuli and NoiseCount to count the number of noise stimuli:
In order to present each stimulus 5 times, the sub-rule should be called to execute the sub-rule a total of 10 times. Five will be tone and five will be noise, but the order will be random. Here’s the remaining part of the trial control settings, which in this example waits 60 seconds and then calls the sub-rule 10 times: