Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Restricting allowed choices in touch response not possible?

edited June 2014 in OpenSesame

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?


  • edited 3:03PM


    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 the touch_response and have this re-execute the touch_response until the given response matched the allowed responses. A script like this, to be put in the run phase, should do the trick:

    # Define a list of allowed responses for the touch_response
    allowed_responses = [1, 2]
    # Re-run the touch_response if the given response is not in the allowed
    # responses
    while self.get('response') not in allowed_responses:


    Buy Me A Coffee

  • edited 3:03PM

    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.

  • keikei
    edited 3:03PM

    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

  • edited 3:03PM

    Hi there,

    sorry to resume this thread. Let's say I have a sequence like:

    ---[your script that checks the 'touch_response' ]

    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?



Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games