How to do Conditional Branching with Inquisit

Inquisit provides several attributes that enable an experimental procedure to dynamically change or adapt based on the subject's performance.

Branch Attribute

The most powerful attribute for conditional logic is the branch attribute. The branch attribute can be defined at the level of the trial (including specialized trials such as likert, openended, or block. The attribute allows you to specify which trials or blocks to run next based on performance. Branching is useful in a variety of circumstances:

The syntax of the attribute is as follows:

/ branch = [if (<boolean expression>)nextevent]

where <boolean expression> is an expression that evaluates to true or false, and nextevent is the trial or block that should be run if the boolean expression is true. To specify that no branching should occur if a particular condition is true, "0" can be specified as the next event.

Multiple branches may be defined for a given element. If the conditions of multiple branches are true, then the first branch in the list wins.

Skip Attribute

Another useful attribute for conditional logic is the skip attribute. Like the branch attribute, skip can be defined at the level of . The attribute allows you to specify conditions under which which the trial or block should be skipped. The syntax of the attribute is as follows:

/ skip = [<boolean expression>]

where <boolean expression> is an expression that evaluates to true or false. Multiple skip conditions may be defined for a given element. If any of the skip conditions of are true, this event is skipped. Otherwise, it runs as normal.

Responsetrial Attribute

The responsetrial attribute provides a convenient way to chain together trials based on which response the subject made. For example:

Note that with Inquisit 6, the branch attribute includes all of the functionality of the responsetrial, and also includes functionality not supported by responsetrial.

Stop Attribute

The stop attribute aborts the remainder of the trials in a block if the subject's peformance meets the specified condition. This is useful in a variety of situations: