Howdy, Stranger!

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

Supported by

How to repeat stimuli in a loop until n correct responses are given

edited December 3 in OpenSesame

I have built a loop with 24 sounds that play at random, with correct key responses of either "1" or "2". I would like the trials to run until a particular number of correct responses are given (for my purposes, 8), after which the experiment moves on. If this takes longer than 24 trials, I would like the loop to start over (with new randomization). I also, however, want an upper ceiling to this process -- if a participant hasn't given 8 consecutive correct responses after 3 repetitions of the loop, the experiment moves on.

The procedure for this may be similar to that proposed here (https://forum.cogsci.nl/discussion/535/solved-how-to-repeat-a-particular-trial-until-correct-before-moving-on-to-next-trial), except that I want the experiment to move on after a set number of correct responses (8), not until each trial is answered correctly (once) in turn. Please let me know what steps I might take, and if I can clarify anything.

Comments

  • Hi @JKellogg,

    This can be achieved using nested loops, break if conditions and some code.

    Level 1 loop with a single row, a high number of cycles and a break if condition.

    Level 2 loop with the 24 trials with a break if condition (that would be met if 8 correct responses have been given).

    You'd have to use code to cound the number of iteration of the Level 1 loop and set the break if condition of that loop such that it breaks if the number of iterations is greater than 3.

    You'd have to use code to count the number of correct responses in the Level 2 loop (which needs to be set to 0 right before that Level 2 loop starts) and set the break if condition of that loop so that it breaks if the number of correct responses is 8.

    Hope this helps,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab, thank you for these instructions. I've decided to approach this in a more simple way, by having participants repeat the same block of word identifications until they reach 75% accuracy. I have attached a sample to show what I'm trying to do.

    I have tried to use an inline script to say an "acc" variable is "True" if [acc] is greater than or equal to 75, and I have added a "Break if acc == True" condition to the loop. I'm getting the following error, however, relating to the syntax in the inline script:

    TypeError: '>=' not supported between instances of 'list' and 'int'

    Is there a way to "access" the [acc] score that is visible in the Feedback item and define a variable as "True" if accuracy is greater than or equal to 75%? And once that's been done, is the "Break if" condition I've included the right way to go about looping the block?

  • Hi @Fab, I believe I've found a solution to this issue, by using nested loops, and running the new sequence on an "[acc] < 75" conditional!

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