Howdy, Stranger!

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

Supported by

"Evaluate on first cycle" - simple explanation needed.

Hi

I am building a course about Open Sesame for Graduate students without background in programming or building experiments.

I realized that I can't simplify the idea of "Evaluate on first cycle".

I read the explanation in the documentation area. Stil, I cannot find a simple enough example to explain "evaluate on first cycle" when explaining about loops for the first time.

For example, what exactly does it evaluate?

Thanks for reading,

Tali

Comments

  • Hi Tali,

    It is about the run_if statement. The evaluate on first cycle option determines whether the run if field is evaluated on the first iteration, or only on later ones. The reason for that is that it allows to use variables in the run if field that are only created in the loop. If you would tick that box, and use a variable that doesnt exist at the outset of the loop, the experiment would crash. If you use a variable that does exist, (and its value should in theory escape the loop), it will not break the loop on the first iteration.

    I hope this makes sense?

    Eduard

    Buy Me A Coffee

  • Hi @labovich,

    My understanding is that the "Evaluate on the first cycle" option determines when the 'break-if' statement (a condition that can stop the loop prematurely) is evaluated during a loop sequence If this option is selected, the 'break-if' statement is evaluated before the first cycle begins. This means that if the 'break-if' condition is met, no cycles of the loop may be executed at all. If the option is not selected, the 'break-if' statement is evaluated only before the second cycle begins, which guarantees that at least one cycle of the loop is always executed, even if the 'break-if' condition is met during that first cycle. Best thing is that you try it out to check this is indeed the case.

    Best,

    Fabrice.

    Buy Me A Coffee

  • Thanks Eduard and Fabrice! I think I'm still looking for a simple example that I can show - one that, as Fabrice mentioned, checking or unchecking the box will cause the experiment to crush, but with a very simple design (this is a very basic course)

  • FabFab
    edited June 2023

    Hi @labovich,

    In attach two examples.

    In the first, particiants can press S ahead of a loop to determine whether trials in the loop will be run or not.

    If you leave "Evaluate on first cycle" unchecked, then even if you press S before the loop beging, the first trial will be presented and the break if condition will only work on the second cycle (and so the loop will stop). If you check "Evaluate on first cycle", then it will evaluate the break if condition before the first trial of the loop runs and so if the subject pressed S, the loop will be interrupted before the first trial is presented. So in this example, nothing crashes, but the outcome varies.

    In the second example, digits come up and the subject should pres the corresponding digit or S to stop and exit the loop.

    In this case, the loop will break if [response] is S. The problem is that no response is actually gathered in this task until the first trial in the sequence has been executed. Hence, if you evaluate the "break if" condition on th first cycle, the task will seek to determine whether something that does not exist yet is equal to "S", and so the task will crash.

    If you untick the "Evaluate on first cycle" in this case, the task will ruin the first trial and if the subject pressed S in that trial, then the loop will stop.

    Hope this helps!

    Fabrice.

    Buy Me A Coffee

  • Thank you so much!!!!!!!

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