Howdy, Stranger!

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

Supported by

Ending experiment

Hello ,

how could I end the experiment for the participant ,if he makes 4 incorrect responses in sequence !

Thanks


Comments

  • edited February 2021

    Hi @maizaiz ,


    You can achieve this by using a break-if statement. Are you running your script locally or online? If locally, you can do the following:


    • Initialize a variable that will keep track of the number of consecutive errors in you block_sequence. To do that append an inline_script item and define the counter variable like so (in the Prepare tab):
    var.counter = 0
    
    • Next, append another inline_script item, this time to the trial_sequence, and place it after the item that you use for response collection (e.g. the keyboard_response item). Determine whether the counter variable should be updated or reset, depending on whether the participant responded correctly or not on the current trial. You can do that with the following piece of script (this time in the Run tab):
    # If an incorrect response was given, 
    # increment the counter by one:
    if var.correct == 0:
        var.counter += 1
    
    # If not, reset the counter to 0:
    elif var.correct == 1:
        var.counter = 0
    


    • Use the following break-if statement in the block_loop item:
    [counter] >= 4
    




    I attached an example experiment.



    Hope this helps!


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • thanks alot that was so helpful .

  • Great to hear @maizaiz !

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Hello,, can u help me please ! I can't find what`s wrong with the experiment I did.

    First I did a loop for practice ; it contains three pictures and the participant has to choose the right answer in each pictures he has 5 choices and there is just one correct answer ; if he didn`t well so he will gets explanation of the right answer ', i did an if statement for that by using run if [correct]=0 . but that doesnt work , actually it run just the first time i used it and when I repeated again it always show the explanation\instruction whether the answer was correct or not .

    another thing when I run the experiment it doesnt continue to the experimental loop I just get a freeze on the screen and don't have any reaction .

    I will be very thankful if you instruct me how to fix those tow problems .

  • Hi @maizaiz ,


    Could you upload your experiment here, by clicking the paper clip icon? I'm sure we'll find a way to solve the issues. :)


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • I've tried to upload it but I get :Request failed with status code 413

  • I sent by the e-mail

  • Hi @maizaiz ,


    I spotted several issues in your experimental file:


    • Firstly, the loop items called 'practiceloop' and experimental_loop' contained many empty rows that don't seem to serve any purpose. You can simply delete them.
    • Secondly, in the practice loop you were not collecting keypresses by using a keyboard_response item. Instead, you set the duration of the sketchpads to "keypress". By doing this, the variable "correct" was not determined correctly. It's better to set the duration of the sketchpads to 0 and place a keyboard_response item right after it.
    • It's better to use the square-bracket syntax to show the images, just in the same way as you did in the experimental loop.
    • You can also use the square-bracket syntax for the form_text_display items that you use for feedback. You can simply add a new column to the "practice_block_loop" containing the feedback message that you want to show on the current trial (if the participant responds incorrectly).




    I attached the modified script, but please note that I removed the images from the file pool (otherwise the experiment was too large to upload). (Also, note that I only looked at the practice phase.)


    Good luck!


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Did you like my answer? Feel free to Buy Me A Coffee :)

  • YOu are so great ,Thank you alot 💐

  • Hi,

    Someone can help me ? I have to do an experiment for my last year of study and I’m lost... I also have a problem with my experience, I can’t create a sound variable with different sound files and python script crashes every time. I can't reach her because I am receiving error code 413.

  • edited March 2021

    @débutanteopensesame , please keep the forum clean by posting your questions only once. I'll reply in the other thread you opened:

    https://forum.cogsci.nl/discussion/6989/experiment-doesnt-work#latest

    Did you like my answer? Feel free to 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