Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Randomization with constraints

  1. #1

    Randomization with constraints

    Didn't find anything on this by searching the forum, so I hope I am not covering old ground...

    Does MediaLab (or DirectRT) have any way to do randomization with constraints? E.g., suppose I have two types of items, and I want to present them in random order with the constraint that I never get n (e.g., 2, or 3, or 4) of the same item type in a row? Admittedly the "no consecutive repeat" constraint is very hard to achieve in most task programming systems, but I can usually find a way to do more relaxed constraints. Just wondering how to do that in MediaLab, or even DirectRT for that matter.

    Thanks,
    -- David McFarlane, Professional Faultfinder

  2. #2
    Currently, you would only be able to complete this task using MediaLab. MediaLab has the ability to harness much more power using excel - DirectRT currently cannot.

    By using logical IF statements within excel, you should be able to create a system in which the requirements you've noted can be met. See the following link for more information:
    http://www.empirisoft.com/medialab/help/advanced_features.htm

    Let me know if you need more help creating an input file with this functionality.

    Also - it should be noted that DirectRT 2010 will have the ability to harness excel in the same way that MediaLab can before its Fall release.

  3. #3
    Currently, you would only be able to complete this task using MediaLab. MediaLab has the ability to harness much more power using excel - DirectRT currently cannot.

    Thanks. Actually, once I looked back at DirectRT, I discovered that I can implement many randomization constraints by judicious use of input lists and rwg (or wgr). Of course I could do even more with via Excel, but in many cases input lists + rwg would do good enough.

    Also - it should be noted that DirectRT 2010 will have the ability to harness excel in the same way that MediaLab can before its Fall release.
    Terrific, you beat me to it! I was going to note that curious distinction between ML and DRT, looks like you're about to take care of it. I also note that ML allows relative paths for stimulus files, whereas DRT does not, could that be fixed? And DRT has a nice rand() function that ML lacks. I have been building up a list of these curious distinctions between ML & DRT, if I compile more then I will post them for you.

    -- David McFarlane, Professional Faultfinder

  4. #4
    jarvis24 Blair Jarvis, Administrator
    David--such a list would be welcome! I would request that you direct the curious distinctions to the suggestions and feedback areas. That's where we go first when considering improvements for future versions.

  5. #5
    I'm attempting to randomize presentation items, each of which gets presented a total of three times, with the constraint that an item will not immediately follow itself. Is there a way to do this in MediaLab? I can't seem to figure out how to harness "if" to make this work.
    Many thanks for any suggestions!

  6. #6
    jarvis24 Blair Jarvis, Administrator
    Try creating a simple sample with say 6 items-2 words, used 3 times each (cat, cat, dog, dog, mouse, mouse). Then try to create a responses.xls file that does the randomization with constraints (such that one never follows itself). When you hit a roadblock, attach the file, and I'll take a look at it. Once it works with 6 items, it ought not be hard to expand it. I think it would simply be a matter of picking the first word, then picking the next, checking to ensure it's not the same as the previous word and so on. If it is the same then you pick again until it does not match. The only problem you need to account for beyond that is running out of words such that when you have only one word left, it happens to be the same as the second last word. In such a case, you would need to add a condition to start over. As I said though, try your best and then attach it here if/when you get stuck.

  7. #7
    I have the same problem. I am using DRT 2010? has this issue been solved? maybe using excel power?

    Thanks.

  8. #8
    Hi, I found a work around for this.
    Say I have a group of 4 pictures that must be displayed 3 times in random order with no overlap (4 pics, 4 pics, 4 pics). Instead of using list of stimuli I use WGR to randomize by assigning each repetition of the 4 items a WGR. Then select one of the pics and assign it a WGR or 0 in all repetitions. by strategically positioning that pic overlap can be avoided. So it would look like this (working with pic 3):
    WGR STIMULI
    1 pic 1
    1 pic 2
    1 pic 4
    0 pic 3
    ______________________
    2 pic 1
    2 pic 2
    0 pic 3
    2 pic 4
    _______________________
    0 pic 3
    3 pic 1
    3 pic 2
    3 pic 4

    It's not pure randomization but it works for me.

  9. #9
    I am having a similar issue with an experiment I want to run with directRT 2010.

    I am trying to randomize a task in which there are 24 trials with sets of images within each trial. There are images of 4 people, each with 6 different types of images (which make 24 trials in total). I want to make it so that all 4 of the same type of image do not occur all within the first half or all within the second half of the task. I do not want to constrain it so much by making 2 blocks and putting 2 of the people within the same block, and then just randomizing the order of the blocks (because there may be some effect of always putting the same 2 people together). Do you have any suggestions as to how I could do this?