Introduction

The Mackworth clock test (Mackworth, 1948) assesses people’s vigilance. Vigilance is a state of concentration that helps people to detect specific events when not much is going on.

For example, in real life, a guard must be vigilant when looking after something. That can be hard when you are standing guard for hours, when it is at night and it is quiet. Vigilance is difficult because it gets quite boring, because typically nothing happens.

Vigilance is necessary in a number of jobs, such as guards and air traffic controllers.

The Mackworth clock test was originally designed as a physical real device (looking like a clock), although computer based versions have later been developed (Lichtstein et al., 2000).

About this implementation

Watch the clock hand move around. When the hand jumps more than normally, press the space bar immediately. You will get an error signal (red light) when you press the space bar when there was no unusual clock hand jumping or when you failed to detect it. You get positive feedback (green light) when you press the space bar correctly.

Note that you must respond quickly (within 1 s).

Also note that the likelihood of a "jump" of the clock hand is in this implementation around 10%, whereas in the real task it is just over half a percent!!! You can easily change this in the code by changing the line with the instruction with the random number. Change it from set &randomnumber random 1 10 to set &randomnumber random 1 150.
You can easily adapt this task, you can change the number of steps in a circle, the speed, etc.

Run the demo

In this example, you will

Data output file

In PsyToolkit, the data output file is simply a textfile. The save line of the PsyToolkit experiment script determines what is being saved in the data output file. Typically, for each experimental trial, you would have exactly one line in your text file, and each number/word on that line gives you the information you need for your data analysis, such as the condition, response speed, and whether an error was made.

Meaning of the columns in the output datafile. You need this information for your data analysis.

Colum Meaning

1

reaction time. should be 1000 most of the time (that is the "timeout" time)

2

status (should be 3 most of the time, that is, no key was pressed and the status is "timeout")

3

the current position of the hand (in tenth of degrees)

4

a random number between 1 and 10 (if it is 10, there is a bigger jump of the clock hand)

5

value 1 means this trial had a correct detection (only relevant if column 4 has value 10)

6

value 1 means that this trial had an incorrect detection (i.e., space bar pressed, even though there was nothing to detect)

7

value 1 means missed detection (the participant failed to press space bar

PsyToolkit code

Click to expand the PsyToolkit script code (part of zip file below)
options
  fullscreen

bitmaps
  instruction
  clock_circle
  clock_hand

fonts
  arial 18

task vigilance
  keys space
  ## -- update hand location (steps of 3.6 degrees)
  ##    note: a skip does never repeat
  set &randomnumber random 1 10
  set &hand_position increase 36
  if &randomnumber == 10 && &skipped == 0
    set &hand_position increase 36 ## increase a bit more 1 in 10 times
    set &skipped 1 ## skipped is 1 when previous trial was a skip
  fi
  if &randomnumber < 10
    set &skipped 0
  fi
  if &hand_position >= 3600
    set &hand_position 0
  fi
  ## -- now draw clock
  draw off
    show bitmap clock_circle
    rotate next &hand_position
    show bitmap clock_hand 0 0
    if &missed_detection == 1 ## of previous trial, show feedback now
      show circle 0 0 30   255 0 0 ## negative feedback (should have pressed in previous trial)
      set &missed_detection 0
    fi
  draw on
  ## -- now wait for key press (often people should not respond
  readkey 1 1000
  if RT < 1000
    if &randomnumber == 10
     show circle 0 0 30   0 255 0 ## positive feedback
     set $correct_detection 1
    fi
    if &randomnumber < 10
     show circle 0 0 30   255 0 0 ## negative feedback (should not have pressed)
     set $incorrect_detection 1     
    fi
    set $resttime expression 1000 - RT
    delay $resttime
  fi
  if STATUS == TIMEOUT && &randomnumber == 10
    set &missed_detection 1 ## show error message in next trial
  fi
  ## -- save data
  save RT STATUS &hand_position &randomnumber $correct_detection $incorrect_detection &missed_detection

block test
  message instruction
  maxtime 5m
  tasklist
    vigilance 999999
  end
  feedback
    set &total_ticks count ; select c4 > 0
    set &missed_ticks count ; select c7 == 1
    set &wrong_ticks count ; select c6 == 1    
    text align left
    text color yellow
    text -290 -200 "Feedback about your vigilance"
    text color white
    text -290 -100 &total_ticks ; prefix "Total ticks: "
    text -290 0 &missed_ticks ; prefix "Missed skips: "
    text -290 100 &wrong_ticks ; prefix "Wrongly detected skips: "
  end

Download

If you have a PsyToolkit account, you can upload the zipfile directly to your PsyToolkit account. Watch a video on how to do that. If you want to upload the zipfile into your PsyToolkit account, make sure the file is not automatically uncompressed (some browsers, especially Mac Safari, by default uncompress zip files). Read here how to easily deal with this.

Further reading

  • Mackworth, N. H. (1948). The breakdown of vigilance during prolonged visual search. Quarterly Journal of Experimental Psychology, vol. 1, pp.6-21

  • Lichstein, K. L., Riedel, B. W., & Richman, S. L. (2000). The Mackworth clock test: A computerized version (statistical data included). The Journal of Psychology.