Correct response dependent on previous trial

I am trying to program a paced auditory stimulus task. In this task a number is shows (e.g. 4). Then a second number is shown (e.g. 7) and the participant must add the two and give the correct response (11). Then a third number (e.g. 5) is shown and the participant must add it to the previous number and give the correct response (e.g. 12).

In this task the correct response is dependent on both the stimulus currently shown AND the stimulus that was previously shown. If possible I would like to be able to program this using a list so that SuperLab is choosing the number at random. However, I’m not sure if it’s possible to be able to tell SuperLab what the correct response is if that response is dependent on a previous trial. Is this possible without us having to create each trial manually ourselves (so that we already know the correct response)?

Any thoughts or suggestions would be appreciated!

I might have an idea on how to implement this, but first, what is the range of answers? e.g. 1 to 20, or 1 to 1000?

The possible answers range from 2 - 18

This experiment cannot be done in version 4. However, SuperLab 5 contains a versatile set of features that allows the construction of such an experiment, even done randomly through a list.

I have attached a template using the number range 1 to 10. To implement your own number range, simply expand the relevant stimulus list, its tags, and its related rules.

experiment.sl5 (15.5 KB)

Here is a slightly more polished version of the experiment. This one enables the use of “Keyboard - Single Keys” input so that the edit field no longer appears all the time.

addPrevious.sl5 (15.8 KB)