Howdy, Stranger!

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

Supported by

Constrain NoGo trials in a Go-NoGo task

Hi all,

I am running a Go-NoGo task and want the number of successive NoGo trials to be constrained so there is at least one Go trials in between two NoGo trials. I should just be able to use constrain trial_type maxrep=1 to make sure only one NoGo trial can be presented successively. However, when I try and run the task, or press preview, it freezes until I click the mouse and then it says not responding and I have to force quit.

At the moment, I just have 25 trials imported from a file to test it works before increasing the number of trials. I have attached the script for the loop. I saw there was a previous bug with using constrain when reading from file: https://github.com/smathot/OpenSesame/issues/570. However, Sebastiaan posted a fix and I am running the most recent version of OpenSesame.

When I remove constrain trial_type maxrep=1 everything works fine, so it is clearly that causing the issue. However, I cannot work out what is causing it to freeze.

Any help would be greatly appreciated!

Best wishes,
James

Comments

  • Hi James,
    can you share your experiment? I'd like to have a look.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    I've attached here, and the constrain code is within the script of the block_loop component.

    I've been thinking, and I think I know the reason it's crashing. Each block has 25 trials, 20 go trials and 5 nogo trials. If I am constraining trial_type to a max repetition of 1, then it would not know what to do when there are several go trials in succession. If you have any advice on how I could just constrain the nogo trials, I would be very grateful.

    Best wishes,
    James

  • edited January 2019

    Hi James,

    I don't really use use the loop functionalities a lot, so maybe there is an option to do that with those functions that I don't know about, but usually I solve these kind of problems programmatically. So just use an inline_script and create a possible trial sequence in the beginning of a block. Like this you have more control over the sequence, i.e. you can specify all kinds of constrains (if you manage to think about how to implement them). Here an example:

    import random
    
    def checkDuplicates(list, test_item):
        """
        Takes a list and checks whether there are duplicates of the test_items. Returns true, if there are duplicates
        """
        # loop over list items, starting at the second. If you encounter a nogo trial, check whether the previous trial is also a nogo trial. If so return true. If nothing like this was encountered, return False
        for idx,item in enumerate(list[1:]):
            if item == test_item:
                 if list[idx-1]==test_item:
                      return True
        return False
    
    
    
    # make a list with all trials
    trials = ['go']*20 + ['nogo']*5
    
    # shuffle until no duplicates
    random.shuffle(trials)
    while checkDuplicates(trials,'nogo'):
         random.shuffle(trials)
    
    

    Hope this helps!

    Eduard

    Buy Me A Coffee

  • Hi Eduard,
    This looks like it would do the trick. Thank you very much.
    Best wishes,
    James

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