Howdy, Stranger!

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

Supported by

[open] randomisation of variables

edited March 2014 in OpenSesame

Hi,

I’m relatively new to Open Sesame and have a question about randomisation. In my experiment, one trial consists of reading a paragraph of text followed by a brief video clip, after which the participant answers a question about the video clip.

There are four different categories of written text, with each category containing 16 different paragraphs (i.e. a total of 64 different texts). For the videos, I use the same four categories – in each category there are four different actors (2 male, 2 female) so that there are 16 different video clips.
For the randomisation of my experiment, I would like each of the four text categories to be shown with all 16 video clips so that each individual text is only ever seen once, whereas the videos are each shown four times over the course of the experiment. However, I want to ensure that the video clips are NOT repeated within the same text category. So for example, if the text category is ‘dominant’ then I want each individual text to be shown with male actor 1 dominant, male actor 1 submissive, male actor 1 neutral, male actor 1 aversive, male actor 2 dominant, and so on, but I don’t want to show male actor 1 dominant again with a dominant text.

I hope this makes sense. Thanks a lot for any help you can give me!

Cheers,
Jorien

Comments

  • edited 10:29PM

    Hi Jorien,

    If I understand correctly, you do not want to repeat any combination of video and category, am I right?

    To accomplish this, you could do something like the following. First, before the block (typically at the start of the block_sequence) create an empty list that will be used to keep track of which trials we've already seen, like so:

    # An empty list to keep track of which combinations of video and category have
    # been seen already.
    videoCatList = []
    

    Then, at the start of the trial_sequence, insert the following code in the prepare phase of an inline_script. See code comments for explanation. This script assumes that you have a variable video and a variable category, but you can change this to match the names used in your experiment.

    # Create a unique identifier key based on category and video, which should not
    # be repeated.
    videoCatKey = '%s-%s' % (self.get('category'), self.get('video'))
    if videoCatKey in videoCatList:
        # If we've already seen this key, then skip this trial
        exp.set('skipTrial', 1)
    else:
        # Otherwise, don't skip this trial and remember the key
        exp.set('skipTrial', 0)
        videoCatList.append(videoCatKey)
    

    This will give us the variable skipTrial that can be used to skip all items in the trial_sequence, with the following run-if statement:

    [skipTrial] = 1
    

    is that what you have in mind?

    Cheers,
    Sebastiaan

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