Feedback
Experiments
Testable can display feedback to participants after each trial. Feedback text is defined in the **`feedback`** column and can include dynamic variables that show the actual response, reaction time, or accuracy.Two dependencies to know up front:
- Feedback runs only on
testandpracticetrials. It never fires onlearn,instructions, orformrows. - Feedback based on accuracy (
correct:/incorrect:messages) requires thekeycolumn: correct and incorrect are the result of scoring the response againstkey, so without it those messages never match.
Unconditional feedback
Section titled “Unconditional feedback”Set the feedback column to the text you want participants to see after every response:
feedback = Thanks! On to the next one.Feedback by outcome
Section titled “Feedback by outcome”Write key: message segments, separated by semicolons, to show a different message depending on how the trial ended:
| Key | When it appears |
|---|---|
timeout: ... | No response was given before the responseWindow deadline. Only meaningful when the trial has a deadline. |
[response]: ... | Participant gave that specific response (as it appears in results: a key token like a, a button number like 1) |
correct: ... | Response scored correct against key |
incorrect: ... | Response scored incorrect against key |
| bare text (no colon) | Catch-all, shown when nothing above matched |
feedback = correct: Well done!; incorrect: Try again.; timeout: Please respond faster.Segments are checked in the order of the table above (timeout first, then the specific response, then correctness, then the catch-all); the first match is shown, and if nothing matches the feedback screen is skipped entirely.
Per-response messages
Section titled “Per-response messages”Using the response itself as the key works with response labels too. For buttons Cat and Dog:
feedback = Cat: You chose the cat.; Dog: You chose the dog.Feedback variables
Section titled “Feedback variables”Use %variable% placeholders in your feedback text. These are replaced with the participant’s actual values when the trial runs.
| Variable | Value |
|---|---|
%response% | The participant’s response |
%RT% | Reaction time in ms |
%correct% | 1 if correct, 0 if incorrect |
Examples:
feedback = Your reaction time was %RT% ms.feedback = correct: Correct! You pressed %response% in %RT% ms.; incorrect: Incorrect.Historical trial variables
Section titled “Historical trial variables”You can reference responses from earlier trials:
| Variable | Retrieves |
|---|---|
%response3% | Response from trial file row 3 |
%response-1% | Response from the previous trial |
%response[trialA]% | Response from the trial labelled trialA |
Computed aggregate feedback
Section titled “Computed aggregate feedback”Display summary statistics computed over a range of trials:
Syntax: %variable.function[range]%
variable:RTorcorrectfunction:mean(oravg),modal,sum,min,max,perc(percentage correct),count(number correct)range: a list[2,3,4]or a range[-5_0](last 5 trials up to and including current)
Examples:
feedback = Your mean RT over the last 10 trials: %RT.mean[-9_0]% msfeedback = You got %correct.count[2,3,4,5]% out of 4 correct.feedback = Accuracy: %correct.perc[-49_0]%%How feedback is displayed
Section titled “How feedback is displayed”feedbackTime: how long, and how the screen ends
Section titled “feedbackTime: how long, and how the screen ends”A number is a duration in ms; the feedback shows for that long, then the trial ends automatically:
feedbackTime = 1500With feedbackTime left empty, the feedback does not auto-advance: a NEXT button is shown, and the participant clicks it to continue.
feedbackOptions: where it appears
Section titled “feedbackOptions: where it appears”| Value | Effect |
|---|---|
| (empty) | Feedback appears after the stimuli are cleared |
center | Feedback is centred on screen |
sameScreen | The stimuli and buttons stay visible under the feedback instead of being cleared |
These two flags are the only options; anything else in the cell is silently ignored. To colour the feedback text, use the color column (see Other Visual Content).
Adding images to feedback
Section titled “Adding images to feedback”You can display images in the feedback column using HTML. First upload the image to your project’s Stimuli tab, then reference it:
feedback = <img src="stimuli/yourImageName.png">For condition-specific image feedback:
feedback = correct: <img src="stimuli/correct.png">; incorrect: <img src="stimuli/incorrect.png">Next steps
Section titled “Next steps”- Timing Parameters: control when feedback appears relative to trial timing
- Using Variables: full reference for all variable types