Variation
This tab is home to the STRATEGY setting, which affects the behavior of the chooseAtRandom function.
Two options are available from the dropdown: dontRepeat and random.
Note
dontRepeat is the system default.
To understand the difference, consider this script:
The script contains three calls to the chooseAtRandom
function. The function's purpose is to add linguistic variation to your output. It works by randomly selecting and returning one expression from those provided as parameters.
If STRATEGY = random, Studio might return the same result (e.g. "together achieved") for all three calls. Using this strategy, Studio deals with each call in isolation and selects a result randomly from the given options. This means it could choose the same option twice in a row, or even for all three calls. This would be undesirable because it wouldn't produce the desired variation.
If STRATEGY = dontRepeat, the result for Call 2 cannot be the same as for Call 1, and the result for Call 3 cannot be the same as for Call 2. Using this strategy, Studio no longer processes each call in isolation. Instead, each call is considered in relation to preceding calls to avoid repetition. If one or more options in the call being processed have been returned by a preceding call, the call being processed will NOT repeat the most recently used of those options. Instead, it will choose randomly from the remaining options.
Note
The dontRepeat behavior applies within one narrative only. For example, if your project type generates a separate narrative for each row, each narrative starts afresh.