NBack Task - Touchscreen

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: January 26, 2022

Last Modified: January 09, 2025 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements a touchscreen version of a simple nBack task, a measure of visual working memory. The implemented task uses a suit of ordinary playing cards as stimuli.

Researchers can set the level of of n-back task to run as well as the number of trials and ratio of targets to non-targets. The implemented script only runs the selected nBack level but could be customized to run more levels if needed.

Note the script runs with proportional sizing by default. Researchers can select to run the task with an absolute screen size to ensure that distances stay the same across devices. See section Defaults for more info.

References

1-Back Procedure With 42 Trials And Using Cards As Stimuli:
Maruff P, Thomas E, Cysique L, Brew B, Collie A, Snyder P, Pietrzak RH. Validity of the CogState brief battery: relationship to standardized tests and sensitivity to cognitive impairment in mild traumatic brain injury, schizophrenia, and AIDS dementia complex. Arch Clin Neuropsychol. 2009 Mar;24(2):165-78. doi: 10.1093/arclin/acp010. Epub 2009 Mar 25. PMID: 19395350.

General Reference For N-Back Procedure:
Jaeggi, Susanne M.; Studer-Luethi, Barbara; Buschkuehl, Martin; Su, Yi-Fen; Jonides, John; Perrig, Walter J. (2010). The relationship between n-back performance and matrix reasoning - implications for training and transfer. Intelligence, 38, 625–635.

Duration

4 minutes

Description

Participants get presented with a deck of cards (consisting of the regular 4 suits - 13 cards per suit) and the cards will be turned over one by one. Depending on the level of N tested (editable parameter), participants are asked to decide for each card whether the current card:

N=0: is the pre-defined target card (by default, it's the 10 of diamonds in this script) N=1: is the same as the card before it (= target) N=2: is the same as the card 2-cards before it (= target) etc.

If they think the current card is a target, they should press the 'Yes' response button. If they think the card is not a target, they should press the 'No' response button. Participants are instructed to respond as quickly and accurately as they can. Once a response button is pressed, the button is highlighted in yellow. After the card has been presented for 2seconds an animation is started that 'returns' the card back to the stack. The next trial is initiated once participants press a 'Home Button'. The 'Home Button' is implemented to ensure that response fingers are roughly equally distanced from both the no and yes button for each trial.

Procedure

Test: by default this script runs 1 testblock (Editable Parameter) with 42+ trials each (Editable Parameter)
using the 13 clubs cards (editable*). The script provides a brief resttrial (self-paced) after each block.

=> + trials are the N trials that cannot display target shapes yet (=start trials). Their numbers vary depending on N.
The data collected during these start trials are NOT included in performance counts
=> Of the actual 42 experimental trials, half of the trials present a target (Editable Parameter)

- The computer selects randomly
a) whether it is a target trial or not and
b) what card to show if it is not a target trial (cards are selected randomly with replacement with the constraint
that it cannot be the current target stim)

Trial Information:
-> each trial starts with a HomeButton press (reminder presented after 2s)
-> cards get uncovered for 2s, wait for response; if response is made, the response button is highlighted
to give response feedback, card animation is started after 2s regardless of response
-> card animation for 1000ms
If the homebutton is pressed at the end of the animation trial, the next card is uncovered immediately.

Stimuli

52 cards, see section Editable Stimuli
By default, only the 13 club cards are currently used for the task.
However, you can easily edit the list of cards.

A longer list likely makes the nBack less challenging as random repeats of nontarget cards
(in nontarget positions) are less likely to happen with a larger selection pool. Thus, any repeated cards
is much more likely to be a target.

Instructions

provided by Millisecond - can be edited under section Editable Instructions

Summary Data

File Name: singlenBacktaskShapesSummary*.iqdat

Data Fields

