Break loop after 10 incorrect trials
Hello everyone,
I am quite new to Opensesame and would like to break my loop if the first 10 trials are answered incorrectly.
I would like to stop the whole experiment in this case, a simple break would also be fine.
This is what I tried so far, but it looks pretty incorrect to me.
I also tried it like this, but when I tick "evaluate before first trial" it simply always breaks after the practice, if I do not tick it, it never breaks.
Thank you!
Maike
Comments
Hi Maike,
I attach an experiment, that implements a "breaking the loop after 10 trials without correct response" procedure.
Hope this helps,
Eduard
Hi Eduard,
thank you a lot for your help.
Because I got a loop in a loop, somehow this does not work for me.
I tried putting the [break_loop] = 1 in the experimental loop as well as in the block loop experiment, but either way it always crashes.
Thank you a lot!
Maike
I attached my experiment :)
Thanks a lot :)
Hi Maike,
Here the updated experiment. Basically, you have not used the right variables. var.fixation_experiment does not exist, it must have been var.count_fixation_experiment (this variable keeps track of the trial number essentially). Also, var.accuracy does not exist. Instead you should use var.acc.
By the way, your experiment will currently stop after 10 regardless of the answers. The reason for that is that you have not defined a correct response. Therefore the variable var.acc cannot compute the current accuracy. Once that variable is defined, your experiment should work.
Also try to always provide an error message or describe in which way your experiment doesn't work like you want it to, when you request help here. It will make our live much easier helping you. expeirment
Eduard
Hi Eduard,
thank you a lot for your help!
I am using a file for the stimuli which also contains the variable correct_response, but the accuracy is not compute. How can it make that work?
Thank you!
Maike