I want to set up a paradigm in PsychoPy. Pictures will be presented one after an other for 4s each.
There are 2 groups of pictures. All should be presented in a "pseudo" random order. How can I check that there are not more than 3 pictures of the same group in a row?
PsychoPy's Builder interface isn't well suited to implementing randomisation constraints: there are just too many possible things a user might want to do, so it is difficult to create a GUI to account for the possible approaches. The usual advice here is that you would need to use the Coder. Writing your own code allows you to implement any arbitrary randomisation scheme.
If that doesn't seem practical, you could hand-craft a number of conditions files that do what you want. e.g. in Excel, randomise a list of conditions. Check for runs > 3 and shift rows around to fix that. Make a set of such files (say, 5) and randomise each subject to use one of them as the conditions file for that particular session.