Mouse tracking issue
Hi there,
I am currently programming an experiment implementing a modified version of the dictator game and participants are asked to play against the computer. I'm using the Mouse trap plugins to collect responses. So far so good, everything is working as expected with one small (but important) exception:
On each trial, the participant is presented with two response buttons displaying 2 values (e.g., 8 & 10 or 10 & 10). For every value combinations, both buttons are active and working properly. But, when both buttons are displaying the same value (e.g., 10 & 10), the left button is always inactive and it is impossible to click on it. I suspect that I missed something (probably obvious) here.
Any hints ?
All the best,
CL
Comments
Hi CL,
sounds like a cool experiment!
I think I know the source of the problem: when you specify the name of the button that is logged, I assume that you are using the value that is displayed for that button (which is what we usually recommend to do). However, in case that both buttons show exactly the same value, this will lead to problems because mousetrap cannot differentiate between the buttons anymore.
So, in your special case it might make sense to set name to name=OptionA and name=OptionB and add a little bit of Python code afterwards (using the run phase of an inline_script inserted directly afterwards) to save the values, e.g.:
(assuming that the values you displayed are stored in the variables amounta and amountb)
Best,
Pascal
PS: I will think about whether there is a general solution for that within the mousetrap plugin, so this can be solved differently in the future.
Dear Pascal,
Many thanks for the quick answer ! I just gave it a go and this solved the issue !!Your explanations made a lot of sense and this is a quick and straigthforward solution !
Also, based on this issue, I might have another question (if you don't mind) for adaptive feedbacks after each trial.
The idea is as follow:
1 - The computer has 2 options: 8 & 10. It will always go for pre-specified values (potentially the higher one).
2- The participant has 2 options: Option 1 that is the same as the computer (i.e., 10) and option 2 that is a different one (if the computer's choice is 10, the second option will range from 5 to 15). The participant is aware of the computer's choice.
3- If participant choose the same as the computer, they both receive the selected amount. If participant choose Option 2, he will receive the amount and the computer receives 0.
I'm struggling to create a feedback after the 'get_response' object that can show both players gain on a trial per trial basis. I'm guessing that for this, I'd have to create an 'If' statement using the new variables you created, right ?
Best,
Clément
Dear Clément,
glad that it worked!
Regarding the adaptive feedback: The procedure you proposed sounds good to me and you could indeed extend the code I proposed above, e.g., in this direction:
This would create payout variables in a way you described that you could display on a subsequent feedback item. (Note that the script could be much more parsimonious, but I created an extensive script for clarity.)
Best,
Pascal
This is great, Pascal ! Thank you very much !
After creating a 'computeramount' variable in the trial loop and including the newly created variable in a feedback item, the payout feedback seems to work perfectly fine !
Your help was greatly appreciated !
Clément