Trials to Criterion help

For my experiment, the criteria to move to the next task is to achieve 80% or better on the last 16 trials. Below is what I have so far, but the experiment doesn’t move to the next task when I meet the 80% on the last 16 trials.

I’m not super familiar with python code and usually use the builder for programs. So any help is very appreciated.


I think that the problem is with your slice, which should just be [-16:] and not mention len

I also think that if you are going to slice off the last16 then you don’t also need to use pop(0) to remove the first item from the history.

Yes! That fixed it! Thanks so much.