Howdy, Stranger!

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

Supported by

Digit Span

Hi!
I am completely new to Open Sesame and I am trying to program a forward and backward Digit Span. I have searched specifically for some issues but I have trouble understanding some of them, so here I am.

The task is as follows: strings of random numbers of different lengths will appear on the screen sequentially. It will start with strings of 2 random numbers, then it will grow to strings of 3 random numbers, then 4 and so on until the participant gives a wrong answer twice. Each list length has to appear twice (so 2 displays of 2 numbers, 2 display of 3 numbers and so on). After the display shows the string, there has to be a screen where the participant can type in the numbers in the corresponding order (forward or backward), then show the next sequence. The task stops when the participant gives two wrong answers.
I have 2 questions (that actually comprise the entire task, but no matter):

  1. How do I program Open Sesame to import and show on a sketchpad/text display the different strings of random numbers without actually making a list of random numbers and putting them in the loop table? (I saw some kind of code I could use (see below), but I am not sure how I could use the variable X to show the string on the sketchpad. Also, I don't know how I could program it to extract lists of different lengths depending of the required list length

import random
x = random.random()
print(x)

  1. How do I collect the answers from the participants, given the fact that the answer is not a single key, but a string of numbers?

Thank you and I hope it is sort of clear what I am asking!

Comments

  • Hi Doris,

    How do I program Open Sesame to import and show on a sketchpad/text display the different strings of random numbers without actually making a list of random numbers and putting them in the loop table

    Sketchpads have a show text options (the little A in the menu on the left). If you select it, you can type what text you want to present. In your case, you want to use a variable (as the numbers change from trial to trial). So, for example [random_numbers] (The brackets indicate that this is a variable). That means that earlier (before the sketchpad is executed) you have to define the random numbers as a variable:

    import random
    var.random_numbers = random.random()
    

    How do I collect the answers from the participants, given the fact that the answer is not a single key, but a string of numbers?

    Use the text_input_form: http://osdoc.cogsci.nl/3.2/manual/forms/widgets/#text_input-textinput

    Hope this helps.
    Eduard

    Buy Me A Coffee

  • Thank you very much! It does.

    Another question popped up - I want to present numbers in series of different lengths - this means that the numbers 1, 7 and 6, for example, will appear individually and sequentially on a white background and only afterwards the response is collected ( I don't want participants to see all three numbers at the same time on the screen). If I put the numbers in the loop table, the text input form appears after every number.

    Also, if I use the text input form, the program does not tell me if the response the participant typed in is correct or not. How is accuracy and time needed to respond measured? Will I have to compute the variables separately, after the data is logged?

    Thank you!
    Doris

Sign In or Register to comment.