Basic 1-Back Task Demo Experiment Run Experiment

Basic 1-Back Task

Jaap Murre

Brief demo of a 1-Back Task to get a feeling for how this task is often implemented. Stimuli are digits 1, 2, and 3 and order is fully random (and may differ per subject). Feedback is given at the end. Runs with keyboard, mouse, and touch screen.


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 i, e, current, last, correct = 0, same_ones = 0, incorrect = 0,
    same = addblock(44,90,12,7).button("Same");

main.setfontsize(60);
instruction('Watch the numbers on the screen. If a number equals the one <b>just seen before</b>, '
    + 'tap or click the "Same" Button or press the space bar. Else, do nothing.<br /><br />'
    + 'When you click OK below, the experiment will start immediately.');
await(1000);
    
for (i = 0; i < 20; i++)
{
    current = randint(1,3); // random number 1 to 3
    text(current,300);
    
    if (current === last){
        ++same_ones;
        console.log("Same");
        
        waitfor {
            e = same.await('click',1000);
        } or {
            e = awaitkey(' ',1000);
        }
        
        if (e.type !== 'timeout') {
            ++correct;
            console.log("correct: ",correct," out of ",same_ones);
        }
    }
    else {
        waitfor {
            e = same.await('click',1000);
        } or {
            e = awaitkey(' ',1000);
        }
        
        if (e.type !== 'timeout') {
            ++incorrect;
            console.log("false alarms: ",incorrect);
        }
    }
    last = current;
    clear();
    await(1000);
}

text('You had ' + correct + ' out of ' + same_ones + ' similar ones correct '
   + 'and you responded ' + incorrect + ' times when the digits were in fact different.');

same.button('Exit').await('click');

You can download the files as follows: Click on the file (link) and then right-click and choose Save as... from the menu. Some media files (e.g., sound) will have a download button for this purpose.

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