Remembering Random Dot Patterns Demo Experiment Run Experiment

Remembering Random Dot Patterns

Jaap Murre


The following experiment is a very much abbreviated version of a dot pattern learning experiment pioneered by Posner and Keele in 1968. Try to remember a number of random dot patterns and then see whether you can recognize them reliably. This is harder than you think!

If you are a registered user and signed in, you can here copy this script and its stimuli to your own account, where you can edit it and change it in any way you want.

It is absolutely free to register (no credit card info asked!). You can then instantly copy this experiment with one click and edit it, change its accompanying texts, its landing page, stimuli, etc. Invite your colleagues, friends, or students to check out your experiment. There is no limit on how many people can do your experiment, even with a free account.

The catch? There is no catch! Just keep in mind that with a free account, you cannot collect data. For teaching that is usually not a problem. For research, prepaid data collection (unlimited subjects) starts as low as €10.00 for a 10-day period.

var pattern = new Box(),
    coords = [[20,20],[30,40],[30,80],[40,30],[45,60], 
              [60,10],[60,75],[70,50],[80,20],[75,45]],
    no_of_targets = 5, study_time = 2000, series,
    hits = 0, false_alarms = 0, prototype_alarm = 0;

function showPattern(coords)
{
    var block, blocks = [], i;
    
    for (i = 0; i < coords.length; i++) 
    {
        block = pattern.addblock(coords[i][0],coords[i][1],10,10);
        block.text("•",200);
        blocks.push(block);
    }
    
    return blocks;
}

function distortCoordinates(coordinates,distortion,seed)
{
    var i,
        c = coordinates;
    
    distortion = distortion || 10;
    
    Math.seedrandom(seed);      // Make distortion repeatable with `seed`
    for (i = 0; i < c.length; i++) // Distort all coordinates
    {
        c[i][0] += randint(-distortion,distortion);
        c[i][1] += randint(-distortion,distortion);
    }
    
    return c;
}

function presentStimuli(indices,distortion)
{
    var c, i, p;
    
    for (i = 0; i < indices.length; i++)
    {
        p = indices[i];
        c = distortCoordinates(coords,distortion,p); // Use p as seed
        showPattern(c);
        await(study_time);
        pattern.clearall();                // Remove pattern from screen
        await(1000);
    }
}

function getResponses(indices,distortion)
{
    var c, i, p, e;
    
    for (i = 0; i < indices.length; i++)
    {
        p = indices[i];
        if (p === -1)
        {
            c = coords; // -1 means: show the prototype
        }
        else
        {
            c = distortCoordinates(coords,distortion,p); // Use p as seed
        }
        showPattern(c);
        e = awaitkey("s,l");
        
        if (e.key ===  "s") // Pattern believed to be old
        {
            if (-1 < p && p < no_of_targets)
            {
                ++hits; // Targets have indices 0,1,2, ..., no_of_targets-1
            }
            else
            {
                ++false_alarms;
            }
            
            if (p === -1)           // Prototype has index -1
            {
                ++prototype_alarm; // False recognition of prototype
            }
        }
        pattern.clearall();                // Remove pattern from screen
        await(1000);
    }
}

instruction("Study the following random dot patterns for later recognition. " 
          + "Patterns appear automatically.");
presentStimuli(range(no_of_targets),5);
instruction("Try to recognize the following patterns. "
          + "Type the 's' or 'S' for an old or 'seen' pattern and 'l' or 'L' for a new pattern");
series = shuffle(range(-1,2*no_of_targets));
getResponses(series);
text("You had " + hits + " hits and you recognized the prototype as " 
   + (prototype_alarm ? "old. That is, you though you recognized it, but you this was a false memory." : "new."));
This experiment has no files of this type
This experiment has no files of this type
This experiment has no files of this type
This experiment has no YouTube links
This experiment has no files of this type