Skip to content

mgdicesare/corsi-block-tapping-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digital Corsi Block-Tapping Test (Forward & Backward)

This repository provides a digital implementation of the Corsi Block-Tapping Test, a well-established neuropsychological task used to assess visuospatial working memory.

The implementation is designed to be:

  • experimentally sound
  • reproducible
  • suitable for research and educational use

The task is implemented in Python using Pygame and supports both Forward and Backward variants within a single codebase.


🧠 Task Overview

In the Corsi Block-Tapping Test, a sequence of spatially distributed blocks is presented to the participant.
After the presentation, the participant must reproduce the sequence by clicking on the blocks.

Forward Version

  • The sequence must be reproduced in the same order as presented.

Backward Version

  • The sequence must be reproduced in reverse order.

The two versions share the same stimulus presentation and differ only in the response rule.


🧪 Experimental Protocol

  • Number of blocks: 9
  • Starting span: 2
  • Span increases by 1 after successful completion
  • Each span consists of 2 independent trials
  • If both trials are incorrect, the task terminates
  • Maximum response time per trial: 10 seconds
  • Visual feedback is provided after each trial
  • An acoustic cue marks the transition from stimulus to response phase

🎮 User Interaction

  • Blocks are highlighted sequentially during stimulus presentation
  • During the response phase, blocks briefly highlight on click
  • The same block can be clicked multiple times during a response
  • The task runs in fullscreen mode for controlled visual presentation

📁 Output Data

For each trial, results are saved to a CSV file with trial-level granularity.

CSV Fields

  • subject_id
  • mode (forward / backward)
  • span
  • trial
  • sequence_shown
  • sequence_response
  • correct
  • timestamp

Example filename:

ABCDEF_corsi_forward_results.csv

Sequences are stored using the | separator (e.g. 2|5|7) to avoid automatic date conversion issues in spreadsheet software such as Microsoft Excel.

Result files are intentionally excluded from version control.


▶️ How to Run

Requirements

  • Python ≥ 3.8
  • pygame
  • numpy

Install dependencies:

pip install pygame numpy

Run the task:

python corsi_block_tapping_test.py

To switch between Forward and Backward versions, modify the MODE variable in the code:

MODE = "forward"   # or "backward"

🔊 Audio Cue

An audio cue (start.wav) is played before the response phase to clearly signal task onset.
The audio file is included in the repository.


⚠️ Notes on CSV and Excel

Spreadsheet software such as Microsoft Excel may automatically convert certain strings into dates.
To prevent this, sequences are stored using a non-date separator (|).


📚 References

  • Corsi, P. M. (1972). Human memory and the medial temporal region of the brain.
  • Kessels, R. P. C., et al. (2000). The Corsi Block-Tapping Task: Standardization and normative data.

📖 Citation

If you use this implementation in academic research, experiments, or publications,
please cite this repository as follows:

Di Cesare, M.G.
Digital Corsi Block-Tapping Test (Forward & Backward).
GitHub repository.
https://github.com/mgdicesare/corsi-block-tapping-test

Proper citation ensures reproducibility and acknowledges the original implementation.

📄 License

This project is intended for research and educational purposes.

About

Digital implementation of the Corsi Block-Tapping Test (Forward & Backward) with trial-level logging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages