Howdy, Stranger!

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

Supported by

Repeating a practice block or loop?

Hello!

For my dissertation, I am running a cognitive study on 7 year old children. For one of my tasks, the child needs to obtain a baseline percentage correct on their practice trials before they can go on to do the real task.

As my code is now, I have a practice loop which consists of two blocks of practice trials. What I don't know how to do is how to repeat either the whole practice loop or a single practice block if the child needs more practice (as you would imagine, this happens quite often when you're working with 7 year olds).

Is there a way to add a repeat (either manual or automatic) to the code? I think my preference would be for it to be manual (i.e. on a page you could press one button to repeat the practice and press another to move on to the experiment) but if an "automatic" solution (i.e. if the subject gets <XX% correct, then practice loop repeats) is the only way it can be programmed, I'd take that too!

Thanks in advance for your help,
Char

Comments

  • edited November 2016

    Hi Charizard,

    It would be best to place your practice block in a loop item (and this loop item you just set to 99 cycles or something). Ticking the "show advanced options" box, you'll reveal a break-if statement that is set to never by default. You could insert something like =exp.accuracy >= 0.7.
    Now all you need is an accuracy variable. You could create and update the variable exp.accuracy in an inline_script item (run phase) that is placed in your trial sequence. To calculate the accuracy, you'll need to divide the amount of correct answers by the amount of trials, so at the start of the experiment you add these in another inline_script:

      trial_count = 0
      correct_answers = 0
      exp.accuracy = 0
    

    In the trial sequence inline_script, you add to the run phase:

     trial_count += 1
     if self.get('correct') == 1:
           correct_answers += 1
    
     exp.accuracy = float(correct_answers)/float(trial_count)
    

    Hope this helps.

    Cheers,

    Josh

  • Hi Josh

    Thanks -- this is definitely helpful!

    So to your knowledge, there isn't a "good" way to program it so that the person running the experiment can decide whether or not to repeat the practice in the moment/during the experiment? (There is a small bit of subjectivity when determining if the child "gets it" or not).

    Thanks again!
    Char(izard)

  • Hi Char,

    Here is a manual way to repeat 'a practice block'. (In my example it is simple question which is repeated.)

    You insert a question (picture or text) with two response options (eg. x and n).
    If the first is pressed, the experiment goes on. If the second is pressed, you repeat something.

        sessionRP=canvas()
        path = pool['session_nrRP.tif'] #that is the picture with the instruction to press x or n
        sessionRP.image(path)
        sessionRP.show()
        RP=keyboard(keylist=['x','n'])
        key, time=RP.get_key()
        if key =='x':  #now the part you want to repeat
            session.show()
            nb=keyboard(keylist=[1,2,3,4,5,6])
            key, time=nb.get_key()
            var.session_nr=key
    
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