constraining randomization

Hi again,

I’m trying to figure out how to insert a rule in my randomization (at the block level): I use randomization between two stimulus lists and I want to prevent superlab from presenting the same stimulus list more than three consecutive times.

I saw on the forum that someone asked this question one year ago and you said there was no solution for that, but I wondered if the new versions of superlab allow for that now.

Merci!

Frédérique

The latest version of SuperLab can handle this. Version 4.0.7 adds trial-level conditions. See the When to Present tab in the Trial Editor. You can add a condition based on the number of times the current trial has been presented.

I already use this function to prevent superlab from not presenting the same event twice.
But here, i want to ask Superlab not to choose the same stimulus list more than three consecutive times.
If I understand correctly, “when to present” doesn’t allow that, and there is no other way to do that in superlab at this time.

Keep in mind that when you use a stimulus list, SuperLab “expands” that into multiple trials when running the experiment. So if your list has 10 items, this will result in 10 trials being presented.

One possible solution is to create a code, let’s call it “List Type”, and give it three values, A, B, and C. All the items in the first list will have value A, all the items in the second list value B, and so forth. You can then create a macro that checks for the last three trials presented with code value A. If the count is less than 3, then they were not 3 consecutive items from the same list.

In fact, what i didn’t have in mind was to use a macro at the block level and when to present at the trial level, in the same time.

So, in when to present at the trial level, I said:
(for my list A) Current trial’s code “List Type” is set to “A”
(for my list B) Current trial’s code “List Type” is set to “B”

After that I wrote 2 macro at the block level:
Macro 1: Number of trials Presented in This Block is equal to 3 trials (Using only the last 3 trials in the block and Trials marked with code “List Type” equal to “A”).

If true: Change value of code “List Type” to “B” in all trials in this block.

Macro 2: the same thing but with list B … change to A

Now, when i run Superlab, it doesn’t give me more than 3 consecutive times the same list. However, after the first time Superlab prevents one of my stimulus lists to be presenting more than 3 times, i have always the same pattern for the rest of my experiment: 2 pictures of my list A and 2 pictures of my list B (AABBAABBAABBAABB…)

And I don’t see how i can have an influence on that.

Did I program something wrong?

Hi Hisham,
Could you tell me if i did something wrong in my programming, or if what i want to do is not possible ?
Thanks

Frédérique, call me, this might be faster discussed on the phone. I’ll be in this office this Thursday morning (California time) or most of the day Friday.

Frédérique, I’ve been thinking about your experiment and I think that I have a solution. Sorry for not modifying the experiment itself, but your stimulus list items looked nearly identical to me and I wouldn’t be able to test.

Anyway, I think that you had the right idea overall in your January 21 post, but with one caveat: instead of changing the value of existing code “List Type” in all trials in this block, you need to create a second code. Let’s call it Next List Type and give it three values: A, B, and Doesn’t Matter.

Initially, you would set the value of code Next List Type in your trials to Doesn’t Matter. Then, in your macro, if you have three consecutive items from list A, set the If true action to

Change value of code “Next List Type” to “B” in all trials in this block

But If false, then you need to add

Change value of code “Next List Type” to “Doesn’t Matter” in all trials in this block

Then, one last thing: in your “Catégorisation A fb” trials, you need to modify the condition in your When to Run tab to look like this:


Do the reverse for List Type B. The value of your code “List Type” should not be changed. I think that this should work unless I’ve forgotten some detail. Try it and let me know.

This solution works great!