psychopy.org | Reference | Downloads | Github

Creating a randomised 6-face array with y/n test

Win, PsychoPy version 190
Standalone

Hi, I’m very new to PsychoPy and coding and I’m a little stuck.
The basis of the experiment is a classic face recognition task. I have a pool of 300 faces. I need 6 faces to appear together (6 face array) in a study phase followed by a blank phase, then a yes/no test phase (6 old and 6 new faces). There are 24 trials which need to alternate between a male face and a female face trial. I need the faces to be randomised from the pool of faces and not reappear in any other trial. My major concern is getting 6 faces to appear together and randomising with no returns.
There are a lot of other things going on, but I need this up before I can worry about that.

This can be handled without any code at all, if you can accept that each person gets the same pseudo-random order. In that case, the design could be expressed entirely within a conditions file of 24 rows and 12 columns, presented sequentially.

Thanks Michael,
I’m not quite sure where 12 columns are coming from. Are they for allocating a position on the screen?
When you say each person gets the same pseudo random order- do you mean each participant will see exactly the same faces within each trial? These 24 trials actually need to be divided up into 3 blocks where music is played in some blocks. If the order stays the same then certain faces will always appear with the same music condition which will build in too much bias. It sounds like this can’t be done in builder? Thanks

No, nothing’s impossible but a custom design like this would require some code to be inserted into a code component within Builder, to run at the start of the experiment to craft a conditions file specific to that session.

I suggested a code-free option only because the design constraints had not been specified (and you’ve just added more in terms of the music blocks). You would need to specify your design very precisely if you are to turn it into a Python algorithm.

The number of columns refers to the number of variables you need access to on each trial. In this case you need 12 columns to refer to each set of six images, a 13th to record whether they are male or female faces, and possibly others to specify the music block conditions.

Thanks Michael, looks like I’m going to have to find some serious assistance with this project. I appreciate your help, thank you.