[open] Random order to variables without returning
Hello, I'm trying to find the suitable way to use if conditions for what I want to do. but the following link isn't helping so I need help.
http://osdoc.cogsci.nl/usage/variables-and-conditional-qifq-statements/
After I set variables to the experiment, I assigned "random" to the order, but I need it to be random without return. For example, if a certain variable contains 1-10 numbers, and I have 7 cycles, I wouldn't want any number to appear twice, as there is an option to have 7 nembers appear without any of them repeating.
(like drawing items from a sac without returning them to it).
Thank you!
Comments
The loop item does random sampling without replacement. For example, if you have a loop table like this ...
... every number between 1 and 10 will appear exactly once. If this is not what you have in mind, could you please be a bit more specific about what you want to accomplish, and what you are doing at the moment?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
yes I didn't explain myself correctly, assume I have two variables:
shape and color, each has 8 values, and the loop in which it is has to repeat itself 7 times.
my problem is: the same shape appears twice in these 7 cycles, which I don't want.
I need each shape (and color) to appear only once during these 7 cycles.
how can I use an "if" condition in order to do that?
Thanks,
Nagham
Ah, I see. This is not possible using only the loop item, but you can do it with a simple inline script. First, you use the loop table to define the eight shapes, as you would normally. Then, you create a list of eight colors in an inline script before the block_loop (as first item of the block_sequence, say).
Then at the start of the trial_sequence, you
pop()the last color from this list, and set it as an experimental variable, like so:Hope this answers you question.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!