Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Block Randomisation with Inline Script at the Run Phase

edited July 2013 in OpenSesame

Hi

I am using the following script to randomise across the blocks. This randomises the blocks presentations BUT the number of presentation is more than the number of blocks. Can you please advice have to fixit?
I also like to use the dummy variables in the the blocks to have special randomisation orders.

Thanks in advance,

Masoud

from random import shuffle

# Uncomment for 0.25 and before
# exp = self.experiment

# Create a list of items that are part of the sequence
# These items must be present somewhere in the experiment.
# An easy solution is to add them to a dummy_sequence at
# the start of the trial and set the 'run if' statement of
# the dummy_sequence to 'never'.
item_list =  ['loop1', 'loop2', 'loop3', 'loop4','loop5','loop6']

# Randomize the item order. Of course you can also do more
# complicated things, such as have the order depend on the
# subject nr, etc.
shuffle(item_list)

# First, prepare all items
for item in item_list:
    exp.items[item].prepare()

# Now run them!
for item in item_list:
    exp.items[item].run()

Comments

  • edited 9:56AM

    Hi Masoud,

    You should set the Run if statements of the loops to 'never', like so:

    image

    Otherwise all loops are executed once in the normal way, and once by your inline script.

    Does that make sense?

    Best,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 9:56AM

    Dear Lotje
    Your kind comment works well. Thanks.

    Peace,
    Masoud

  • edited 9:56AM

    Dear Lojte
    Can I also use the dummy variables in the the blocks to have special randomisation orders?
    Masoud

  • edited 9:56AM

    Hi Masoud,

    Can I also use the dummy variables in the the blocks to have special randomisation orders?

    What kind of 'special randomisation' do you mean? If you provide us with some more information about how exactly you would like to randomise your blocks I'm sure we can figure something out.

    Best wishes,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited September 2013

    Dear Lojte,

    Here it is the design where I have 6 blocks, each one includes two sets of word stimuli with a relation between them (e.g., Shorter Than [ST] or Taller Than [TT]) to be learned and then to be tested by participants.
    Therefore, There will be ten possible pairs in each block, presented in a random sequence, and then a different random sequence of those same ten pairs again, such we have 20 relation shown.

    AB
    AC
    AD
    AE
    BC
    BD
    BE
    CD
    CE
    DE, 
    

    The point is that the same pair should not be presented successively twice (as this could happen at the point of transition between the first and the second random sequence).
    So one way to deal with that is :
    Within each random series of 10 pairs, to create a second random sequence of 0,1 to determine the left-right orientation of the display. So, for the first random series of 10 pairs we might have created the orientation sequence [0010111001] which means that, combined with the first random sequence (which determines the order of pairs), we would now have the following presentation schedule for the first 10 pairs, for example:

    AB, dominant element left (0), => A     B
    BE, dominant element left (0), => B      E
    CD, dominant element right (1), => D     C
    AE, dominant element left (0), => A     E
    AC, dominant element right (1), => C     A
    DE, dominant element right (1),     => E     D
    BD, dominant element right (1),     => D     B
    BC, dominant element left (0), => B     C
    AD, dominant element left (0), => A     D
    BE, dominant element right (1),     => E     B
    

    For the second series of 10 pairs (in a new random sequence), we just reverse the orientation for each pair, vis-a-vis the first series. So we get, for example:

    AD, dominant element right (1), => D     A
    BC, dominant element right (1),     => C     B
    CD, dominant element left (0), => C     D
    AB, dominant element right (1),     => B     A
    BD, dominant element left (0), => B     D
    BE, dominant element left (0), => B     E
    AE, dominant element right (1),     => E     A
    AC, dominant element left (0), => A     C
    BE, dominant element right (1),     => E      B
    DE, dominant element left (0), => D     E
    

    The program is ready now except for this randomization order, which I hope I could handle it.
    Any advice is appreciated.

    P.S: I have asked the same question from Sebastiaaan at the follwing address but it seems to me somehow difficult to understand.
    http://www.cogsci.nl/forum/index.php?p=/discussion/565/open-conditioned-randomisation-across-the-trial-sequence#Item_2

    Thanks,
    Masoud

  • edited September 2013

    ..and here it is the trial sequences as formatted text:

    image

    Masoud

  • Hi Massoud,

    To make pseudo-random trial lists, I would advise you to download a program called Mix. This allows you to put constraints like the ones you describe above, to your trial list. After making pseudorandom trial lists, you can simply copy-and-paste those in your loop items, and set the duration to 'sequential', instead of 'random'.

    Mix can be downloaded here:

    And the reference is:

        Van Casteren, M., & Davis, M. H. (2006). Mix, a program for pseudorandomization. Behavior research methods, 38(4), 584–589.

    I hope this helps.

    Best wishes,

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited September 2013

    Dear Lojte

    Thanks, but I guess then the same random order will be shown to all the participants. Indeed I am looking for a solution to present a unique random order to each of the participants.

    Masoud

  • Hi Masoud,

    I see what you mean. Unfortunately, I don't know of any method to do this in a fully-automatised manner.

    If I want to pseudo-randomise trial lists, I use Mix to generate new trial lists for every participant, and change the block loop accordingly. If you don't mind doing this manually, perhaps you could consider a similar method.

    Good luck!

    Best,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games