[open] consecutive correct responses detection
Hello
My experiment displays pictures and for each picture it expects key response, one is correct and the other is wrong ("A" or "L"). After 10 consecutive correct responses the loop should break and display success and additional text display. The dependent variable is the number of trials until the full completion of the assignment (including the 10 consecutive correct responses).
I also need to add to the logger the log of the number of total trials until the full completion of the assignment (i.e. 10 consecutive correct responses).
The total number of the pictures is 48. If participant does not learn the stopping rule after the first loop of 48 images, then another loop should start until the completion of the learning rule or to the end of the second loop. Then display failure and additional text display.
I would be very thankful if you can help with this problem?
Shira kremer Sharon
Comments
Hi Shira,
You can use a 'Break if' statement in your block_loop (under 'Show advanced options'). Let's assume that you have tracked the number of consecutive correct responses as
correct_in_a_row, then the following 'Break if' statement should do the trick:[correct_in_a_row] >= 10Then, of course, you need to keep track of the number of correct responses. Before your block_loop, set it to 0 with an inline_script, so that it has an initial value (otherwise OpenSesame will complain about not knowing the variable):
In the trial_sequence, after your response item, increment
correct_in_a_rowby 1 after a correct response, and reset it to 0 after an incorrect response. You can do this with the following inline_script:You can use the same principle one level up: Use the same break-if statement in your experimental_loop, to keep running blocks until
correct_in_a_rowis 10. Set the cycles of the experimental_loop to a value that corresponds to the maximum number of attempts that the participant has.In general, using 'Break if' and 'Run if' statements, you can add considerable flexibility to the structure of your experiment. Hopefully my post will get you started, and after playing around with your experiment for a bit you will get a better feeling of how this works.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi.
Thank you for your help. Now it is working just fine.
What I need to know now is:
How to ask from the logger to keep track of the total number of trials for each participant (total sum of all trials until the learning of the stopping rule). Means that in the Excel file' each row will show the total number of steps for each subject separately
How to add questionnaires at the end of the experiment, at the end_text_display
Again, thank you for your help
shira
If you add a logger item to the end of your trial sequence, your data file will contain a row for every trial. This should contain all the information that you need.
The best way to implement questionnaires is using forms, as described here:
Good luck!
Check out SigmundAI.eu for our OpenSesame AI assistant!