Reference
ExpressionEditor

At the heart of the conditional branching feature in SuperLab are expressions.  An expression consists of one or more Boolean comparisons where a left hand side (LHS) is compared to a right hand side (RHS); example:



The result of a comparison is always true (1) or false (0).  At present, the LHS consists of a few SuperLab-provided variables and the RHS is always a constant value.

Variables

The following variables are available for building comparisons:

To specify a subset, click on the Subset button.  The following dialog appears:



You can set the maximum number of trials to include in the subset, the trials that have a specific code value set, or both.  In the screen snapshot above, SuperLab will look only at the last response to see if it’s correct.  This allows the experimenter to do more than what the built-in feedback options provide.

Another example using subsets is in learning experiments.  During the learning phase of an experiment, it is common to keep repeating trials until the average reaction time drops below a certain threshold.  But often, an experimenter wants to use a moving average rather than the average of all the trials in the block.  Using a subset would help in looking at moving averages.

Using Multiple Boolean Comparisons

The following example shows an expression containing three comparisons:



SuperLab automatically uses the “and” operator but this is easily changed to “or” simply by clicking on it:



SuperLab imposes no limits on how many comparisons an expression can have.