Differential feedback depending on the participant's response
Hello,
I'm new to OpenSesame and I'm making an interesting memory experiment. So, I would really appreciate some help .
Short description: participants learn maps, and then they need to reproduce the path in 2D and 3D. The thing is that I need to give them different feedback depending on what kind of mistake they made, i.e. correct resoponse is forward, incorrect left or right. If they turn left, the red X (mistake) should appear on the left, if they turn right - on the right.
I made the first part of the experiment (the maps are drawing nicely), but when it comes to participant input, I don't know how to provide differential feedback. Feedbacks are also images.
What I've done so far:
1. Made the variables with image names and correct responses for each one.
2. Made two variables with incorrect responses (each point of decision has one correct and two incorrect optinos)
3. Made two variables with image names for corresponding incorrect responses (i.e. what should appear if the participant goes right and what if goes left).
I did all of this because I thought I could handle the problem in inline script with a few if statements (very very very basic Python knowlegde), but it seems that it's not going to be that easy.
I attached a screenshot of what I did with the variables.
Thank you in advance!
Marija
Comments
Hi Marija,
You could add 2
sketchpad
s to yoursequence
, one for each type of error. So, in thatsketchpad
you present the images, eitherimage_error_1
orimage_error_2
. Next, in the tab of thesequence
you can set thesesketchpad
s to run only if a type 1 error or type 2 error occurred, respectively (in therun if
field: [response] = [error1]`).If you want to do this with
inline_scripts
it works a little differently. it won't be very hard, but I don't really understand how yoursequences
are structured, so that I can't really help you there yet. Anyway, thesketchpad
solution should be working just fine.Let me know if you need more help.
Eduard
Yes, that solved the problem. Unfortunately, partially - when the participant makes a mistake, I need it to get back on the same stimuli, not to continue.
I tried to put a condition on the sequence of images "rep slike" run if [response] = [correct_response], but then I have another kind of problem - how to run the first image.
Look at the variables I attached: (I also attached a few images, just for you too see how the experiment looks like).
1Z is start position image. Correct response is 8 (it was up, but I changed it, see below). Incorrect are 4 (left) and 6 (right). I can't write the previously mentioned run if, because than it won't start, and if I delete the condition, than after the feedback, the experiment runs the next image in the sequence, i.e. draws the path on itself.
Another thing - not sure if it's because my experiment doesn't work properly, but something's wrong with keyboard response. I allowed all the arrows (LEFT;RIGHT; etc, right? I checked allowed responses, it should be it), but te experiment does not react to keypresses properly, it reacts only when I press two times - tried it also with numbers.
Course, I should think about it more myself tomorrow, but if you have any idea that jumps into your mind quickly, it would be appreciated.
Thanks!
What I actually need is a condition not to show the next picture unless correct response is given, with the exception of the first one.
Could I place the condition in the sequence tab (run if), or I have to edit the script?
Ok, now I'm definitely stuck - even the feedback the way you said me to put it doesn't work. Duration for the "rep_slike" is 0 (solves the double press problem), for the feedbacks is 200 ms, and when I run it, it just shows the images from the rep_slike (variable zel_ul_repr) on any keypress, both correct and incorrect.
I just can't find the mistake.
Maybe somewhere in the sequence? Should I try to place the feedback variables out of the sequence?
Hi,
Would you mind uploading the experiment, so that I could have a closer look? Your intuition sounds actually pretty good. Proceeding with the next image, only if the previous response was correct should be the best way to tackle the problem. Unfortunately, quite a few things can go wrong making this work. If I could play around with your experiment, I might be able to fix it.
Thanks,
eduard
Here it is.
Thank you very much for the effort!
Hi,
I think the reason why the feedback doesn't work is either due to a type conflict, or an upper/lowercase conflict. What are the correct responses currently? 2,4,6,8 or UP, LEFT, RIGHT, DOWN? If you use the numbers, they are probably stored as integers in the
loop table
, but as strings when you press the keys. So in order to check whether a response was correct, you have to convert one of them to the type of the other, e.g. in theloop table
, you can not put 2,4,6,8 as correct responses, but '2','4','6','8'.If you use UP, LEFT; RIGHT and DOWN, you have be aware that
'down' != 'DOWN'
, a response is collected as 'down', so in theloop table
you should also use this one.Finally, your main issue, I think what you could do to only proceed with the route when the correct answer was given, is to add an
inline_script
to the end of your lastsequence
and add this code in therun phase
:This inline_script should only be run if a incorrect response was given, so in the
run if
field, you have to add both conditions of the error images, connected with an or (as either one or the other has to be true, to trigger the trial to be repeated).Does this make sense?
Eduard
Yes, it was the upper/lower case conflict - I just thought because you can specify the left arrow in allowed response both ways ('left' and 'LEFT'), it would be the same in the loop variables.
Thank you very much! It works!
Best,
Marija