Howdy, Stranger!

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

Supported by

Problems with "Run if" function

Hello!

I was trying to implement "run if" statement in the experiment sequence and faced an unexpected problem. Here's what I typed in "run if" in sequence:

It was supposed that correct_answer will be shown only if the participant provides correct answer during the trial, and incorrect_answer will be shown only if the participant provides incorrect answer. However, during the experiment only the option that has [correct]=0 statement is shown, regardless of whether the correct or the incorrect answer was provided.

Don't know how to fix this. Maybe the problem is somewhere in the code defining the correct answer, idk, wrote it according to tutorial.

if var.pic_test == 'Human':

var.correct_response = 'right'

elif var.pic_test == 'Nonhuman':

var.correct_response = 'left'

else:

raise Exception('Invalid picture' % var.pic_test)


kind regards for any help,

wyeird

Comments

  • Hi Wyeird,

    It looks like you are using those statements on sketchpads. Is that true? Could you try replacing them with feedback items? The difference is that sketchpad items are made in the prepare phase, whereas feedback items are prepared in the run phase. As your correct variable is only created in the run phase (after a response has been recorded), it won't exit to index the sketchpad. See here:

    https://osdoc.cogsci.nl/3.3/manual/prepare-run/

    Eduard

    Buy Me A Coffee

  • Hi @eduard,

    Thank you for the advice! Just tried to implement it, however, still doesn't work... Regardless of whether the answer is right or wrong, the program still only outputs the incorrect_answer screen.

    Just in case, I'm attaching screenshots of the experiment's structure, mb the problem lies there and I just don't see it...


  • What are the response keys?

    Can you also share your experiment? That way it will be quicker for me to find the problem.

    Eduard

    Buy Me A Coffee

  • Response keys: left; right

    Here's the experiment: https://dropmefiles.com/6zEQV

    Thank you so much!


  • I removed the images to save storage space, so you have to add them again to test your experiment. The problem had to do with too many keypresses required to proceed. Generally, the stimulus should not need a keypress as duration. ideally it is set to 0 and the stimulus duration is handled with the duration field in the keyboard response item. In any case, when I made those changes, your experiment seems to do what it is supposed to. Could you confirm that?

    Eduard

    Buy Me A Coffee

  • Thanks a lot! Now it works. I never would have guessed that the duration of the stimulus could break things down like this

  • Nice!

    It is not the duration itself, but the fact that you had to press a key that caused the issue.

    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