Shuffle through stimulus without coding

OS: Win11 Pro
PsychoPy version: v2021.2.3
Standard Standalone? (y/n): y
What are you trying to achieve?: I want to present some cues and some targets in a loop. I have them both in one csv file, as attached.

Right now, with both loopTypes of random and fullRandom, the choice includes both rows of one column.
I want the choice from both rows and columns to be random.

How can I make this happen using only the Builder options, and not coding?

The normal route is to have a tow columns, e.g. called cue and target.

Do you sometimes want the cue and target to be the other way around?

1 Like

I have two columns: fractals and targets, in one csv file and my loop is supposed to go through this csv file.
Right now, the choice among the fractals is random, but then any fractal comes only with the target on its own row.
What I need is, for example, gw1 would not always be chosen together with left, rather, the choice among left and right to be also random.

So what you need is independent randomisation

(see my independent randomisation demo)

1 Like

Thank you very much @wakecarter this was very helpful!
I made some progress with it, but I still get an error.
I preload my fractals like this:


In preload_fractals_1, at Begin Experiment, I create an empty list:
loaded_fractal = []
then at Begin Routine:
loaded_fractal.append(fractals)
and I loop through this 10 times for the rows 0:4.
Then in the fractals_and_targets_loop_1, I go through this once,
this_fractal = loaded_fractal.pop()
I print out the loaded_fractal and this_fractal on every repeat, and it seems to create my desired number of cases.
But then it only shows them once (only the 4 fractals), and for the 4 fractals, it doesn’t show the targets for the two that don’t have a target on their own row:
3

I would very much appreciate it if you could guide me more on this @wakecarter :slight_smile:
also another question,
isn’t there an option to simply shuffle through the rows that I load from each column of this csv file, through coding?
3

I solved the problem for now by duplicating my fractals, so I have each fractal with both left and right targets, and going through the fractals randomly.

1 Like