Adding response-dependent feedback
Now we capture the response but would also like to provide feedback to the subject, if the response was correct or not. So, we need to define the feedback and modify the trial to include a feedback command.
First we define an additional feedback text
PICTURE Correct N
PICTURE Wrong N
PICTURE Late N
Second, we define a new screen location to show the feedback 3cm below the center. We have to create a screen position with coordinates x=0 and y=30 (mm):
POSITION FBpos P
0,30
Finally, we need to add a FB trial command to the trial definition.
TRIAL ShowWord
CS 2000 ; Clear Screen and wait for 1000 ms
RK ResKeys 3000 ; Activate Response Registration with MaxRt = 3000
SP ? Center 1 0 1 ; Show a variable Picture until response is done or end of MaxRt
FB ? ; Compare the response against the correct key
1:SP Wrong FBpos 1 1000 ; Show ‘Wrong’ for 1s if response is wrong
2:SP Correct FBpos 1 1000 ; Show ‘Correct’ for 1s if response is correct
3:SP Late FBpos 1 1000 ; Show ‘Late’ for 1s if response is correct
The FB command branches to one of the FP options depending on if the correct key has been pressed and the correct number of key presses has been issued. Feedback option 1 stands for wrong key, but correct number. And option 2 stands for correct key / correct number
The FB command introduces a new variable argument – the correct key. Depending on the stimulus, the X-key (left) or the M-key (right) might be correct. So, we need to extend the block definition to specify the correct key:
BLOCK ChoiceRT 2
1 ShowWord Left X ; Run Trial with ‘Left’ as the Picture and X as correct key
1 ShowWord Right M ; Run Trial with ‘Right’ as the Picture and M as correct key
The new script including response registration and response-dependent feedback looks like this:
PICTURE Left N
PICTURE Right N
POSITION Center P
0,0
KEY ResKeys
X M ; Define a Key Set consisting of’ ‘X and ‘M’
PICTURE Correct N
PICTURE Wrong N
PICTURE Late N
POSITION FBpos P
0,30
TRIAL ShowWord
CS 2000 ; Clear Screen and wait for 1000 ms
RK ResKeys 3000 ; Activate Response Registration with MaxRt = 3000
SP ? Center 1 0 1 ; Show a variable Picture until response is done or end of MaxRt
FB ? ; Compare the response against the correct key
1:SP Wrong FBpos 1 1000 ; Show ‘Wrong’ for 1s if response is wrong
2:SP Correct FBpos 1 1000 ; Show ‘Correct’ for 1s if response is correct
3:SP Late FBpos 1 1000 ; Show ‘Late’ for 1s if response is correct
BLOCK ChoiceRT 2
1 ShowWord Left X ; Run Trial with ‘Left’ as the Picture and X as correct key
1 ShowWord Right M ; Run Trial with ‘Right’ as the Picture and M as correct key
SesSION My First Experiment
RUNBLOCK ChoiceRT 10 ; Execute block ‘ChoiceRT’ with 10 trials in random order
Copyright 2021 - BeriSoft Inc.
All rights reserved