It looks like you're new here. If you want to get involved, click one of these buttons!
Hi, I want my experiment to interrupt after 5 consecutive incorrect responses.
Is there an easy way to implement this?
I think so, one of the variables that opensesame logs normally is "counts" -- I normally don't have incorrect responses so I don't know the exact variable but I would assume that it counts the incorrect responses and what you would need to implement somehow is to say if count_incorrect = 5 --> quit.
Easiest way to find the variable you're looking for is to run a quick experiment and then check the logger
Eva is right. To make it a little concrete, you can put an inline_script in your block sequence and put the following code in its run phase:
# You need a variable that keeps track of the current trial count
if var.trial_no > 5: # make sure that at least 5 trials have passed
if sum(responses.correct[-5]) == 0:
# code that will make your experiment halt. depending on what you want
# there are different ways to implement it. Let me know what you want and
# I can give you some advice
This part of the documentation might also help: http://osdoc.cogsci.nl/3.1/manual/python/responses/
Hope this helps,
Thanks for the suggestion! I'll work on it and let you know.