Template: Habituation Paradigm
Habituation Paradigm

Required Experiment Builder Version: 1.5.58 or later
EyeLink Required: Yes
Type: Complete Example
Difficulty Level: Advanced

This example illustrates:
  • How to collect of participant's info prior to experiment (see Collecting Participant Information for a simpler example)
  • How to use Custom Class to get online calculation of time on image
  • How to use Recycle Data Line node to recycle the same trial
  • How to use Results File node to save results to a TXT file

This example is created after the following article with modifications.
  • Cohen, L. B., & Cashon, C. H. (2001). Do 7-Month-Old Infants Process Independent Features or Facial Configurations? Infant and Child Development. 10, 83-92.
Each trial is preceded with a five-point calibration (using an animated video clip as the calibration target). Press [C] to start a calibration or press [O] to skip that. Each trial starts with a presentation of an attention-getter stimulus ("useAttentionGetter" is True) on the computer screen. Once the experimenter decides that the participant is looking at the computer screen, press the [Spacebar] on either the Host or Display keyboard to start the presentation of an image. Each habituation and test trial continues until ("subjectControlledTrialLength" is True) the participant has looked for a total of 20,000 ms ("maxTrialLength"), or has looked away for at least 1000 ms ("minimumLookAwayTime"). The minimum looking time for each trial is set to 2000 ms ("minimumLookTime").

The experimental session is divided into pre-test ("phaseCode" in datasource attached to the EXPERIMENT_TRIALS sequence as 0), habituation ("phaseCode"=1), and test phases ("phaseCode"=2). On the first trial, the participants are shown a pre-test image to adapt them to the procedure. During the habituation phase, participants are habituated to four different images. Order of presentation of the images can be arranged through the DataSource editor. This phase continues ("useCriterionToEnd" is True) until participants' looking time on four ("criterionWindowSize" = 4) consecutive trials ("useSlidingWindow" is True) dropped to 50% ("habituationCriterionPercent" = 50) of the looking time on the first four trials ("criterionBasedOnFirstNTrials" is True). Order of presentation of the test images are counterbalanced - the "version" column in the "Experiment_TRIALS" sequence is used for this purpose.

**Additional detailed information about the project is given in the notes section for most nodes. To see notes for a given node, either mouse over that node or click on it to display the notes window. If the notes window is not visible, go to the "View" drop down menu in Experiment Builder, select "Properties", and check "Note".

NOTE: See Implementing Habituation Procedures in Experiment Builder Webinar for a non-Custom Class version of the Habituation Paradigm.

  1. Download the Habituation.ebz example.
  2. Launch the Experiment Builder application.
  3. Unpack the Habituation.ebz file to a location on your Experiment Builder PC with "File menu -> Unpack".
  4. Open the project in Experiment Builder.
  5. Deploy the project to a new folder.
  6. Run the Habituation.exe from the deployed directory.

.ebz   Habituation.ebz (Size: 20.82 MB / Downloads: 42)

