I’m creating a face XAB task, such that a face X appears and then the participant has to decide which of two faces (A or B) is the same face as face X shown a few seconds earlier. I have a conditions file with face images. I have the loop type set to “random” for each trial, as the faces are sorted by gender but I want them to be randomly mixed up. However, I don’t want any of the faces from one trial to show up in a consecutive trial. I’ve made a list of “avoidFaces” that updates at each trial, and I am able to check if face X (which is randomly chosen from my conditions file) is in avoidFaces or not. I want to be able to say that “if face X is in avoidFaces, then pick a new random face”. Is there a way to regenerate the randomly chosen face from my conditions file that is selected through PsychoPy?