Howdy, Stranger!

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

Supported by

How to implement a variable stop-signal delay in the stop-signal task?

Dear all,

I have activated your version of the stop-signal task (SST), but I would to implement an adaptive procedure that prolongs the stop-signal delay (SSD, i.e., the period of time between the target stimulus and the stop-signal) after each successful Stop-trial and shortens it after each unsuccessful one.

More specifically, at the start of the experiment the SSD should be 200 ms, and after a successful inhibition the SSD increases with 50 ms, and after an unsuccessful inhibition the SSD decreases with 50 ms (with a minimum SSD of 50 ms).

At the moment, the SSDs are fixed (that is, there are four standard different SSDs that will occur equally often during the experiment), but this makes the SST non-adaptive.

Can you guys help me out with this? Thank you in advance!

Best,
Rubin

Comments

  • Hi Rubin,

    In the end of a trial sequence, you can add an inline_script and put this code in the run phase:

    # I don't know the variables in the SST task, so you'd have to change them if necessary
    
    if var.correct == 1:
        var.SSD += 50
    if var.correct == 0 and SSD >99:
        var.SSD -=50
    

    Also, the variable var.SSD needs to be initialized somewhere in the beginning of the experiment. So, you could add another inline_script somewhere in the beginning of a block or of the exeperiment and add the line; var.SSD = 200. Does this make sense?

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Thank you for your quick response! Your code does make sense, but if I try that I get an error message :neutral:

    Are you able to check what's wrong? Here is the structure of my experiment.

    This is your code for the adaptive SSD that I've implemented

    But in the end, I get this error message:

    Maybe the problem is that my python inline script should be in the coroutine list (which isn't possible at the moment in opensesame)?

    Hope you can help me out with this!

    Best,
    Rubin

  • Hi rubin,

    the variables var.SSD and var.stop_after have to have the same name. Otherwise, you can't do the operation var.stop_after + 50. Like the error message says, the variable does not exist.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Oh that was a stupid mistake .. However: I changed the 'stop_after' variables into 'SSD', and I still get the error message saying that SSD is not defined.

    Ruben

  • If you initialize var.SSD in the inline_script, you don't need the column in the loop table. In fact, this is the reason, you get the error you are talking about as there is no specified value in most of the rows.

    Does this make sense? Can you try that and let me know whether the problem was solved?

    Eduard

    Buy Me A Coffee

  • And also:

    There is an error in the inline_script "SSD_adaptive". In the second if statement, you have to replace and SSD >99 with and var.SSD >99. The variable SSD doesnt exist, but only var.SSD.

    Eduard

    Buy Me A Coffee

  • Dear all

    Thank you RubinCS for posing this question (I too am trying to implement a variable SSD), and thank you eduard for your answer, which was very helpful! I used the code you suggested and it worked. I have made a minor modification for the code: My loop contains a variable called stop_signal (with 0 = inhibit response) and I added this to the code “and var.stop_signal == 0”. As far as I know the SSD should only increase if the participant inhibits his response correctly and the SSD should decrease when the participant erroneously reacts although he should inhibit his response. If you don’t add this argument “and var.stop_signal == 0” then the SSD changes after every response (regardless of whether it was a stop trial or not). I’m not sure if my suggestion is of any use but it seemed to work for me (I’m rather new to OpenSesame)… I hope this helps!

    I have 2 follow-up questions and hopefully someone can help me out:

    1. At the moment the SSD increases continuously (given that my experiment will contain around 400 trials this means that the SSD could be somewhere around 2000ms for example). I want the SSD to be between 0 and 500ms (so 500ms should be the absolute maximum). How can I define this range from 0 to 500ms with 500ms being the top maximum?

    2. Normally the rate of stop trials is about 25%. I could adjust the ratio of stop signals in the loop and then adjust the amount of cycles in order to get a rate of 25% stop trials. Is there an another, easier way to get the intended rate of stop trials? For example some kind of weighting procedure?

    Thank you for your help!

  • Hi,

    I want the SSD to be between 0 and 500ms (so 500ms should be the absolute maximum).

    You can apply the adjustment only if the SSD is smaller than 500 ms. Or fix it, once it exceeds the limits:

    # compute the new SSD
    if var.SSD > 500
         var.SSD = 500
    elif var.SSD < 0:
        var.SSD = 0
    

    Yes?

    Is there an another, easier way to get the intended rate of stop trials?

    Can you elaborate a little more what it is precisely that you need?

    Eduard

    Buy Me A Coffee

  • Dear Eduard

    1. Thank you for your answer and your help!

    2. I'm sorry, I'm going to try to be more precise: In my stop signal task I would like to have 25% stop trials and 75% go trials (e.g. 400 trials in total --> 300 go trials and 100 stop trials). I solved this problem by creating 8 rows in a loop with 6 go trials and 2 stop trials and by letting each cycle repeat 50 times (= 50 * 6 and 50 * 2). It seems to work this way but I wanted to know if there is a more elegant way to get the intended rate (i.e. 300 go trials, 100 stop trials). For example by using python?
      Does that make more sense?

    Thank you for your help!
    Kind regards

  • Hi,

    Is there a reason, you prefer not to do it the way you're doing it right now? It seems like a perfectly fine way to me (maybe you can even use 3 go and 1 nogo trial instead). Of course, you can also do it with some scripting if you wish, but it would boil down to the same thing.

    Eduard

    Buy Me A Coffee

  • Hello all,

    Even with your advices, I can't insert an SSD to the stopsignal task example. It works when the answer of stop trial is a mistake and the SSD decrease of -50 but when the answer is correct (none) nothing happened: no increase of 50 ms.




    Thanks for your help
    Frédéric

  • Hi frederic,

    Can you attach your experiment? I'd like to have a look (it is easier to work with actual code than with screenshots). I have a hunch though. Can you try replacing None with 'None'? I think Opensesame converts the None in the loop table automatically to a string, so that you have to keep this in mind when making the comparison.

    Does that make sense?

    Eudard

    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