Skip to content

Laboratory of Neuropsychology

Delayed Match-to-Sample Task

A delayed match-to-sample (DMS) task requires a subject to remember the sample stimulus and identify it from a set of stimuli presented subsequently. In this version of the DMS task, a trial begins with an eye fixation. When the subject successfully fixates on the white circle shown at the center of the screen, an image ("sample") is displayed briefly, turned off and followed by a delay period. At the end of the delay period, two images ("match" and "distractor") are presented on both sides of the screen and the subject is required to indicate her/his choice by making a saccade eye movement to the chosen target. If the choice is correct, a reward is delivered. Then, an inter-trial interval begins.

DMS Conditions File

The above figure is an example conditions file necessary to implement the task. Conditions 1-4 are included in Block 1 and Conditions 5-6 are included in Block 2. In Block 4, all 8 conditions can be run. Each condition defines 4 stimuli (fixation cue, sample, match and distractor) and they are controlled by the "dms" timing script.

DMS Timing Script

The timing script written for this example is under the "task\runtime v1\1 dms" task. The script shows how you can present stimuli and monitor behavioral response. In the runtime library version 1, this is done by the toggleobject and eyejoytrack functions.

In the above code, toggleobject turns on "fixation point" and marks a code of 10 in the data file with a timestamp. Then eyejoytrack waits until the eye fixation is made. If the fixation is not made within the "wait_for_fix" time (i.e., ontarget is 0), we turn off the fixation point, record the trial result and return. Otherwise, the task proceeds to the next code and another eyejoytrack checks if the fixation is held.

The same job can be scripted in a different way with the runtime library version 2. In the runtime v2, the toggleobject and eyejoytrack functions are replaced with create_scene and run_scene, like the following. The entire code of the runtime v2 example is in the "task\runtime v2\1 dms with new runtime" directory.