Howdy, Stranger!

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

Supported by

recall task: break loop time condition and accuracy issue

Dear all,

I'm currently working on a simple experiment where participants are presented with images and then asked to recall their names. To facilitate this, I've implemented a form allowing participants to input their answers using buttons and text input widgets.

However, I've encountered two main issues:

  • I aim to grant participants a time window of 3 minutes to input as many answers as they wish. Additionally, I'd like to enable them to end the experiment whenever they feel they're done. While the latter functionality works smoothly, I'm facing challenges with the timing aspect. I've attempted to implement a solution by setting a start time () and then defining a timeout duration. My approach involves checking if the difference between the current time and the start time exceeds the timeout value:
if clock.time() - start_time > timeout:
   end_exp = True 

However, this approach isn't yielding the desired results. I've also experimented with using variables automatically generated by the software, such as time_form, which represents the time of the answer input form. While this method works better, it seems that the program only checks the value of the variable at the beginning of each new routine. Consequently, the timeout condition is only evaluated when a new action occurs, leading to termination of the experiment in delay. I've attempted to circumvent this issue by setting a break condition within the if statement, such as time_form > 30000. However, the program seems to evaluate this condition only after a new action is initiated, resulting in a delayed response (and break of the loop).

I believe there must be a way to continuously monitor the passage of time and evaluate the break condition dynamically throughout the experiment, rather than solely relying on the occurrence of new actions.

Any insights or suggestions on how to resolve this issue would be greatly appreciated!!

  • My second issue concerns matching participant responses with correct responses. I would like the feedback item to display the accuracy between the words inserted by the participants and the actual correct responses set by the experiment. I've defined the variable in the loop table and entered the names of the objects below in each row. I've also left the keyboard option open so it should automatically import correct response values. Additionally, I've attempted to use a logger, but unfortunately, the and values remain fixed at 0.

What steps can I take to address this issue?

Thank you for your attention! Any help will be very much accepted


p.s. I'll attach the experiment below so that anyone interested can check the builder!

(exp. 7: time and button end condition functioning with delay) - exp 6: button working properly, time not implemented in the way described, still working on delay)



Leonardo

Comments

  • Hi Leonardo,

    First, it should be if button_fine == 'yes': not [button_fine] (Otherwise you compare whether a list is a string which is always false.

    Second, you should put the entire code of the inline_script new2_inline_script into the run phase.

    Third, your keyboard_response item, doesn't do anything. You can remove it.

    Forth, you need to set var=response in the text input widget (not the form form_var item).

    Finally, you need to manually compute the correct variable. The automatic computation only works for mouse and keyboard response items (I think). So: correct = response == correct_response should do the trick.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Eduard, thanks a lot!

    Quick update on the experiment: the time break and button conditions are working smoothly now, thanks a lot for that!

    Only one thing is still not clear: how do I get accuracy ? Without keyboard_response item the variables (acc, accuracy) do not even get activated. However, even when active (when keyboard item added); it always gives result 0, as if I didn't get any of the correct_response, which indeed I had write in the input of the form.

    I added the inline_script you suggested, and it seems to store some values but accuracy is still not affected by it. I upload here the experiment updated version… Do you know how can I get the accuracy to work?

    Thank you in advance for your precious time and help!


    Cheers,

    Leonardo


     

  • Hi Leonardo,

    Like with correct, accuracy is probably not computed automatically if you don't have a keyboard or a mouse item. So, you need to implement it yourself. The ingredients are:

    1. Before the loop initialize three variables: total_trials , and total_correct and accuracy (all to 0 )
    2. After the form, in an inline_script , you always increment total_trials by 1 (so essentially you count the number of trials), and total_correct by 1 only if response == correct_response
    3. In the same inline_script (or in a separate one after the loop), you can then compute the accuracy like so: accuracy = total_correct / total_trials

    Does this make sense?

    Eduard

    Buy Me A Coffee

  • Eduar thank you very much for your precious help!

    I've done what you suggested but then I encountered a new error. SInce I entered the variable correct_response as a column in the table of the builder's loop, the variable was calling one value (one of the correct_response) at a time, and only when accidentally my response and the correct_response picked randomly by the loop where matching in that trial, the programme would add +1 to my total_correct! In that way, obviously, I wasn't able to get the correct accuracy value.

    To solve this, I defined correct_response in the inline_script before the loop in terms of a list. This way I have been able, also by implementing your code, to get the correct accuracy and finally solve the problem.


    Thank you again,

    You have been very kind!

    Cheers,


    Leonardo

  • Eduar thank you very much for your precious help!

    I've done what you suggested but then I encountered a new error. SInce I entered the variable correct_response as a column in the table of the builder's loop, the variable was calling one value (one of the correct_response) at a time, and only when accidentally my response and the correct_response picked randomly by the loop where matching in that trial, the programme would add +1 to my total_correct! In that way, obviously, I wasn't able to get the correct accuracy value.

    To solve this, I defined correct_response in the inline_script before the loop in terms of a list. This way I have been able, also by implementing your code, to get the correct accuracy and finally solve the problem.


    Thank you again,

    You have been very kind!

    Cheers,


    Leonardo

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