N-back Sequence Generator
N-back stimulus lists with an exact number of targets and lures, and a CSV answer key.
How it works
Builds the item list for an n-back task: positions on a 3 × 3 grid, digits or shapes, with an exact number of targets (the item equals the one N steps back) and optional lures (equal to the item N−1 or N+1 back, a common source of false alarms). Every item is checked so that no accidental targets or lures sneak in. The result is the answer key as a table and CSV — the same generator Mindquarry uses for its n-back exercise.
- Targets: round(target share × (items − N)) positions after the first N items are drawn at random; a target copies the item N steps back.
- Lures: drawn from the remaining positions; a lure copies the item N−1 or N+1 back but never equals the item N back. If no such value is free at a position, the lure moves to the next free position.
- Every other item (a filler) is drawn from the stimuli that are neither N back nor N±1 back, so the key never contains accidental targets or lures; the counts in the result are recounted from the final list.
- Randomness comes from a seeded sfc32 generator, so the same inputs always give the same sequence.
Practising these tasks makes you better at these tasks; it does not prove that memory, intelligence or everyday life improve.
Sources
- Kirchner, W. K.: Age differences in short-term retention of rapidly changing information (Journal of Experimental Psychology, 1958) (American Psychological Association)
- Jaeggi, Buschkuehl, Perrig, Meier: The concurrent validity of the N-back task as a working memory measure (Memory, 2010) (Taylor & Francis)
- Simons, Boot, Charness et al.: Do “Brain-Training” Programs Work? (Psychological Science in the Public Interest, 2016) (SAGE / Association for Psychological Science)
Part of Mindquarry
-
Mindquarry Brain-training practice
Short memory, attention and reasoning exercises that adapt to you. Free and private.
Related tools
- Reaction Time Statistics – Mean, median, SD and outlier-trimmed reaction times from a pasted list of milliseconds.
- Schulte Table Generator (Printable) – Printable Schulte tables from 3 × 3 to 9 × 9: shuffled numbers to find in order, as SVG.
- Pattern Matrix Puzzle Generator – Generate a 3 × 3 figure-matrix puzzle with 8 options and a checked, unique answer.
How to use the N-back Sequence Generator
Build n-back item lists with an exact number of targets and optional lures — positions, digits or shapes — and download the answer key as CSV.
What it is for
In an n-back task, items appear one by one and you answer “match” whenever the current item is the same as the one N steps back. Writing a good sequence by hand is surprisingly fiddly: you want a fixed number of matches, you do not want accidental matches, and you may want lures — items that equal the one N−1 or N+1 back, which tempt people into false alarms.
This tool builds such sequences for you: for a class demonstration, a paper-and-pencil exercise, your own experiment, or to check how the n-back exercise in Mindquarry works. It uses the same generator as the app.
Worked example
The first example asks for a 2-back sequence of 30 positions on a 3 × 3 grid with 30 % targets and 10 % lures. The first two items cannot be scored (nothing is 2 back yet), so 28 items are scorable: 30 % of 28 gives 8 targets, and 10 % gives 3 lures. The sequence starts bottom right, top, bottom left, top right …; item 8 (bottom) is the first match, because item 6 was also bottom.
The second example — 3-back digits, 40 items, 25 % targets, no lures, seed digits-3 — has 37 scorable items and 9 targets. It starts 0 4 4 8 1 4: the sixth digit, 4, is a match because the third digit was 4. The repeated 4 at positions 2 and 3 does not count: only the item exactly 3 steps back matters.
How to read the result
- Targets / Lures / Scorable items are recounted from the finished list, so they are exactly what the answer key contains.
- Answer key shows each item, the correct answer (“match”, “no match”, or “—” for the first N items) and which items are lures.
- Download answer key (CSV) has the columns
index, stimulus, value, target, lure(1/0).valueis the number of the position (0 = top left … 8 = bottom right), digit or shape.
Tips and common mistakes
- Targets around 25–33 % is typical; with 50 % people learn to press half the time and the task gets easier.
- Lures make the task noticeably harder; leave them at 0 % when you explain n-back to beginners.
- With N = 1 the only possible lure is 2 steps back.
- If the result warns that not all lures fitted, use more items or fewer targets.
- Keep the seed if several people should get the same list; change it for every new run.
- Count your score only on the scorable items, and count misses and false alarms separately — they mean different things.
FAQ
Is this the “dual n-back” that is said to raise intelligence?
It builds single-stream sequences (one kind of stimulus). Claims that n-back practice raises intelligence have not held up in large reviews; you mainly get better at n-back. Use it as a task to practise or study, not as an IQ booster.
Why are the first N items never targets?
A target means “the same as N steps back”. For the first N items there is nothing that far back yet, so they can only be watched and remembered.
Can I use letters instead of digits or positions?
Not in this tool. Letters depend on the alphabet of each language, while positions, digits and shapes read the same everywhere.
How do I score a session?
Compare each answer with the key: hits (match on a target), misses, false alarms (match on a non-target) and correct rejections. Accuracy over the scorable items is the simplest summary; Mindquarry counts a block as passed at 80 %.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://mindquarrynbacksequence.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://mindquarrynbacksequence.usefulweb.site/mcp· tool namemindquarry_n_back_sequence
Example request
curl -s -X POST https://mindquarrynbacksequence.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"n":2,"length":30,"targetPercent":30,"lurePercent":10,"stimuli":"positions"}'