troubles with codes??? or macro?

I am trying to make my experiment change block after 5 number of consecutive trials are answered correctly, following the instructions on p. 33+ in the Superlab 4 manual (i.e. using a macro and codes).
However, it doesn’t work, and it seems to be due to a coding problem, as in my data file, the answers are not coded properly (they are randomly coded as “yes” or “no” or nothing at all).

here is my set up:
I have an audio file (no answer collected)
followed by a picture with two choices (correct answer must be selected by pressing the key X or M on each event separately)
I have one sound file per trial, and each trial consist of one audio file followed by a picture file with two choices. There is a conditional branching (feedback in each picture event): if the subject give the correct answer, he is moved to a new screen that says “correct”.
If the subject gives an incorrect answer, a new event says “sorry, incorrect answer”.
After the message of “correct” or “incorrect” appears, the participant must press any key to be presented with the next trial.

I have a macro: "number of trials presented in this block is equal to 5 (using only the last 5 trials in the block and trials marked with code “answered correctly” equal to “yes”)

And I have added the codes in each picture event (in feedback) to change correct answer to “yes”. Each picture event has the correct answer identified as the correct key, and each picture event has the code changing rule in the “feedback” section, along with the other conditional branching (for “correct” or “incorrect” events). I have also added all the “if true” things necessary.

However, the system keeps saying that I don’t have any codes for this experiment (even though my codes are associated with a trial).

What is it that I do wrong? Or is there a problem with the system? I work in Mac…

Can you post your experiment as an Experiment Package? This can be found under the File menu within SuperLab.

here is the experiment package (for MAC).

I made some modifications to the experiment by creating stimulus lists, and coding each tokens (in the picture files) for their corresponding correct answer (as shown in the Superlab manual).

Just to clarify, here is a summary of the problems I have:

PROBLEM 1:
Instead of changing block after 5 trials (as set up in the block macro) it seems to change after 6, sometimes 4 (never 5). I need these changes to be consistent, as I want to use Superlab for an experimental training program with English vowels, which is designed to be adaptive (the blocks will increase in difficulty level, and I need the system to change block according to the student’s performance on the previous questions).

PROBLEM 2:
I also have another macro, which is intended to get back to the previous block after two wrong trials in the same block. That macro doesn’t seem to work at all. I tried to change the order of the two macros (macro move to next block after 5 good answers, versus macro move to previous block after 2 wrong answers), but still doesn’t work. Is it possible to have such two macros running at the same time?

PROBLEM 3 (or source of problems 1 and 2???)
In the feedback of the picture files stimulus list I asked the system to change the code of correct answers to YES and that of incorrect answers to NO. But the coding doesn’t seem to work, as the codes in the column “answered correctly” do not match the correct or incorrect answers as seen in the previous columns in the saved data file.

Any idea what is going on? Anything I do wrong? Thanks for your help with this.

test2.zip (936 KB)

The macro “Exit block after 5 correct response in a row” within Block 1 was set to run “Before each trial was presented.” It should be set to “After each trial is presented.” Also, within Block 1, under the When to Run tab, it was changed to “Present trials in this block: Always”.

Please see the attached modified experiment that presents a test message. You can always delete the test message later.

test2 rev B.zip (937 KB)

still not working

Hi Monika, thanks for your help with this, I really appreciate.

I did the revisions you suggested, but I’m afraid it is still not doing what I want it to do.

  1. I want the block to change after 5 consecutive correct answers, but it seems that it counts ALL correct answers within the block rather than only the consecutive ones, to switch to the next block. This is very undesirable effect for my experiment.

  2. also, using your modified version, it changed from block 1 to block 2 after a total of 4 correct answers (rather than 5, which the macro is set to), so the coding or the macro still doesn’t seem to be working properly (i.e. not counting correct answers properly).

  3. Also, when it goes back to a previous block, I want the count for the 5 correct answers to be reset to “0”. As it is, when the subject get only one good correct answer in that previous block, it switch back to the next block right away. Anything I can do about that?

Note that I have modified the test a little, so that the subject can redo the same trial after a wrong answer (since this is a training program). I attach a copy of the new version, which includes the modifications you suggested (except for the message to exit block, which I don’t need).

Thanks again for your help with this.

izabelle
p.s. superlab has been crashing often recently. It crashed at least 3 times yesterday while I was doing some modifications to the events. Any idea why? I have some concerns about this, since the experiment is still very small as I am just trying to make things work, but it will get very big later with many blocks, trials and events, and I don’t want it to keep crashing when I try to run it.

test2_rev.zip (1.15 MB)

One big issue with your macro is that you are trying to see if the last 5 trials were answered correctly. However, you only have 4 trials, so the expression will not work as intended.

