# Randomization of events

Events can be specified to occur in a set order. However, there are also a number of aspects that can be selected randomly. These include the side of occurrence for an event (left vs. right) and the particular stimulus from a set. [Randomization](../creating-protocols/selection-and-randomization) can occur WITH or WITHOUT replacement - that is, BITTSy will keep track of which items it has already selected, and can avoid reusing items until all have already been selected (without replacement), or can just pick entirely randomly each time regardless of what has already been selected (with replacement).   You can also [place limits](../../creating-protocols/selection-and-randomization#repeat-clauses) on the number of times the same thing can be re-selected (e.g., pick a side randomly, but don't present to the same side more than X times in a row).

Stimuli can also be arranged in [hierarchical sets](../creating-protocols/tags/groups), with randomization occurring within sets. As an example, you could have pictures of `animals` which include `cats` and `dogs`, with multiple examples of each, and could tell BITTSy to select one of the two animal types randomly, then randomly order the presentations of all the different examples within that animal type before moving on to the other animal type.
