#### Howdy, Stranger!

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

Supported by

# Short memory test HELP

I would like to make an experiment that would look like this from the point of view of a subject

1. Instruction saying "you will see strings of numbers of different lengths. Remember the number shown and enter the correct answer" or something like that
2. First numbers are displayed and we start from 3 numbers, then a window for answers, and then 4 numbers etc until there is a 10nubers string. Each string of number would be displayd for 2 seconds
3. Then I want the subject to see how many correct answers she/he/they gave.

I want their answers to be saved so that I could tell that subject 1 had 40% correct answers etc

I want the experiment to be possible to share by link and done online.

I really appreciate any help. I am really bad at opensesame.

• Hi @majagol,

There are numerous steps required to program the task you're describing. If you're not very familiar with Open Sesame, my recommendation is to take some time to follow the tutorials, read the documentation, explore the forum and start with a simpler version of your task to make sure you understand and control the basics.

As a general guideline, here are some pointers you may find useful for the task you described.

Because your trials can involve different numbers of stimuli per trial (and therefore different numbers of keyboard inputs too to collect responses), the simplest way (and which would require no coding) would be something like this:

In your loop, include variables coding for the digits to be presented (digit1, digit2, etc.), and a variable that will code for the number of digits to be presented in each trial. Let's say that this variable is called n_stim. For the sake of this example, I'm going to assume that the maximum of stimuli in a trial would be 10. n_stim could take a value between 3 (your lowest number fo stimuli) and 9 (the maximum). You can place in your sequence 10 sketchpads followed by 10 keyboard objects (stim1, resp1, stim2, resp2, etc.). You would of course set each sketcphad to show the appropriate digit ([digit1] on stim1, [digit2] on stim2, etc.). You would set the "run if" of each in your sequence based on n_stim. For example, for stim4 and resp4, you'd set the "Run if" condition to n_stim being greater than 3. For example, for stim5 and resp5, you'd set the "Run if" condition to n_stim being greater than 4. And so on. This means that if n_stim is 4, only the first 4 digits would be presented and 4 responses would then be collected. With this method, your log would contain in different columns the digits presented as well as each of the responses collected.

Now, to calculate the % of correct responses, you would need to write some code. In your case, to run the task in OSWeb, you'd have to write it in Javascript (using the inline_Javascriot object). You'd have to write code calculating the total number of correct responses and divide it by the number of stimuli presented and then use that variable to display it in a feedback object.

If you wanted to collect the responses as a string, you'd have to replace all the keyboard events by a text input object and then write some Javascript code to parse that string to isolate the individual responses, and then compare them to each stimuli to determine the score for each position in the sequence.

I hope these pointers are useful. It will take you a bit of time to get there if you're new to Open Sesame, but it's worth taking the time to work on it so that you fully control what the task is doing.

Best of luck,

Fabrice.