# Setting habituation criteria

All habituation settings are defined in the same section of the protocol as [optional experimental settings](../optional-experiment-settings) such as key assignments. These settings are designed to allow experimenters to define and control habituation experiments in BITTSy similarly to established habituation procedures.

## General window settings

### WINDOWSIZE

```
DEFINE WINDOWSIZE <number of trials>
```

This defines the number of trials which constitute a window. The same size is used when evaluating potential basis windows and criterion windows.

There is no default value for window size. This setting must be specified in the protocol of any habituation procedure that uses basis and criterion windows.

### WINDOWTYPE

```
DEFINE WINDOWTYPE <FIXED or SLIDING>
```

This setting defines whether windows for evaluation as possible basis/criterion windows should overlap with each other. SLIDING allows overlapping windows, while FIXED does not. For example, with a WINDOWSIZE of 3 and the window type FIXED, trial sets 1-3, 4-6, 7-9, etc. will be evaluated; if SLIDING, trial sets 1-3, 2-4, 3-5, 4-6, 5-7, etc. will all be evaluated.

SLIDING is the default setting if the WINDOWTYPE is not defined within a protocol.&#x20;

### WINDOWOVERLAP

```
DEFINE WINDOWOVERLAP <YES or NO>
```

This setting defines whether the basis window and a criterion window are allowed to overlap. This setting is important whenever WINDOWTYPE is SLIDING; it is irrelevant for FIXED windows.

If this setting is YES to allow overlap, and the WINDOWSIZE was 4, you could have a basis window of trials 1-4 and trials 2-5, 3-6, 4-7, etc. would all be evaluated as possible criterion windows. But if WINDOWOVERLAP was set as NO, the first window to be evaluated as a potential criterion window would be trials 5-8. All prior windows would be disallowed because they would include trial 4, which was part of the basis window.

YES is the default if WINDOWOVERLAP is not defined in the protocol.

## Basis window-specific settings

### BASISCHOSEN

```
DEFINE BASISCHOSEN <FIRST or LONGEST>
```

Defines which window is chosen as the basis window. This can either be the first window or the window with the longest total looking time.

LONGEST is the default if BASISCHOSEN is not specified.

### BASISMINIMUMTIME

```
DEFINE BASISMINIMUMTIME <time in milliseconds>
```

This setting allows you to set a minimum total looking time for a basis window. This can help prevent a child who is fussy at the start of an experiment from reaching a habituation criterion without having met a minimal requirement for looking time.

Zero milliseconds is the default, i.e. no minimum.

## Criterion window-specific settings

### CRITERIONREDUCTION

```
DEFINE CRITERIONREDUCTION <number from (0,1)>
```

This setting specifies the looking time reduction compared to the basis window that is desired in order to say that the participant has habituated (see [meeting a criterion](meeting-a-criterion)).

This value is a multiplier between 0 and 1, exclusive. It can be expressed as a decimal with or without a leading zero.

An error is thrown if CRITERIONMET is used as a terminating condition without a definition of CRITERIONREDUCTION being present in the protocol.

## Looking time settings

In any live-coded experiment, including habituation, it is sometimes desirable to specify a minimum length of a look to a stimulus or away from it that should "count." This can be controlled with the COMPLETELOOK and COMPLETELOOKAWAY settings. See the section on the[ optional experimental settings](../../optional-experiment-settings#minimum-look-lengths) page for more information.
