Howdy, Stranger!

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

Supported by

[open] where is the dot?

edited March 2014 in OpenSesame

Hello.

Thank you for being there always when needed.
I'm currently conducting a new experiment that need to present the following sequence:

1. buffer - a blank image for 150 ms
2. priming - image for 16 ms 
3. mask - varied image for 300: 4 stimuli that each have a correct response,
either 2;4;6;8, this image represent the independent variable 
4. question - "what is your answer?", set duration as 0 
5. keyboard response, set as 2;4;6;8
6. feedback when wrong - set as: run if [correct_key]=0. in this case X should
be presented until correct answer is typed (I need to freeze this screen until
correct response).

So, in this case the keyboard response refers to the mask, since this is the variable, and not to the question which is constant. But, it doesn't work :( something is wrong. No matter what the response is, it always indicate X. I think that the problem occurs because the keyboard response is set after the question, and not directly after the mask (the variable), but I can not change the order of the presented images.
Can you please help me to find out what went wrong in this case?
I also wanted to add a PrnScr of the experiment but somehow couldn't.
Thank you much,
Shire

Comments

  • edited 1:09PM

    Hi Shire,

    Just to make sure we're on the same page: The participant has to respond, with a single keypress, to the stimulus that is presented in the mask item. Do I understand that correctly?

    If that's indeed everything, this should be very simple and the error is probably something trivial. Is the keyboard_response item indeed called key (because you are using the variable correct_key)? Have you specified the correct_response variable in your block loop?

    Cheers,
    Sebastiaan

  • edited March 2014

    EDIT: woops! Sebastiaan was quicker.

    Hi,

    Two questions, to further specify your broad problem description:

    1) Do you have a variable that indicates what the correct answer is?

    2) Did you specify this variable as the correct response in your keyboard_response item?

    If the answer to both questions is yes, and it still does not work, could you perhaps paste the script of your experiment?

    Thanks,

    Edwin

  • edited April 2014

    Hi guys, thank you so much.
    I will try to answer you both by attaching the script of the sequence:

    run reset_feedback "always"
    run buffer "always"
    run lake "always"
    run mask "always"
    run question "always"
    run Key_Lake "always"
    run wrong_mask "[correct_Key_Lake]=0"
    

    Sebastiaan, as you can see below the allowed_responses are "8;6;4;2", but I need them to be the arrows, meaning up (8), down (2), left (6) or right (4). for each "mask" (there are 4 masks) there is only one correct answer. Even though, they need to see the "X" until they press on the correct arrow, so they can answer with more than single keypress, but they can not see the stimulus again (meaning the sequence can not repeat it self again and again).

    Edwin, to your 1st question I will say yes, but I'm not sure what you have referred to in the 2nd question. This is the script of the keyboard_response item:

    set allowed_responses "8;6;4;2"
    set description "Collects keyboard responses"
    set timeout "1000000"
    set flush "yes"
    

    Thank you, guys.

    ;)

  • edited 1:09PM

    If you have a variable that specifies the correct response, as you say you do, you can do the following:

    Adjust the script of your keyboard_response to the following, but change corresp to the name of the variable in which you have defined the correct response.

    set correct_response "[corresp]"
    set allowed_responses "8;6;4;2"
    set description "Collects keyboard responses"
    set timeout "1000000"
    set flush "yes"
    
  • edited April 2014

    Hi, thank you. now it works.

    can you help me with my other problem:

    The "X" screen (defined as 'wrong_mask') need to be shown, or to be freeze, until the correct arrow is pressed (as you defined it above 'corresp'), so they can answer with more than single keypress, but they can not see the stimulus again (meaning the sequence can not repeat it self ).

    I had tried to use this inline script, but it doesn't work. In this case it freezes the "x" but it doesn't move foreword to the next trial when I pressed on the correct response:

    # The item_to_run is the name of the sketchpad
    item_to_repeat = 'wrong_mask'
    
    # re-run the sketchpad until the answer is correct
    while self.get('correct') == 0:
        exp.items[item_to_repeat].prepare()
        exp.items[item_to_repeat].run()
    

    Do you need to see the full script?

    Thank you,
    Shira

  • edited April 2014

    Hi Shira,

    You might want to repeat the other items as well, if you want participants to be able to do more button presses:

    # re-run the items
    while self.get('correct') == 0:
        # prepare the items
        exp.items['keyboard_response'].prepare()
        exp.items['feedback'].prepare()
        # run the items
        exp.items['keyboard_response'].run()
        exp.items['feedback'].run()
        exp.items['inline_script'].run()
    

    Change the names of the items to the appropriate names in your experiment.

  • edited 1:09PM

    Hi, thank you soooooo much. Now it works.

    The last thing I need to add to this experiment is a feedback that will appear if the participant work to slow, meaning that if they do not response after 1200 ms, only after they type the correct response, they will receive a message that will asks them to: "please work faster", that will appear for about 2500ms.

    It is important that this feedback will not be considered in the result at the logger.

    I hope you can assist me.

    kind regards, Shira :)

  • edited 1:09PM

    Hi Shira,

    To do so, you will need to check the time of the onset of the mask (conveniently captured by OpenSesame in the time_mask variable), and compare this to the current time, like so:

    # set the timeout (in milliseconds)
    timeout = 1200
    
    # get the mask onset time
    t0 = exp.get("time_mask")
    
    # re-run the items until the response is
    # correct or until a timeout occurs
    while self.get('correct') == 0 and self.time()-t0 < timeout:
        # prepare the items
        exp.items['keyboard_response'].prepare()
        exp.items['feedback'].prepare()
        # run the keyboard response
        exp.items['keyboard_response'].run()
        # only run the feedback if there was a response
        if self.get("response") != "None":
            exp.items['feedback'].run()
        # run this script again
        exp.items['inline_script'].run()
    
    # set the timeout variable for OpenSesame
    if self.time() - t0 >= timeout:
        exp.set("timeout", 1)
    else:
        exp.set("timeout", 0)
    

    Note that for this to work, you will have to set the timeout of your keyboard_response to a low number (1 - 10 ms), and turn the "flush keyboard input" option off.

    Next, add a sketchpad to your sequence, which shows your timeout message, and set its Run if to timeout = 1.

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