Reply To: Keeping track of participant accuracy

PennController for IBEX Forums Support Keeping track of participant accuracy Reply To: Keeping track of participant accuracy

#5971
miriam
Participant

Hi Jeremy,

I now ran into a new problem when trying to access my accuracy variable during the experiment to provide feedback. Basically I just want to check whether the value lies between certain thresholds, but the statement below always seems to evaluate to false and print “Low accuracy”, even if I manually set accuracy to a higher value. Do you know how to fix this?

newTrial("feedback",
    newVar("Acc", 0.8).global()
    ,
    newText("low_acc", "Low accuracy")
    ,
    newText("high_acc", "High accuracy")
    ,
    (
      getVar("Acc") > 0.5 ? [
        getText("high_acc").print()
      ] : [
        getText("low_acc").print()
      ]
    )
    ,
    newButton("Exit")
        .center()
        .print()
        .wait()
)