<item items_A>/ 1 = "Jens"/ 2 = "Gerrit"/ 3 = "Roland"/ 4 = "Heidi"/ 5 = "Grisu"/ 6 = "Hanna"</item><item items_B> / 1 = "Jens" / 2 = "Gerrit" / 3 = "Roland" / 4 = "Heidi" / 5 = "Grisu" / 6 = "Hanna"</item>
<counter counter_items_A>/ select = noreplace/ items = (1, 1, 1, 1, 1,2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6)</counter><counter counter_items_B> / select = current(counter_items_A) / items = ( 2, 3, 4, 5, 6, 1, 3, 4, 5, 6, 1, 2, 4, 5, 6, 1, 2, 3, 5, 6, 1, 2, 3, 4, 6, 1, 2, 3, 4, 5) </counter>
<text text_items_A>/ items = items_A/ select = counter_items_A</text><text text_items_B> / items = items_B / select = counter_items_B </text>
"To understand recursion, you must first understand recursion." - Unknown Zen Master
<counter primeselector>/items = (1, 1, 1, 1, 1,2, 2, 2, 2, 2,3, 3, 3, 3, 3,4, 4, 4, 4, 4,5, 5, 5, 5, 5,6, 6, 6, 6, 6)/ select = noreplace</counter><counter targetselector>/ items =(2, 3, 4, 5, 6,1, 3, 4, 5, 6,1, 2, 4, 5, 6,1, 2, 3, 5, 6,1, 2, 3, 4, 6,1, 2, 3, 4, 5)/ select = current(primeselector)</counter><text prime>/ items = primes/ select = primeselector/ position = (30,50)</text> <item primes>/1 = "Jens"/2 = "Gerrit"/3 = "Roland"/4 = "Heidi"/5 = "Grisu"/6 = "Hanna"</item><text target>/ items = targets/ select = targetselector/ position = (70,50)</text> <item targets>/1 = "Jens"/2 = "Gerrit"/3 = "Roland"/4 = "Heidi"/5 = "Grisu"/6 = "Hanna"</item><trial prime_target>/ stimulusframes = [1=prime,target]/ inputdevice = mousekey/ validresponse = (lbuttondown,rbuttondown)</trial><block present>/ trials = [1-15 = noreplace(prime_target)]</block>
jens:I was hoping for "simpler" solution because specifying the linked counter elements will be quite some work. At least for the number of items I plan to present.
<block present>/ trials = [1-15 = noreplace(prime_target)]</block>
<block present>/ trials = [1-30 = noreplace(prime_target)]</block>
Dave:That's certainly true. But I don't think there's any simpler solution than the one I outlined -- at least if you want to make sure that each pairwise combination gets actually realised. However, if that's not a priority you may consider using the '/ not' attribute for the <counter> element. This would make sure that identical items don't get paired (i.e. Jens - Jens, etc.). But note that this way there may be certain combinations appearing more than once, while other combinations may not be realised at all.On another note, the <block> definition you posted will not fully exhaust all possible combinations, I think.<block present>/ trials = [1-15 = noreplace(prime_target)]</block>With six items, there are 6*5=30 unique pairwise combinations, though. Thus setting <block present>/ trials = [1-30 = noreplace(prime_target)]</block>would present all of them.
jens:Well, what do you consider a combination? When presenting all 2-items combinations of a list of 6 items, you have 15 combinations. A combination such as Jens-Heidi is the same as Heidi-Jens. So you ignore the succession of items. The number of trials is n!/k!*(n-k)! or 15.
jens:If you are interested in all variations, you consider Jens-Heidi to be different from Heidi-Jens. The number of trials is n!/(n-k)! or 30.
<text A>/ items = ("A")/ position = (counter.positionselectorA.selectedvalue, 50)/ erase = true(255, 255, 255)</text><text B>/ items = ("B")/ position = (counter.positionselectorB.selectedvalue, 50)/ erase = true(255, 255, 255)</text><counter positionselectorA>/ items = (35, 65)/ select = noreplacenorepeat/ selectionrate = always</counter><counter positionselectorB>/ items = (65, 35)/ select = current(positionselectorA)</counter><trial mytrial>/ stimulusframes = [1=A, B]/ validresponse = (" ")</trial><block myblock>/ trials = [1-10=mytrial]</block>