The following is a list of configurable variables contained in the topmost layer of the experiment graph.
  • minimumLookTime is the shortest amount of time the participant should look at the screen to have it count as a trial. Default value 2000 (ms).
  • minimumLookAwayTime is the shortest amount of time the participant can look away from the screen and have it count as the end of the trial (it is possible that the participant may look away briefly but immediately return his/her attention back to the screen). Default value 1000 (ms).
  • maxNoLookTime is the longest time a participant can NOT look at the screen at all during the trial, before the computer restarting the trial. Default value 4000 (ms). It is possible that the participant looks at the attention getting stimuli but when the trial starts, the participant will look away before he or she has looked for the minimumLookTime. The maxNoLookTime prevents the occurrence of artificial short looking times that result because the participant didn't start looking at the screen until it was nearly over. If the maxNoLookTime is exceeded, the computer simply doesn't count the trial. It starts the trial over again (i.e., trial recycled).
  • subjectControlledTrialLength - if true, the computer will stop the trial if the participant looks away for longer than the minimumLookAwayTime set. In this way, the participant controls how long the trials last. Default: True (checked).
  • maxTrialLength sets the length of the habituation trial. The trial will end if the maximum presentation duration of the stimulus is reached - this obviously should be based on the experiment materials used. Default 20000 (ms).
  • useCriterionToEnd, if True, the computer will use a criterion to determine whether the habituation phase should end and move to the test phase of the experiment. The criterion will be based on the participant's look time. Default: True (checked).
  • criterionWindowSize determines how many trials are included in a window to calculate the look time for the criterion trials and current series of trials. Default: 3 (trials).
  • habituationCriterionPercent: If using a criterion to end the habituation phase, the program needs to calculate the look time of the criterion trials, and current few trials based on the criterionWindowSize value. If the look time for the trials in the current window is less than the intended percent value of the criterion trials, the participant is deemed habituated. Default: 50 (%).
  • useSlidingWindow, if true, the average of looking times will be computed on any N-trial (N determined by "criterionWindowSize") consecutive looking times, including those that were used to compute the initial average. If this is set to False (unchecked), the times in the later average will not overlap with the times in the initial average (i.e., a fixed window stepping every N trials). Default: True.
  • criterionBasedOnFirstNTrials, if true, the computer will average the first N trials (N determined by "criterionWindowSize") of habituation to use as the standard for determining the criterion. If this is false, the computer will average the N trials with the longest looking times to use for computing the criterion (that is, it this is based on N trials with longes look time). Default: True.
  • haveQuestionaire, if true, a series of questions will be asked to gather the participant information. Default: True.
  • useAttentionGetter, if true, each trial will start with an attention-getter screen. Default: True.
  • useFillerTrial, if set to True, filler trials will be arranged every N trials (settable through "fillerTrialEveryNTrial"). Default: True.
  • fillerTrialEveryNTrial sets how often the filler trial is displayed. Default: 4 (trials).

Data Output:
The software accumulates the duration of eye data on screen. So, this includes both fixation and saccades made onto the screen. If you look at the data output in EDF file, the "current_trial_look_time" will be typically 10% to 20% higher than the DWELL_TIME reported from the interest area report. This is expected because the saccade duration are also included in the current_trial_look_time. The following outputs are available in the RESULT_FILE and EDF file.
  • trial_index: This variable is used to keep track of the number of combined pretest, habituation, and test trials the participant sees through.
  • trial_type: This variable is used to tell between the "filler" trials (filler trials) and "non filler trials" (pretest, habituation, and test trials).
  • trial_end_method: This variable is used to encode how the trial was ended (by time out, participant look away, key press, recycled for not able to look).
  • trial_recording_stage: This variable is used internally to encode the stage of the trial (from the pre-stimulus attention getter, stimulus presentation, and end-of-trial data processing).
  • criterion_look_time: This variable stores the look time across the criterion trials.
  • criterion_time_debugging_list: This stores the look time for all of the trials in the criterion window.
  • current_trial_look_time: This reports the total amount of time looking at the screen.
  • current_trial_look_segments: This is a list used to store the total onscreen look time in each of the segment (participant looks away for a minLookAwayTime but the trial still remains on for reasons like fixed trial length, or the initial look time too short and the trial is kept because of the "Maximum No-Look Time" setting).
  • current_window_look_time: This stores the look time across trials in the current Window of N trials.
  • current_window_time_debugging_list: This stores the look time for all of the trials in the current window.
  • habituated_or_not: This reports whether the participant is habituated or not.
  • currentTestDate: This reports the date of test in a string format.
To modify the project for your actual experiments, you will need to add the intended audio clips, images, and video clips (better in .XVD codec) into the library (Edit -> Library Manager). Click on the Data Source attached to EXPERIMENT_TRIALS sequence to see the actual experiment setup. Each line represents one single trial. Please set the "Split by" value accordingly based on the intended number of trials (pretest, habituation, and test trials) to run (excluding the filler trials). The Data Source editor includes the following columns.
  • trialImage: the name of the image
  • trialAudioClip: audio clips used (if no wavefile to be used, simly use "empty.wav")
  • phaseCode: the phase code (0 for pretest; 1 - for habituation, and 2 - for test)
  • phaseLabel: a string label to explain what the code is for - please make sure the label should go with the phaseCode value
  • trialInterestAreaFile: the name of the interest area file.
  • condition: any label that used to describe the trial
  • Version: if you need to run multiple version of the experiment. Add all of the datasources here.