Howdy, Stranger!

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

Supported by

how to repeat a block of randomized stimuli in a certain order?

Hi OpenSesame developers,
Thanks for creating such a useful tool for us!

I am building an experiment where participants hear a block of randomized audio stimuli, and then they see a block of visual words that are associated with the previous block of audio stimuli (each visual word is associated with a particular audio stimulus). Now how could I play the visual words in the same order that the audio stimuli were played?

Thanks a lot,
Mengzhu

Comments

  • Hi,

    In the beginning of the experiment (before entering the conditions), create a list that codes the order of stimuli. In an inline_script, put this code:

    # how many trials do you have? change that
    no_trials = 50
    
    import random
    var.seq = range(50)
    random.shuffle(var.seq)
    

    If you now select the specific stimulus you have to index this list and use the number that you get to index your stimulus list, e.g. stimulus_list[var.seq[var.trial_no]]
    The list order will be the same for both conditions.

    Hope this helps,

    eduard

  • Hi Eduard,
    Thank you very much for your prompt reply. I am not sure how to implement the second part of the description to mimic the order of the first block.

    The attached is a simplified version of the experiment. In block 1, participants see a block of 3 randomized trials of 'word'. In block 2, I would like to present the 'probe' stimuli in the same order as block 1 (if the order was 2, 1, 3 in block 1, then the order in block 2 should be word 2, word 1, word 3).

    Thanks a lot,
    Mengzhu

  • I meant something like that. So prespecify the sequences and the order before the trial loop, and access each item individually in it.

    Hope that helps.
    EDuard

  • Thank you so much for your time and the nice code!

  • Hi Eduard,
    Thank you very much for the clarification and code.
    Is there any way of adding more variables to the loop so that these variables can be included in the csv results file? I have added the correct responses for the trials, and it looks like it works. However, it does not work for other variables that I added, for example, in the results file, the [condition] variable did not appear in coordination with [probe] variable. Also in the results file, the [sent] variable is not correctly listed as [probe]. I attached the modified version of the experiment.

    Thanks a lot,
    Mengzhu

  • All variables that are defined in a loop table or in inline_scripts with var preceding them (e.g. var.variable_name are being written to file by default. So adding variables, means you have to define them somewhere.

    Having seen your experiment, I don't see any variables that shouldn't appear in the log file. Are you sure that there is a problem? And if so, what exactly is it?

    Eduard

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