One easy workaround is to duplicate the number of entries in your stimulus list, from 4 to 8 (don’t forget to update the settings in the Event Editor’s Correct Response tab). Also, a better approach is to use SuperLab’s built-in looping facility instead of trying to achieve a loop via a macro. A colleague tells me that SuperLab implements looping by creating two internal macros before running the experiment; so it’s not going to work well with just one macro. :slight_smile:

See attached experiment. It moves to the next block after 4 consecutive correct answers. Earlier, it was counting all correct answers because when the response was incorrect, the trial was being presented again (I changed that setting). The participant had no option to move to the next trial unless she answers correctly. So by the time a trial was completed, it had to be marked as correct.

About resetting the count, this can be achieve by using the action “Clear Trials Presented in This Block Variable”.

Regarding the crashes, we are working on stability improvements. Meanwhile, if you can duplicate a crash reliably, it would be of tremendous help to our developers if you can let us know how to do so.

test2 rev B.zip (1.15 MB)

Thanks for your help again with this. Your information is very helpful, and I will try doing what you recommended.

Just a few things that I am still not sure, though:

  • how to set the Superlab’ built-in looping facility? Is it with the “when to run” in the block editor? or elsewhere? I can’t find information about this. Sorry… I don,t really understand how it works and how to set it up.

  • I also cannot find the “clear trials presented in this block variable” anywhere… is it possible to give me the steps to do this?

  • and a final question, is it possible to repeat the trials that are answered incorrectly without affecting the count of correct answers? That is, is there a way around this? Ideally, I really need this feature to work for optimal training effect (I want my subject to have to redo every trial they got wrong until they get it right before moving to the next trial). Or maybe I could set the block to change after at least 80% of correct answers on the last 10 trials or something like that? Are the “wrong” answers still changed to “correct” if the trial is repeated, or is it only the CORRECT attempt (the second one) that is changed to correct? Maybe I’m confused about how this works…

Again sorry for all my silly questions and thanks for your patience… It is only the second time I’m using Superlab and this is a little bit more complicated than what I did last time.

The built-in looping feature is in the Block Editor under the When to Run tab. The built-in looping happens if you are using one of the “while expressions” for Present next trial in this block.

The "Clear Trials Presented in this Block Variable is found in the Macro Editor, under the If True tab.

Regarding your last question, yes this is possible. You would need to create a condition at the Trial level. It should state: If answered correctly, present only IF NOT SET to Yes. The “Yes” is from the code values that you have already created.

HI again, ok, I got a few things figured out. However, I think maybe you misunderstood what I meant in my last question, sorry if I wasn’t clear. Here is what I want to do again:

  1. I want to present trials within a block until the subject has responded correctly to 5 consecutive answers (so some trials may be repeated again and again, even if they got the answer right the first time). So for this, I have created code values, and change the value to “yes” or “no” depending on whether the trial is answered correctly or not (so far so good).

  2. I also need to provide feedback (so event “correct” for correct response, and event “sorry, incorrect” for incorrect response). This works fine so far.

  3. However, I also need to repeat the same trial to give a chance to the subject to redo that trial. And as you pointed out, when I do that, the code value for this event is eventually changed to “yes” and therefore, no matter if the subject got the answer right or wrong the first time, he is moved to the next block after completing 5 trials (instead of 5 answered correctly on the first try).

Is there a way I can make the software to take into consideration the “incorrect” answers, even if the code value is changed to “yes” after the second try?

You suggested to create a condition at the trial level, you said: “It should state: If answered correctly, present only IF NOT SET to Yes. The “Yes” is from the code values that you have already created.”
But this doesn’t do what I want. It only makes the trial to be repeated LATER, not right away. I need the trial not answered correctly to be repeated right away so the subject can try it again. However, when they finally provide the right answer, I don’t want this one to count as part of the “correctly answered” trials. Did I missed or misunderstood something? Here is my new version attached.

Sorry about this, I know this is a bit complicated. Is there anything I can do about it? Does Superlab can do such thing?

experimentLevel1.zip (1.25 MB)

[QUOTE=izabelle;3813]3) However, I also need to repeat the same trial to give a chance to the subject to redo that trial. And as you pointed out, when I do that, the code value for this event is eventually changed to “yes” and therefore, no matter if the subject got the answer right or wrong the first time, he is moved to the next block after completing 5 trials (instead of 5 answered correctly on the first try).

Is there a way I can make the software to take into consideration the “incorrect” answers, even if the code value is changed to “yes” after the second try?[/QUOTE]
Unfortunately, there is no way to branch in SuperLab. When you look on the data file, it will show a SC for the Self Corrected events. This might be beneficial to you for this experiment.