Howdy, Stranger!

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

Supported by

Multiple correct responses

Hi everyone,
I am creating an experiment in which multiple responses are correct for each trial (pressing just one of the multiple correct responses is enough to get to the next step of the experiment).
More precisely, I need two series of five correct responses.
To begin, I wanted to test with two series of two correct responses.
So I created two variables in the Loop ([correct_response_1] and [correct_response_2]) and righted down the names of the variables in the 'Correct response' box of the 'Keybord response' item.
Unfortunately it doesn't work, and none of the correct response are accepted.
Is it possible to get multiple correct responses for each trial ?

Thank you in advance !
Isidor

Comments

  • Hi Isidor,

    It sounds like you mean multiple allowed responses. That is certainly possible by entering the responses separated by a semicolon, like so:

    You can only enter a single correct response. To accept multiple responses as correct, you would need to write a simple inline_script with something like the code below in the Run phase. (This should replace a keyboard_response or other response item.)

    # Response-collection onset
    t0 = clock.time()
    # These can also be defined in a loop
    var.correct_response_1 = 'z'
    var.correct_response_2 = '/'
    # Collect a keyboard response
    my_keyboard = keyboard(keylist=['z','/'])
    key, t1 = my_keyboard.get_key()
    # Check if the response was correct
    correct = 1 if key in (var.correct_response_1, var.correct_response_2) else 0
    # And add it to the response history
    responses.add(response=key, correct=correct, response_time=t1-t0)
    

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • Hi ! Thanks for the answer.
    Like I thought, it's impossible to set multiple correct responses without an inline_script.
    The one you propose seems quite good, but it allows only two keys, 'z' and '/'. And if you push the 'a' letter, nothing happens.
    In my experiment, I would like to allow every response, but to set only two correct responses.
    I presume I have to change the 'keylist' command ?
    I'm sorry, I don't know Python language for now.
    Thanks again for your answer !
    Isidor.

  • Hi ! I've finally found the solution.

    I put a keyboard_response item and didn't write any allowed or correct response.
    I defined in the loop two variables ('correct_response_1' and 'correct_response_2').
    Then I added an inline_script right after the keyboard_response with your Python code corresponding to the #Check if the response was correct :

    var.correct = 1 if var.response in (var.correct_response_1, var.correct_response_2) else 0

    This way, participants can press any key, but only the ones defined in the correct_response variables are correct.

    Thanks very much for your help ! And for all your work !
    Cheers !
    Isidor

  • Hi!

    I am trying to implement multiple correct responses (for the modified wisconsin card sorting task) on the online version (OSWeb) that only uses javascripts. Is it possible to run an inline_javascript instead of the keyboard_response that allows for multiple answers as well?

    Many thanks

    Jelle

  • Hi Jelle,

    Is it possible to run an inline_javascript instead of the keyboard_response that allows for multiple answers as well?

    Are you asking whether you can handle response collection through an inline_javascript item, just could through a regular inline_script item with a Keyboard object? No, I'm afraid not. The current functionality of the inline_javascript is largely limited to manipulation experimental variables through the vars object.

    Cheers!

    Sebastiaan

    Buy Me A Coffee

  • Hi Sebastiaan

    I indeed could not work with a keyboard object, but I managed to get the inline javascript to set the 'correct' variable to 1 or 0, depending on the set of correct responses that had been declared beforehand in the trial sequence by another bit of code that compares the random card to the 4 standard response cards in terms of their overlap of number, color or shape (by using the vars object), and it all works now!

    Thanks for your reply.

    Best,

    Jelle

  • Hi Jelle,

    I have a similar problem. Would you mind sharing your code for setting the correct variable to 1 or 0 in JavaScript?

    Thank you very much in advance!

    Zoë

  • Hi @zlver ,

    Would you mind sharing your code for setting the correct variable to 1 or 0 in JavaScript?

    This is simply done by:

    vars.correct = 0  // or 1
    

    But of course the tricky part is writing the code that determines whether it should be correct or not. To get help with that you'll have to provide more details about your experiment though!

    Cheers,

    Sebastiaan

    Buy Me A Coffee

  • Hi @sebastiaan

    Thank you very much for your reply.

    The problem is indeed more complex. I will try to explain it:

    My experiment consists of 4 blocks of 12 sequences. Every sequence consists of 10 coloured squares either blue (1) or orange (0). The goal is to predict what the eleventh colour should be. After each response, feedback is given (thumbs up or thumbs down). After each block RT and accuracy is given.

    In a maximizing condition the feedback that is given is based on a predetermined correct_response (filled in in the block_loop as a variable correct_response).

    In a matching condition the feedback that is given is based on a predetermined correct_response for all odd sequences, BUT for all even sequences both answers are correct. With some help I figured that it could be coded like below. However, there are two problems:

    1. When running the experiment in OpenSesame (blue arrows) the experiment functions well, but just does not give any feedback in the matching condition when the sequence number is 'even'. It skips the feedback. Possible problem = there is nothing defined in the block_loop for these sequences, despite the inline javascript saying that these sequences should be counted as correct. What could I be missing here?
    2. When running the experiment with OSWeb (text experiment in external browser): Somehow none of the responses are validated for correct (true or false). All feedback is negative and acc is 0%. When the matching condition comes to the even sequence, an error message appears that 'correct' is not defined.


    I am very stuck at this moment with the design of the experiment in OpenSesame -> OSWeb as you can see. Though I have learned a lot already and I really like the possibilities that OpenSesame provides, I am afraid that I will have to simplify the experiment and run a Qualtrics survey, because of time constraints.

    If you would have any tips or advice, that would be very helpful!

    Thank you in advance.

    Best,

    Zoë

  • What the block_loop looks like:

    To be more concise: for every even item in b#_match the correct_response is both 0 and 1. So that 'correct' should always be 1.


  • Hi @sebastiaan

    I found a simple solution to my first problem: putting [response] at the places that any response is the correct_response. See image.


    The second problem still exists: When running the experiment with OSWeb (text experiment in external browser): Somehow none of the responses are validated for correct (true or false). All feedback is negative and acc is 0%.

    Cheers,

    Zoë

  • Hi Zoe,

    One way to go about finding out what is happening, is logging all the information that are used to compute accurracy. So the response and the correct_response. If they seem to match for incorrect trials (according to your correct variable), you can also log and check their types. Like that you might be able to narrow down the problem.

    Eduard

    Buy Me A Coffee

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 http://45.77.173.118/ 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