shuffle related rows
Hi,
I'm very new on Opensesame and therefore I might have a problem that is very easy to solve. But somehow I could not find a solution yet, so maybe someone could help me with this.
I need to randomize some items in a column, so every subject gets another sequence of items. The problem I have is, that this item should always be presented with another item.
I have a screenshot of the loop table:

I want to randomize the CS_closed, so that CS_closed for every subject is presented with another US_rating (US_rating consists of different images). CS_closed 1 (here: CS_Kanji1.bmp) should always be presented with the same US_rating for the respective subject. Plus, US_rating cannot be randomized because it is depending on the column valence and correct_response. I hope you can understand what I mean. Thanks!
Caro
Comments
Edit: You can see that I tried to do it blockwise, but I need a full randomization, so this is not what I was looking for.
Edit: Also tried it with coding:
But unfortunately Python always crashes.
Hello,
So if I understood you want to random one column while keeping the other constant?
If so a stategy could be:
Like this:

With the inline for randomizing and preparing the subsequant loop as:
Find the script too maybe it will be more explicit.
Just be sure you change the two loop as sequential (I do not think it matters a lot but up to you)
Best,
Sylvain
Hello Sylvain,
thank you for replying. I started the experiment you added and the first column is randomized, that's exactly what I want! But column 2 and 3 are presented sequentially (even if I change 'order' to 'random'). This should not be the case. Plus, the biggest problem I have is that the items in column 1 are presented two times, so they should be randomized but like this:
column 1, row 1 to 8 is randomized (e.g. 6, 4, 7, 3, 2, 1, 8, 5) and this order is attached to the items in column 2. Row 9 to 16 in column 1 and 2 should contain the same pairing as row 1 to 8. Does this make any sense? ':D
Caro
And maybe you could tell me what is wrong with the code mentioned above? Because I do not understand why Python always crashes.
I do not really know why it crashes otherwise if I understood what you want you could try that:
Datamatrix function are on this page:
http://datamatrix.cogsci.nl/
And find the modified script.
Hope it will work this time.
Hello Sylvain,
wow, thanks alot! This looks like it could be a very nice solution for my problem. So far I got it going by this code:
But I think your code looks much nicer and as if it could be used in a more general way. I will try it this way as well Thank you so much for your time and this nice piece of code!
Caro