Howdy, Stranger!

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

Supported by

Specify the response

Hi Flaad, Hi all
I have some issue in go-nogo task paradigm. Since there is an instruction not to press the key, I am little bit confused how to specify the correct response. If I not specify the “not press” as a correct result, the data will fill with none string whereas never meet the criteria. What I tried to achieve is the accuracy when subject not to press the key but the result is correct. I just outline the problem maybe something like this:

if response == "random key” and gonogo_stimulus == "yellow square":
correct_answer = "true" # press the key
if response != "random key" and gonogo_stimulus == "yellow square":
correct_answer = "false" # not press the key or miss
if response == "random key" and gonogo_stimulus == "blue square":
correct_answer = "false" # press the key that shouldnt
if response != "random key" and gonogo_stimulus == "blue square":
response_type = "true" # not press the key

I hope any further advice and comment from anyone who is ever work with go-nogo paradigm task.
Thanks a lot


  • edited December 2018

    Hi Tanto,

    I am not sure I understand the problem.

    key, rt = exp.keyboard.wait(duration=1500)
    if key is None:  #  Not responded
        if gonogo_stimulus == "blue square":
            correct = 1
            correct = -1
        if gonogo_stimulus == "yellow_square" and key = "random key":
            correct = 2
            correct = -2

    Where correct is coding: -2=missed reject, -1=false hit, 1=hit, 2=reject

  • Hi Flaad,

    Thanks for the quick response. Yes!, that's right what I really meant. I think go/nogo task have very different structure from flanker or stroop task. My understanding is that I don't need to specify the response with "trial.set_factor("corr_res",corr_res)" but just specify directly after block has started. Correct me if I'm wrong. I have been working on it. Thanks for the code, very helpful for me who is still struggling to understand Python.

  • Hi Flaad really sorry to bother you again. I have stumble upon in other error. The code give me :

    AttributeError: 'NoneType' object has no attribute 'add'
    Exception TypeError: "'NoneType' object is not callable" in > ignored

    As far as I understand this error, maybe caused by the key with 'none' response, when I try combined the data. I tried to covert the nonType with 0 :

    int(0 if key is None else None)

    But no works and raise similar error. Here my full code.

  • You get this error because you never start the experiment. The data attribute is only available after a call to expyriment.control.start. See also

  • I get the same result whatever I modify the condition. Any suggest would be great n thanks a lot

    I make my stimuli more simple to test the correct answer. I hope this help and I am very grateful for your answer.

  • That is because fast_stimuli == "cruel" and fast_stimuli == "love" can never be true, since fast_stimuli is a list, and "cruel" and "love" are strings.

  • Hello Flaad,
    After several trials, I got this code work exactly just what I want. I just simply change :
    if key is None:
    if trial.stimuli[0].text == 'cruel':
    correct = 'true miss'
    correct = 'false miss'
    if trial.stimuli[0].text == 'cruel' and expyriment.misc.constants.K_SPACE:
    correct = 'false hit'
    correct = 'true hit'
    and this is also work if I set the reaction times (rt) to None. Yes the fast_stimuli will never meet the criteria because I got the comparison logic wrong in the beginning. I attached my final code. Hope this help and many thanks for the advice.

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