Howdy, Stranger!

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

Supported by

[Solved] Adding a break after each randomised block - Run for all main blocks except the last one

edited March 2022 in OSWeb

I am trying to compile an AXB experiment with sound stimuli. Although it has been a steep curve, in the end I managed to have something that one could call a satisfactory result.

However, the experiment needs to present randomized blocks to participants. Lotje's solution in another thread seems to work perfectly for this. I even adapted it in order to introduce some warmup trials before each main block.

However I also need to stop the session for a small break after each main block. I could of course add three other loops and add them in the block sequence and have them run depending on the block_number as above, but the problem is I don't want it to run for a third time because at that time the experiment should end.

Maybe a way to implement this is by introducing a variable that increases after each block is run and should be below a certain value for the break blocks to actually run, but I am not sure of how to implement this.

I am also attaching the experiment for your reference.

Thank you in advance for any help.

Comments

  • Hi @apodim,

    I couldn't download your task (for some reason, my antivirus blocks it) but based on your description, couldn't you add the break (e.g., a sketchpad instructing subjects to take a break) within the experiment_loop and insert [block_number]<3 as the "Run if" condition? That should ensure that the break runs after blocks 1 and 2, but not after block 3.

    Does that help?

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab ,

    Thanks for taking the time to answer!

    The problem is that

    the blocks are not presented in sequence but they are randomised in the experiment loop through the block_number variable. So block 3 might come first, second, or third.

    Sorry about the task being on a hoster. I tried to upload it here several times but it keeps failing. Maybe the antivirus does not like its extension or the website it is hosted on. I am uploading it again on send (fork of the now defunct firefox send).


  • Hi @apodim,

    Ok, now I get it (I thought that your block_number variable was actually a counter).

    Ok, so what you want to do in your case is indeed to implement a counter that gets incremented every time your block_sequence runs. It's actually easy to do. Since you're using javascript code instead of Python, I implemented the solution in Javascript.

    Here's the logic:

    (1) you set up a variable (I called it blockcounter) to 0 at the onset of the task:

    vars.blockcount=0
    

    (2) you increment that counter by one unit every time the block_seuqence runs:

    vars.blockcount++
    

    (3) you make sure that whatever sketchpad etc. you're using to implement the break in the task is set with a Run if condition : [blockcounter]<3.

    That's it! Try it out. It should work. You can download my modification here:

    Hope this helps!

    Fabrice.

    PS: I think the forum doesn't let you upload the task directly because it is greater than 1Mb in size.

    Buy Me A Coffee

  • edited March 2022

    Hi @Fab,

    Forgot to tell you that it works like a charm. It even inspired me to write a snippet to calculate accuracy.

    Thank you very much!

    Dimitrios

  • @apodim

    Hi Dimitros,

    Great, glad it's working!

    Good luck with your experiment!

    Fabrice.

    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