Post Loop Performance Feedback

URL of experiment: Pavlovia

Description of the problem:

Hello everyone, I am creating a version of the arrow flanker task and I am randomly interspersing thought probes at random intervals. I am hoping to provide participants with feedback about their task performance for the entirety of the experiment loop. For example, if they correctly respond to the stimuli 50/100 times, I would like to print “You answered 50% of the trials correctly” after they complete all of the experiment loops.

I am familiar with how to give performance on a trial by trial basis, but I have been unable to figure out how to do this at the conclusion of a multitrial loop. Any help would be appreciated.

thanks for your help!

Store the results from the thought probes in a variable. For example:

Begin Experiment

probesN = 0
probesCorr = 0

End Routine

if thoughtProbe:
     probesN += 1
     if probe_resp.corr:
          probesCorr += 1

Hello,

Thanks for your response. I shouldve been abit more clear. I am trying to print participants performance on correctly pressing the corresponding keyboard arrow on the flanker task for all trials. Should I use similar code to the code written above?

Thanks,

Are you using .corr for the trial-by-trial feedback? If so, then you can add .corr to the totalScore.

here is the code that I am using and the CSV output.

Begin Experiment:
msg = 'doh' 

Begin routine: 
nCorr = trials.data['key_resp.corr'].mean()
msg = "You got %i trials correct"

With this code i got the following error, " TypeError: Cannot read properties of undefined (reading ‘key_resp.corr’). Thank you for your help!

_eriksen_flanker_2024-04-10_15h26.09.253.csv (31.0 KB)

am familiar with how to give performance on a trial by trial basis

How would you do this?