Ending experiment
Hello ,
how could I end the experiment for the participant ,if he makes 4 incorrect responses in sequence !
Thanks
Hello ,
how could I end the experiment for the participant ,if he makes 4 incorrect responses in sequence !
Thanks
Comments
Hi @maizaiz ,
You can achieve this by using a
break-ifstatement. Are you running your script locally or online? If locally, you can do the following:sequence. To do that append aninline_scriptitem and define the counter variable like so (in thePreparetab):inline_scriptitem, this time to the trial_sequence, and place it after the item that you use for response collection (e.g. thekeyboard_responseitem). 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 theRuntab):# 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 = 0break-ifstatement in the block_loopitem:I attached an example experiment.
Hope this helps!
Cheers,
Lotje
Did you like my answer? Feel free to

thanks alot that was so helpful .
Great to hear @maizaiz !
Did you like my answer? Feel free to

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

I've tried to upload it but I get :Request failed with status code 413
done
I sent by the e-mail
Hi @maizaiz ,
I spotted several issues in your experimental file:
loopitems called 'practiceloop' and experimental_loop' contained many empty rows that don't seem to serve any purpose. You can simply delete them.loopyou were not collecting keypresses by using akeyboard_responseitem. Instead, you set the duration of thesketchpadsto "keypress". By doing this, the variable "correct" was not determined correctly. It's better to set the duration of thesketchpadsto 0 and place akeyboard_responseitem right after it.square-bracketsyntax to show the images, just in the same way as you did in the experimental loop.square-bracketsyntax for theform_text_displayitems 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

Did you like my answer? Feel free to

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.
@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
