Howdy, Stranger!

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

Supported by

problem with randomization code

Hello everyone!

I try to pseudorandomize the presentation order of my stimuli (videos). I used the code that was mentioned in a previous post in the forum (https://forum.cogsci.nl/discussion/80/solved-pseudorandom-order) with a few alterations in order to cover my restrictions (we don't want to have two target stimuli in immediate succession as well as more than 3 neutral stimuli).

The code is the following:

at the start of the experiment:

and at the start of a trial:


It worked perfectly when i had a small number of stimuli (around 25), but when i inserted all the stimuli that i wanted to include in my experiment (66 stimuli), it got stuck and the experiment didn't start at all (it was not responding). I use the latest version of opensesame (i tried it in an older as well and i had the same issue).


I would really appreciate any help with this issue.

Best regards,

Rania

Comments

  • Hi Rania,

    it got stuck and the experiment didn't start at all (it was not responding)

    That is probably an infinite loop then. It occurs, because your requirements are so strict that Opensesame can't find a sequence that satisfies them all. I haven't systematically looked at all the possibilities, but having 25 ones and 41 zeros, with the restriction that there is at least 1 zeros between ones, and at least 1 one every 4 zeros sounds rather restrictive. Perhaps you could lose the restriction somewhat? It might not be possible otherwise?

    Eduard

    Buy Me A Coffee

  • Hi @rania_tach,

    @eduard is right that the conditions might be too constraining to allow solutions to be found, but I also wonder whether your "for ... in ..." loop is correct. It looks as if it starts at 0 and goes up to len(video_type) but then your conditions evoke i-1, i-2 and even i-3. That seems a little odd because when the loop starts, I'm not sure what i-1 and i-2 would be equal to... But for some reason if the program considers that video_type[-1], video_type[-2] and video_type[-3] are 0, then I th ink your code would reshuffle forever... I might be wrong, though...

    Best,

    Fabrice.

    Buy Me A Coffee

  • Yes, @Fab you are right. The code is essentially wrong, for the first few i's it wraps around the list and compares the first item in the list to the last three in it. Not quite what @rania_tach wants, but also not the source for the problem. In fact, there is a good chance that the wrong code would produce a correct result, provided that the conditions were tenable.

    Eduard

    Buy Me A Coffee

  • Hi Eduard and Fab! Thank you so much for your responses!

    Yes Fab you are totally right about this part of my loop. I was trying to avoid the code breaking whith the i, i+1 etc so i tried the i-1, i-2 and somehow it worked correctly when my list wasn't that big.

    However i see Eduard you are right about the strict restrictions and the lenght of the list. Both together must have made it impossible for the experiment to begin. I might try to randomize my list externaly and then insert it to opensesame and see how this could work or maybe as you suggest reconsider my restrictions.


    Again thank you both for the help!

    Rania

  • Hi Rania,

    It might help if you break down your long list of 60ish items into small chunks of 6 or so, that you shuffle each, and then concatenate them until you are happy. A similar approach worked for me, when I wanted to control certain intertrial features of my own sequence.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    That sounds like a good plan! Thanks for the suggestion, i will try it that way.

    Best,

    Rania

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