[solved] Restricting allowed choices in touch response not possible?
The keyboard version of this study works in that I can restrict responses to just ONE key (of two keys, say 1 and 2). So in such a case that response has to be made before the trial can proceed (I use this to force Ss to make the correct response if they make an error on the actual target in the trial). What I do is restrict the allowed response to just the correct response key and it works in the case of the keyboard.
In touch case with Android backend (where the responses are 1 and 2), it works only half the time, when the right answer is 1. So if target of type 1 is presented, and the subject makes a mistake (presses 2) on the touch, then a second touch response can be restricted to just the first response by using this directive. The correct response is not defined here for this object as we are not interested in logging it.
set allowed_responses "[trialresponse]"
But if the right answer is 2 and person presses 1. Then it may not be possible to restrict the touch response to just the 2 response? That is, at the minimum, in the case of touch, 2 distinct responses must be allowed? Or if it is restricted it can only be limited to the response 1.
I am thinking this may have to do with how the touch response object internals work? Comments?
Comments
Hi,
The
touch_response
plug-in does not allow you to specify allowed responses. However, because it seems like a nice addition, I opened an issue for it #260.For now, what you can do is simply insert an
inline_script
after thetouch_response
and have this re-execute thetouch_response
until the given response matched the allowed responses. A script like this, to be put in the run phase, should do the trick:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Yes, I did the same thing functionally (using a while loop in script) to achieve this. And then I saw your solution above. Thanks.
Because of inline scripts, usually there is a way to make the system/task behave in line with requirements. And that is a very big advantage of OpenSesame.
Hi Sebastiaan,
I'm psychologist for animal leaning.
Did you add "allowed_responses" option to touch_response plugin in the latest version? If not, should we use the custom-made inline script you provide as example above, enabling this operation? This solution would be fine, but we have another problem, especially for animal training via touch monitor. If we add this script using while-statement like this solution, the timeout set at the previous toutch_ response item doesn't work. Now we need allowed_response together with monitoring timeout. It would be fine for animals to keep the motivation for the task as precise and quick as possible. Please let me know the possible solution. Cheers K
Hi there,
sorry to resume this thread. Let's say I have a sequence like:
Using you script the "touch_response" item is run but inside the script itself.
I mean that you never go out the While loop until a response is within the range.
How can I go back to the "touch_response" item, inside my sequence, and run it and the item that are following again?
thanks,
alessio