Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] consecutive correct responses detection

edited March 2013 in OpenSesame

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

  • edited 12:19PM

    Hi Shira,

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

    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] >= 10

    Then, 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):

    exp.set('correct_in_a_row', 0)
    

    In the trial_sequence, after your response item, increment correct_in_a_row by 1 after a correct response, and reset it to 0 after an incorrect response. You can do this with the following inline_script:

    if self.get('correct') == 1:
        exp.set('correct_in_a_row', self.get('correct_in_a_row')+1)
    else:
        exp.set('correct_in_a_row', 0)
    

    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.

    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_row is 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

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • edited March 2013

    Hi.

    Thank you for your help. Now it is working just fine.

    What I need to know now is:

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

    2. How to add questionnaires at the end of the experiment, at the end_text_display

    Again, thank you for your help
    shira

  • edited 12:19PM

    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

    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.

    How to add questionnaires at the end of the experiment, at the end_text_display

    The best way to implement questionnaires is using forms, as described here:

    Good luck!

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.