This repository provides a Counting Span Task implemented with the jsPsych library. The task is a behavioral assessment used to measure working memory capacity by requiring participants to perform a simultaneous processing and storage task.
The task requires participants to process visual information (counting) while maintaining the results in memory for later recall.
- Stimuli: Images containing blue circles, blue squares, and yellow circles appear on the screen.
- Counting Phase: Participants are instructed to count the blue circles aloud.
- Memorization: After counting an image, the participant must memorize the result before the next image in the set appears.
- Recall Phase: After a set of images is presented, the participant must recall all memorized numbers in the correct order.
- Progression: The task begins with sets of 2 images, increasing by one image in each subsequent set, up to a maximum of 6.
- Scoring Logic:
- If the recall is correct, the researcher presses SPACE to proceed to the next set level.
- If the recall is incorrect, a new run must be started by pressing S.
- The score for a run is the length of the last correctly recalled set.
- The final Counting Span is the arithmetic mean of three separate runs.
Upon completion, data is automatically downloaded in .csv format. The file includes the following key variables:
| Variable | Description |
|---|---|
success |
Indicates if fullscreen mode successfully started/ended. |
rt |
Reaction time for the specific trial in ms. |
run |
Current run number (0 for practice, 1–3 for main runs). |
level |
The number of images presented in the current set. |
trial_within_level |
The index of the current image within the set. |
correct |
Accuracy of the response (1 = correct, 0 = incorrect). |
run[1-3]_last_correct |
The level of the last correct set for each specific run. |
counting_span |
The final result (mean of the three runs). |
- Language Support: The language can be modified in
parameters.js. Currently available: English (en) and Hungarian (hu). - Deployment: Can be run via
index.htmlin either theofflineoronlinefolder. - Browser Compatibility: Compatible with most modern browsers (Chrome recommended). Safari and Internet Explorer are not supported.
If you use this script in your research, please include the following citation: Vékony, T. (2022). Counting Span Task created with jsPsych. [Computer software].