Discontinuation rule
Hello! Might be kind of an Introductory question but I am quite new to Opensesame.
I am trying to build a math verification task with blocks of ascending difficulty and want to implement a discontinuation rule when accuracy inside a block drops below 20%. I have tried the break if function but it doesn't seem to work properly. I have also tried to use code but the acc variable seems to refer to the general accuracy on the task and not inside each block.
On that note, when the experiment breaks due to accuracy dropping below 20%, it sort of freezes and does not move to the sketchpad I created to end the experiment. Also, it doesn't log data regularly. Any thoughts/tips? Thank you!
Comments
Hi @Tryfonas_Bikos,
The "break if" option prevents a loop from starting a new cycle buyt does not interrupt an ongoing cycle. So, if you have 10 trials cycling 5 times and fulfill the condition for an interruption through the "break if" paramater in trial 25, the task will finish the ongoing cycle (i.e., reach 30 trials) and then only break out of the loop.
So, if you wish to interrupt the task on a trial to trial basis, you should use both the "break if" parameter of the loop as well as the "run if" parameter of all of the objects in your sequence, making sure that if a certain condition is met, then both will kick in.
Hope this helps,
Fabrice.
Hi @Fab Thank you for the reply. I don't want the experiment to stop mid-block. My main struggle is that I want the experiment to stop when a participant has below 0.20 on a specific block of tasks, and the var.acc that I am using in the break_if function concerns the general accuracy in all of the blocks combined, and not in each specific one. I have thought that this might be because I have the block loops for each block nested into one block loop that contains all conditions.
Also, when the experiment stops, it sort of freezes and doesn't move to a sketchpad I created for the end of the experiment. Any thoughts on that?
Hi @Tryfonas_Bikos,
If the var.acc variables does not do the trick, you can implement your own variable to tracvk accuracy. Simply setup variables to count the number of trials, the number of correct responses and proportion correct to zero.
This should be placed before the nested loop and set, increment them through code inside the trial sequence (after the response is registered of course). In that same place, set a variable containing the proportion of correct responses:
... and use that variable in your "break if condition" for the nested loop to break off.
As for the sketchpad freezing, it is not possible to determine the cause just based on your description. Check what condition is required for this sketchpad to end (what duration did you set? Is is expecteing a response? Is it part of some loop and if so, how is the loop set to end?).
Regards,
Fabrice.