Cedrus Community Forums

Cedrus Community Forums (http://community.cedrus.com/index.php)
-   Experiments (http://community.cedrus.com/forumdisplay.php?f=9)
-   -   Help with randomization parameters (http://community.cedrus.com/showthread.php?t=1728)

pedrozuccolo January 22nd, 2013 10:49 AM

Help with randomization parameters
I am conducting a classical conditioning experiment in which three colored squares are presented to participants in the computer screen. Two of these pictures are paired with a mild electrical shock in approximately 1/3 of the trials, and the third is never paired with the shocks. I would like picture presentation to be random, but there has been times in which the same stimulus appeared three times in a roll during the experimental session. In my experiment, a stimulus cannot appear more than two times in a roll. I know it is possibile to randomize trials in a block once per participant, once per group or every time the block is presented, but I could not change this parameter.

Can anyone help me with this?


MonikaT January 23rd, 2013 01:59 PM

Is there anyway I can take a look at your experiment? Do you know if you are using the most current version, SuperLab 4.5.4? If you can post your experiment as an Experiment Package that would be helpful. This is found under the File menu within SuperLab.

pedrozuccolo January 24th, 2013 08:02 AM

1 Attachment(s)
I am using the 4.5.3 version of superlab. I have attached the experiment so you can take a look.


MonikaT January 25th, 2013 04:04 PM

1 Attachment(s)
I have attached a modified version of your experiment. Code values were created, one for each of the colors. Under the block level three macros were also designed. Look through the expressions and the If True and False tabs within the macros to see how they are being used. Also, under the trial level an expression was created to tag which color was presented.

pedrozuccolo February 15th, 2013 09:11 AM


I have run the updated version of the experiment and it is working perfectly now. It is also clear to me now how to use the expressions and macros. I think this will be enough for the purposes of our experiment.

Thanks for your help

pedrozuccolo March 30th, 2016 08:02 AM

Hi Monika,

I am conducting an experiment in which two sets of stimuli need to be presented eight times each in a random order. One feature of this experiment is that trials cannot be presented more than two times in a roll. I have attached different codes and expressions in the trial level to tag which stimulus was presented. Also, I have used two macros to check which stimulus was presented in the previous two trials. Al of this was based on a previous experiment you have helped me with.

Using these codes and macros, I was able to prevent trials from being presented more than two times in a row. However, some trials are not presented at all during the experiment. Fo example (trial A is presented 7 times and trial B 6 times). I am not sure what I am doing wrong and I would like some help to fix this problem.

I have attached an experiment package so you can see my experiment.


pedrozuccolo March 30th, 2016 08:22 AM

1 Attachment(s)
Sorry, I forgot to attach the file. Here it is.

Arman July 29th, 2016 10:52 AM

Currently in your design, if a trial contains a stimulus that was just presented two times in a row, it will be skipped. The key note to point out here is that this trial will be skipped indefinitely.

Because you only have two stimuli, each presented eight times, it is likely that the same stimulus is presented back to back when randomized. This is why you do not see the full sixteen trials when running the experiment.

To solve this problem, you must create codes for the test trials that denote whether or not the trial was presented, and only present these trials if the code value is "no". Then, you must create a macro that will repeat the block until all trials have the code value "yes".

I would suggest upgrading to SuperLab 5. Parameters and simple-to-use looping options make implementing this design much easier.

jcroot August 3rd, 2016 12:40 PM

I just came across this with the same question, i.e., limiting a trial type from repeating over two successive trials. I haven't found how to do this with Superlab 5, though. Any help is appreciated.

Arman August 8th, 2016 10:28 AM

1 Attachment(s)
jcroot, I have attached an experiment that should be helpful to you.

For this design, each stimulus type should have its own trial, stimulus list, and count parameter.

Upon each presentation of a certain type, its respective count increments and the other counts reset, like so:


Trials should only be presented when the counts are less than two. This will limit stimulus types from repeating over two successive trials.

All times are GMT -7. The time now is 09:30 AM.

Copyright Cedrus Corporation, 1991-2014.