Howdy, Stranger!

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

Supported by

correct respon not match

Hi All,
I have little problem with my coding to make correct respon from a list which contain same object:
my_stim = ['2','3','3']

experiment design goes here

pre_stim = my_stim[trial]
t_first = expyriment.stimuli.TextLine(text=pre_stim, text_bold = True, text_size=60)
t_trial = expyriment.design.Trial()
t_trial.add_stimulus(t_first)
if my_stim[trial] == '3' :
correct = 122
elif my_stim[trial] == '3' :
correct = 107
else:
correct = 122

It gave same answer in object '3' (122 not 107 in second row), then I try:

if my_stim[trial] == '3' and pre_stim == my_stim[0]:
correct = 122
elif my_stim[trial] == '3' and pre_stim == my_stim[1]:
correct = 107
else:
correct = 122
It also gave the exact same number in object '3'. Instead using list, do I have to use dict for delivering my stimuli?
Any suggest would be great!!
Thanks in advance

Comments

  • Hi,

    it is not clear to me what exactly doesn't work. In your first example you will never reach the elif, because the expression to evaluate is the same for the if before.

    In the second example they are different, though.

    What do you mean with "it also gave the exact same number in object '3'"?

  • Thanks for the respon!
    Sorry, ignore the second example, thats just silly. What I am trying to reach is like first example but evaluate the elif statement. Just like this:

    block_one = expyriment.design.Block(name="1")
    trial_one = expyriment.design.Trial() #0
    stim = expyriment.stimuli.TextLine(text='3', text_colour=expyriment.misc.constants.C_GREEN, text_bold = True, text_size=60)
    trial_one.add_stimulus(stim)
    correct = 109
    label_id = "M"
    trial_one.set_factor("correct", correct)
    trial_one.set_factor("label_id", label_id)
    trial_two = expyriment.design.Trial() #1
    stim = expyriment.stimuli.TextLine(text='2', text_colour=expyriment.misc.constants.C_GREEN, text_bold = True, text_size=60)
    trial_two.add_stimulus(stim)
    correct = 109
    label_id = "M"
    trial_two.set_factor("correct", correct)
    trial_two.set_factor("label_id", label_id)
    trial_three = expyriment.design.Trial() #2
    stim = expyriment.stimuli.TextLine(text='3', text_colour=expyriment.misc.constants.C_GREEN, text_bold = True, text_size=60)
    trial_three.add_stimulus(stim)
    correct = 120
    label_id = "X"
    trial_three.set_factor("label_id", label_id)
    trial_three.set_factor("correct", correct)

    Thanks for the answer, the time and the opensource Expyriment!!

  • It is still not entirely clear to me what you would like to achieve. The elif statement checks the same thing as the if statement before. If you want to check which trial it is, then you need to check for thing that make this trial unique (e.g. the combination of text and label_id). But why not just give each trial/stimulus a unique ID? Then you can simply check for this. Or maybe I still don't understand what you are trying to do. Maybe you can try to explain it in a bit more detail?

  • Hi, Fladd

    I am trying to make simple n-back task. Since I can't refers the same trial with different result (i.e, "2,3,2". "number 2" in first sequence is false, and "number 2" in third sequence is the answer) were my biggest issues because I will not get the correct key for the answer. I will try using unique ID, thanks!

    And once again, it is possible to run dot probe task in expyriment?

  • And once again, it is possible to run dot probe task in expyriment?

    I don't see why it wouldn't be.

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