Howdy, Stranger!

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

Supported by

[open] random trial order but distributed catch trials w/out repetition

edited June 2014 in OpenSesame

Hey guys,

I set up an experiment with 348 trials in one loop item. After 24 trials there are five catch trials (with a variable "catch" being 0 or 1 indicating weather its a catch trial or not), followed by 24 trials and again 5 catch trials and so on (to find out weather the subjects are really doing the task). I want the trials to come up in random order, so I set the order of the trial sequence to random.

But now of course it can happen that one catch trial is directly followed by an other one. Do you have an idea how to prevent that or how to distribute the catch trials evenly througout the experiment still having the "real" trials in random order?

Thanks a lot in advance for your help!

Best,
Hannes

Comments

  • edited June 2014

    To clarify what my experiment looks like, this is the general structure:

    - experiment (sequence)
       *startscreen (scatchpad)
       *run_loop (loop)
          -block_sequence (sequence)
             *trials (loop)
                -trial_sequence (sequence)
                   *check_catch_break (inline script)
                   *question (scatchpad)
                   *jitter (inline script)
                   *reply (scatchpad)
                   *mouse response
                   *logger
                   *catch_log (inline script)
             *thankyou (feedback)
             *question_strategy (text_input)
             *logger
       *end (scatchpad)`
    

    I now tried the following:
    I added a variable "catch_log (0)" to the run_loop in order to keep track of whether the trial before was a catch trial and a variable "catch_twice (0)" which indicates if two catch trials are following each other.
    The check_catch_break inline script is set to run if "always" and contains the following in the prepare phase:

    if exp.get("catch_log") and exp.get("catch"):   #if before and now are catch trials
        exp.set("catch_twice", 1)                               
        exp.items['trial_sequence'].count = exp.items['trial_sequence'].count - 1   
    else:
        exp.set("catch_twice", 0)
        exp.set("catch_log", exp.get("catch"))
        #check if its time for a break [...]`
    

    I was hoping that this will have the effect that if a catch trial is followed by an other one opensesame would go back one step and randomly choose again which trial is coming up, until it is not a catch trial again. Therefore I set all other items in the trial_sequence to run if "not [catch_twice]".

    It seems to work so far that now at least it does not happen that two catch trials are right after each other anymore. It is not the perfect solution, since they are not evenly distributed. But I do not want to do the pseudo randomisation by hand with an inline script since I already added all the stimulus images and other variables in the loop items variable cells which total up to 3828 variables.
    But there is one problem left: It looks like that the catch trials that are skipped because they follow a previous catch trial are lost and do not come up during the entire experiment.

    Any idea how to prevent that? I hope my solution of decrementing the internal item count does not have any other bad consequences, since I am not yet understanding opensesame's underlying internal structure of the items and phases.

    I would appreciate any ideas and comments on this,

    cheers
    Hannes

  • edited 1:19PM

    Hi Hannes,

    One way to do this, a bit easier than what you're doing right now, is to add a catch trial (let's call it catch_sequence) to your trial_sequence, and use a run-if statement so that catch_sequence is only executed once every 24 trials.

    So let's say that you have a structure like this:

    image

    Then you could use the following Python-style run-if statement so that it's only executed after every 24 trials:

    =(self.get('count_trial_sequence')+1) % 24 == 0
    

    For the logic behind this statement (although in a slightly different context), see:

    Of course, you can have catch_sequence do whatever you want, including running five catch trials in a row.

    Does this help?

    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