ABBA Experiment format with code component

Hi all, I’m trying to create a Navon task in psychopy (v2023.2.3), that has 4 blocks switching between having participants find the global letter or the local letter. I want to randomize the conditions so that some participants get the order global->local->local->global and others get local->global->global->local.

I will probably be using an online platform like Mturk or prolific to run this study, so I’ve been trying to work on a code component to put in the beginning of the experiment to randomly select which condition participants are put in. I tried using the Experiment Info tab to select which condition would be first, but this had to be done manually (so its probably not the best option).

Any ideas on how to make this work?

Do you mean counterbalanced or random? Does it matter if the numbers are unequal?

You can use the Pavlovia shelf or the VESPR Study Portal to counterbalance.