Howdy, Stranger!

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

Supported by

Pseudorandomization: Problem with the "constrain"-Function

Hi everyone!

I am not very experienced in building experiments (in opensesame and not at all :D)
I have 32 pictures, of which i show 16 for three times, but I don't want two same pictures to follow each other. Other than that, the pictures should show up randomized. I think this should overall be possible, right?
I tried to implement the constrain function and I think I added it in the right way (according to the tuturial, below the setcycle-functions etc).
Nonetheless, it's always the case, that at least one picture shows up twice in a row.

I will just copy the code from the loop table and hope that helps!


Thanks in advance :)
Sofie

Comments

  • Hi Sofie,

    The reason that pseudorandomization doesn't work here is that you apply loop operations afterwards, and these mess things up. The easiest solution would probably be to create a loop table that is already weighted (i.e. some rows occur more often than others), and then only apply the constrain function. Does that make sense?

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • Hi Sebastiaan,

    thank you for your reply!
    I am not sure, if I understand it right. Does that mean, I have to make three rows in the loop table for one picture I want to show three times? Or is there another possibility?
    (Since the summary of the loop table also says something about how often the rows occur ("number of the rows: 32, all rows occur once")..).

    Best regards!

  • I tried it in the way I described above (adding more lines to the loop table, according to how often I want to show a face). It still does not work. What else can I possibly have done wrong?

    Have nice holidays :)

  • I am not sure, if I understand it right. Does that mean, I have to make three rows in the loop table for one picture I want to show three times?

    Yes, exactly.

    I tried it in the way I described above (adding more lines to the loop table, according to how often I want to show a face). It still does not work. What else can I possibly have done wrong?

    I don't know without seeing your script :wink: Could you upload your experiment here?

    Buy Me A Coffee

  • Hi Sebastiaan,

    thank you again for your rapid reply, and I wish you a Happy New Year.

    I will upload the two versions of the experiment, one how I intended to do it first (1), and the other one, how I adapted it (3) according to your help (at least I hope so).
    Unfortunately, I had to remove the pictures from the filepool due to confidentiality issues.
    The aim of the experiment is to collect attractiveness ratings to faces with a different degree of perceptual fluency, which are shown in different frequentness. I hope that is understandable.

    Best regards,
    Sofie

  • Hi Sofie,

    So here's the culprit:

    constrain face mindist=3
    shuffle
    

    First you're constraining the table such that repetitions of face have a minimum distance of 3. So far so good. But then you're shuffling the table again, which means that you're starting from scratch! So just removing the shuffle command should do the trick, at least as far as I can see.

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • Hi Sebastian,

    you are absolutely right! It works as desired and I could start testing now.
    The only problem I now have left is my slider scale. I adopted it from the Forum here, and it works nicely.
    Only thing is, that the reference point of the scale (starting point from where I can fill the bar) is always the rating position from the rating of the picture before.
    So the rating is always affected from the rating before.
    It would be awesome if there was a solution for that as well.

    Thank you a lot!
    It's very nice that everyone can find a solution by getting so much help in the forum.
    I am already "advertising" for your program at my university ;)

  • edited January 2019

    Only thing is, that the reference point of the scale (starting point from where I can fill the bar) is always the rating position from the rating of the picture before. So the rating is always affected from the rating before. It would be awesome if there was a solution for that as well.

    Just to be clear: You mean that you would like the initial value of the rating scale to be equal to the final value of the rating scale that preceded it, right? Because this is currently not the case.

    I am already "advertising" for your program at my university ;)

    Great!

    Buy Me A Coffee

  • No, its actually the other way around!
    When I conduct the experiment, the initial fill of the scale is the final fill from the rating of the picture before.
    I tried to add something like "initial_fill = x=slider_x+300" somewhere in the code but it never worked..
    What have I done wrong? Can I somehow "reset" the scale after using it?

  • Ow right, I see now. You have implemented your own slider widget. (I would not call it a rating scale. To me that suggests that there are multiple discrete options.)

        # Determine the slider fill based on the mouse position
        pos, time = my_mouse.get_pos()
        x, y = pos
        slider_fill = min(slider_w, max(0, x-slider_x))
    

    It looks like the initial fill is determined by the initial position of the mouse cursor. Probably that's what causes the carry-over effect: people click and then leave the mouse where it is. Could that be it?

    If so, then you can call my_mouse.set_pos() just before the slider. I should say, though, that mouse.set_pos() is ignored on some systems, so I'd check carefully on the experiment PC whether it actually changes the mouse position.

    Buy Me A Coffee

  • YES!! That's it. Now it works as I want it to be.
    I created the slider as a mixture of different propositions here on the forum and since I am not educated whatsoever in programming, I did not think of the mouse as a possibility.
    I am really happy I can conduct the study for my Bachelor thesis now.
    Big Thank you again for the awesome support :)

    Best regards,
    Sofie

  • I am really happy I can conduct the study for my Bachelor thesis now.

    Good luck with that!

    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