Howdy, Stranger!

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

Supported by

Help! acc % undefined

Hi, at the end of the experiment I get that the accuracy is undefined. In the feedback I entered [acc]% In the variable table I entered correct_response. In every loop there are keyboard_response and logger. This is the structure of my task (memory updating task). Help me please, thanks!


  • Hi,

    Can you share your experiment? Ideally, with a shorten version of your experiment, in which the problem still occurs?

    My guess is that the problem is with the definition of the correct_response variable. If it does not exist or is not defined (as there are only values in some rows of your loop table), then accuracy cannot be computed properly. Other than that, I don't see anything that is obviously wrong with your code.


    Buy Me A Coffee

  • Hi Eduard,

    to get both answers I put another keyresponse in every trial_sequence and I entered the correct answer in each keyboard_response. Also I entered "None" in the rows of the loop table where there are no correct_response. But still the accuracy in the feedback is "undefined".

    I share a shorten version of my experiment. The task is to perform the operations that appear in each cell and type the final result for each cell.

    Thank you very much!

  • Hi,

    I am not sure I am understanding your experiment. Could you maybe also give an explanation of what should happen in a trial/block/the entire experiment?

    I have the hunch things are overly complicated. For example, you don't use the correct_response that you define in the loop tables, but instead hard code the response in every response item directly. This is not so good. Also, it is usually not a good idea to have multiple keyboard_responses in the same loop, but maybe that is inevitable. If I have a better undertstanding of what you want to do, I think I shall be able to help you more.


    Buy Me A Coffee

  • Hi eduard,

    you're right, sorry I didn't give you enough explanations. In each block_loop (which corresponds to a trial) two numbers appear respectively in the left cell (2000 msec) and in the right cell (2000 msec) (as if it were a span of 2 numbers). Soon after, some simple operations appear to apply to the numbers and the subject must continuously update the information in each cell (each operation appears for 3000 msec) and at the end type the final results for each cell (there is no time limit for the response).

    So in each block_loop there is the sequence that contains the sketchpad (Stimulus) with these events (defined in the table) and I have inserted two keyboard_response because the answers are 2. Is it wrong? In the table, in addition to the standard events of the trial, I also inserted 2 rows (one for the right response and one for the left response) to make the subject's response appear on the monitor while typing the response.

    The block also contains a sketchpad (Fixation) between one trial and another: I have inserted this to give the subject a little time (1500 msec) to prepare for the other trial, otherwise as soon as the answer is typed the other begins trial.

    There are 10 trials (and therefore 10 blocks). I would like to get the% accuracy of these 10 practice trials in the feedback.

    Since I am inexperienced with OpenSesame, I built each trial event in excel and then reported it in the table.

    I hope I have given you more information so that you can help me.

  • Hi,

    Thanks for clarifying, much better now, though there are still some things that I don't understand.

    However, most importantly, you have to 10 trials, each of which consist of 10 mental operations, and participant need only to respond after the last operation, so only after every trial twice (once for each cell). Is that correct?

    If so, you should not add the response item and the logger to the block loop, but after it. Otherwise, OS expects every operation to be finalized with a response, which is not what you want I think. See here:

    Something like that is probably closer to what you need.

    Other than that, following remarks:

    • you need to add a logger (linked copy) after every response, otherwise all variables from one keyboard response are overwritten by the next keyboard response and you're effectively logging only the second one.
    • don't mix loggers. the one you have in the end, is a different logger object than all your other loggers. That is calling for trouble. Generally it is wiser to use a single logger and make linked copies in case you need multiple of it.

    Not sure whether any of these two problems will fix the [acc] problem. They might, but it is a bit hard to predict, because I have a hard time to predict what would happen in the experiment.

    I hope I have given you more information so that you can help me.

    Well, does your experiment work the way you want it to work (other than the issue with the accuracy)? It is a little unnecessary complicated making not good use of the functionality Opensesame provides. I would almost say it is worth trying to re-implement it. That is, if you have to put more work into it anyway. If the accuracy issue is all that is left thats needs fixing, it makes sense to just leave it as it is.

    Normally, it is unnecessary to have every trial as separate elements in the experiment, but rather build another loop around the block loop that you have, but I am not sure this is feasible in your case. To be able to tell you, I would need more information of how you define the parameters for each operation per trial. Are they constant across trials? Random altogether?

    In the table, in addition to the standard events of the trial, I also inserted 2 rows (one for the right response and one for the left response) to make the subject's response appear on the monitor while typing the response.

    That part I don't quite understand. Normally you would have as many rows in the loop table as there mental operations, that also means, that these rows are usually more or less identical. I don't really understand what the [response] is supposed to do.

    Since I am inexperienced with OpenSesame, I built each trial event in excel and then reported it in the table.

    Yeah, I see. This might make sense for a single case, but there is a good chance you will save time in the future, if you invest extra time now to learn Opensesame better. So, I would recommend that you play with some of the tutorials before continuing with the experiment.

    Hope his helps,


    Buy Me A Coffee

  • Okay, I just tried your experiment again, I think I get it now. So, you are a bit sneaky in misusing the same sketchpad that you use for stimulus presentation for feedback presentation. That works, it seems, but complicates other things. I think that can be implemented more elegantly, but to be sure, I would need the info I asked of you above, about how you choose which operation is executed at which location, and the timeout

    Buy Me A Coffee

  • Hi,

    thank you very much for these tips!

    I have 10 trials each of which consists of 2 target numbers 1 to 9 (one in the left cell and one in the right cell) and 4 or 5 mathematical operations (-2 to + 2 except 0). The subject must apply the operations presented in the cells and continuously update the information in each cell. After the 4 or 5 operations the subject has to type the final results respectively in the left cell and in the right cell (both the intermediate results and the final results range from 1 to 9). In 5 trials there are 4 operations and in other 5 trials there are 5 operations. I inserted them alternately (the first trial contains 4 operations, the second trial 5 operations, the third 4 etc ..).

    I built each trial in excel to be able to check different parameters a priori: counterbalance the number of operations to be presented on the left and right, the type of operation and be sure that both the intermediate (while the subject performs the operations) and final results do not go under 1 and over 9. I have arbitrarily set the presentation time for both initial target numbers and operations.

    I would like the response that the subject types for both the left and right cell would come out on the monitor, so I inserted those two lines (one after the left answer and one after the right answer) in which the response of the participant is projected as a Stimulus and remains there for 1sec. I don't know how to give it the command to project responses when they are typed. Is there another way to do it?

    I inserted a copied logger after each response and made the linked copies and the trial works fine until I type the second response (the result of the right cell). After the experiment does not go on by itself, but it is necessary type 2 more times to then bring up the fixation. The acc % is still undefined.

    Thanks again!

  • Hi,

    attached a working example of your practice sessions. I took the freedom to simplify your experiment. You can still design your loop tables in excel, but instead of copy&pasting it, you can directly use the files as input (see here). Essentially, add your excel files to the file pool, and set the file name of the excel file that you want to load for a particular trial as a variable. Like that, you can loop over the trials, instead of hardcoding every single one of them (check out the two example files in the file pool)

    Other than that, I took the response part out of the stimulus loop (that would be bad practice). For now, I only added 2 trials to the loop, but if you have the source excel files you can easily extend it to 10 trials, by adding them to the file pool and adding the filename to the outer loop's loop table.

    Hope this helps,


    Buy Me A Coffee

  • Thank you very much Eduard! You are really precious to me!

    I added the other trials directly from the excel file that I had already prepared and the experiment works as I would like it to work.

    I need to ask you two more information:

    1) the duration of the two initial stimuli is 2000 ms, but I would like the operations to have a duration of 3000 ms. A single duration is indicated in the inline script. How can I indicate a different duration for the operations (even if these are identified as Stimulus in the excel files) in the inline script?

    Alternatively, could I leave the "Stimulus Duration" column in the excel files as I did before and indicate 2000 ms for the first two stimuli and 3000 ms for the operations? See here:

    2) I need the operations to have the sign in front (- and +). Although I put it in the excel files, the + sign does not appear during the experiment. This could be confusing for the participant who may not realize that this is an operation to be performed (when 2 or 1 is presented without the + sign it is not clear that 2 or 1 must be added).

  • Glad it helped.

    Alternatively, could I leave the "Stimulus Duration" column in the excel files as I did before and indicate 2000 ms for the first two stimuli and 3000 ms for the operations?

    Yes, that's the best option I would say. Alternatively, remove the stimuli from the loop (present them before).


    I think this is because of Opensesame's smart typing. If you add characters to the operation you should be fine. Try adding whitespace before and/or after the operation. If this doesn't help, it might help to add quotation marks (e.g. "+2") around the operation. Alternatively split the stimulus into operation and operand, and present them separately (two separate text elements on the same sketchpad), that will work for sure.


    Buy Me A Coffee

  • I am not sure I am understanding this:

    Should I create another column in excel to split them to create another text in the same sketchpad?

  • yes, exactly!

    Buy Me A Coffee

  • I Eduard,

    now I can't understand why the experiment doesn't start. Perhaps the column StimulusDuration that I inserted in the excel files could have given problems? I get this:

  • I solved the problem, I believe it was columns formatted in excel files. I directly created new excel files and now opensesame reads all the files.

  • I Eduard,

    please, I need your help again. I built the whole task, but I have problems with accuracy.

    At the end of the practice loop span 2 I get wrong accuracy (25%) and at the end of the experimental loop span 2 I get accuracy 75%. Obviously also for the other loops that follow I get wrong accuracy. I have inserted the reset feedback in each trial sequence, but I have not solved the problem.

    I share the task with you:


This discussion has been closed.

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 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