NameDescription
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
Play Setup
canvasHeightMM The width of the play area in mm
canvasWidthMM The height of the play area in mm
distanceHomeButtonResponseButtonMM The calculated distance (in mm) between center of homeButton and center of one of the response buttons
Parameter Settings
levelN Level of N tested
blocksPerTest Number of test blocks run
trialsPerBlock Number of trials per block to run
numberTargetTrialsPerBlock Number of target trials per block
numberNontargetTrialsPerBlock Number of nontarget trials per block
ratioTtoNT Ratio 'Target:nontarget'
Performance Data (Trial.Start Excluded)
propCorrectOverall Overall proportion correct (across all test blocks), across target and nontarget trials
countNROverall The number of no responses (timeouts) across target and nontarget trials
meanCorrRTOverall Overall mean correct response time (in ms), across target and nontarget trials
Per Block
propCorrectBlock1 Block1 proportion correct, across target and nontarget trials
countNRBlock1 The number of no responses (timeouts) across target and nontarget trials during block1
meanCorrRTBlock1 Block1 mean correct response time (in ms), across target and nontarget trials
Block2 And Higher (As Block1 Could Be Used As Practice, 'Block2' Uses All Performance Metrics Collected After Block1)_
propCorrectBlock2 Block2 proportion correct, across target and nontarget trials
countNRBlock2 The number of no responses (timeouts) across target and nontarget trials during block2
meanCorrRTBlock2 Block2 mean correct response time (in ms), across target and nontarget trials

Raw Data

File Name: singlenBacktaskShapesRaw.iqdat

Data Fields

NameDescription
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
Play Setup
canvasHeightMM The width of the play area in mm
canvasWidthMM The height of the play area in mm
distanceHomeButtonResponseButtonMM The calculated distance (in mm) between center of homeButton and center of one of the response buttons
n The current level N tested
blockCounter The total number of experimental blocks run
trialCounter Counts the target and nontarget trials per block ( start trials are excluded from count)
startTrialCounter Keeps track of how many start trials have been run
stimulusItem.1 The shape presented
stimulusNumber.1 The item number of the presented shape
currentTarget The item number of the current target
Custom Dvs For Main Nback Trials
rsp The Response of the participant
yes/no/NR = no response
acc The correctness of the response (1 = correct; 0 = otherwise)
rt How fast a participant responded within the given timeframe, if at all (in ms)
no responses => empty
list.blockAcc.mean Proportion correct during the current block (start trials are excluded from block acc assessment by design)
Built-In Dvs (Will Not Record Any Useable Performance Metrics For The Main Nback Trials)
response The Response of the participant
correct The correctness of the response (1 = correct; 0 = otherwise)
latency How fast a participant responded within the given timeframe, if at all (in ms)
no responses = the entire trialduration

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design Parameters
levelN Level of N tested
Instruction examples provided only for 0<=N<=3 (but the code allows for higher N as well)
1
blocksPerTest Number of blocks per test1
trialsPerBlock Number of n-back trials per block (excluding starttrials)42
proportionTargets Proportion of target n-back trials
parameters.proportionTargets * parameters.trialsPerBlock => should result into an integer
The script will calculate the number of target trials and round to the nearest integer
0.5
stimulusPresentationTimeMs The time (in ms) that the uncovered card is presented before the return animation starts
the animation adds another 1s to the procedure
2000
itemNumberTargetN0 The itemNumber of item.cards that is currently used as the target for N=0 trials
if this number if changed or if the card under itemNumber = 2 ( 0-based selection) is changed,
instructions need to change accordingly.
2
debugmode Debugmode = 1: targetAlerts are shown on screen,
debugmode = 0, no targetAlerts are shown (default)
0
Color Parameters
canvasColor Display color of the actively used portion of the screen (the 'canvas')
if set to a color other than the screenColor, you can distinguish the active canvas
from the inactive portion of the screen
black
screenColor Color of the screen not used by the canvas ('inactive screen')black
defaultTextColor Default color of text itemswhite
Sizing Parameters
cardSizePct The height of the cards in canvas height percentage 40%