Howdy, Stranger!

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

Supported by

Two correct responses for one stimulus

Hi,

I'm preparing a reaction time experiment for Android that contains the followings: a number appears (1, 2, 3 or 4) and the participant has to touch the right number below. The allowed responses (1-4) are present during the full block. I would like to make this experiment run in three different conditions. The participant has to use 1. his right hand; 2. his left hand; 3. his both hands. Since I would like the experiment run on Android, the screen area is divided into 8 columns. From left the first four columns (1-4) contain the allowed responses for the left-hand condition. The second four columns (5-8) contain the allowed responses for the right-hand condition. In the both-hand condition all the eight columns are active in wich the order of the allowed responses is 4-3-2-1-1-2-3-4.

I'm stuck with the problem if I can set two responses as correct in the both-hand condition. For example in the both-hand condition for the stimulus '4' the correct response with left hand is in the column n. 1 (allowed response '4') and the correct response with right hand is in the column n. 8 (allowed response '4' also).

In the construction of the experiment after the sketchpad of the target number I may set two touch responses to register both hands' responses. But is there any solution to set two items as correct response simultaneously? Any advice could help!

Cheers,
Alexandra

Comments

  • Hi Alexandra,

    The keyboard_response item only accepts a single correct response. But you can easily implement more complicated logic using an inline_script. For example, the script below checks whether a response is part of a list of correct responses, and records the response accordingly.

    Do you see the logic of the script? You'll probably need to change it a bit, but basically I think it does what you need.

    This code should be in the run phase of an inline_script, and should replace a keyboard_response.

    # Define your correct responses
    correct_responses = '1', '2'
    # Collect a response
    t0 = clock.time()
    my_keyboard = keyboard(keylist=['1', '2', '3', '4'], timeout=5000)
    response, t1 = my_keyboard.get_key()
    # Add the response to the response history
    responses.add(
        response=response,
        response_time=t1-0,
        correct=1 if response in correct_responses else 0
        )
    # Print the response history to the debug window
    print(responses)
    

    See also:

    Cheers!
    Sebastiaan

Sign In or Register to comment.