A halfway elegant solution would be to
- set up a FIFO (first in, first out) type buffer holding the last n item numbers of interest via string concetanation and
- have the "unrelated" probe trial check that buffer and keep selecting probes until one is found that's not in there yet
or some sort of variation along the above lines.
Example:
<values>
/ s1 = 0
/ s2 = 0
/ s3 = 0
/ s4 = 0
/ rprobe = 0
/ uprobe = 0
/ mybuffer = "00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,"
</values>
<expressions>
/ finduprobe = {values.uprobe=counter.uprobecounter.selectedvalue;
if(contains(values.mybuffer,values.uprobe))expressions.finduprobe}
</expressions>
<block myblock>
/ trials = [1-6=noreplace(RelatedProbe,UnrelatedProbe)]
</block>
<trial RelatedProbe>
/ ontrialbegin = [values.s1=counter.stimcounter.selectedvalue; values.s2=counter.stimcounter.selectedvalue;
values.s3=counter.stimcounter.selectedvalue; values.s4=counter.stimcounter.selectedvalue]
/ ontrialbegin = [counter.rprobecounter.item.1=values.s1; counter.rprobecounter.item.2=values.s2;
counter.rprobecounter.item.3=values.s3; counter.rprobecounter.item.4=values.s4]
/ ontrialbegin = [reset(counter.rprobecounter); values.rprobe=counter.rprobecounter.selectedvalue]
/ ontrialbegin = [values.mybuffer=concat(concat(values.s1,","),values.mybuffer);
values.mybuffer=concat(concat(values.s2,","),values.mybuffer);
values.mybuffer=concat(concat(values.s3,","),values.mybuffer);
values.mybuffer=concat(concat(values.s4,","),values.mybuffer);
values.mybuffer=concat(concat(values.rprobe,","),values.mybuffer);
values.mybuffer=substring(values.mybuffer,0,45)]
/ stimulustimes = [0=debug,s1,s2,s3,s4; 2000=rprobe]
/ validresponse = (anyresponse)
</trial>
<trial UnrelatedProbe>
/ ontrialbegin = [values.s1=counter.stimcounter.selectedvalue; values.s2=counter.stimcounter.selectedvalue;
values.s3=counter.stimcounter.selectedvalue; values.s4=counter.stimcounter.selectedvalue]
/ ontrialbegin = [values.mybuffer=concat(concat(values.s1,","),values.mybuffer);
values.mybuffer=concat(concat(values.s2,","),values.mybuffer);
values.mybuffer=concat(concat(values.s3,","),values.mybuffer);
values.mybuffer=concat(concat(values.s4,","),values.mybuffer);
values.mybuffer=substring(values.mybuffer,0,42);
expressions.finduprobe;
values.mybuffer=concat(concat(values.uprobe,","),values.mybuffer)]
/ stimulustimes = [0=debug,s1,s2,s3,s4; 2000=uprobe]
/ validresponse = (anyresponse)
</trial>
<text debug>
/ items = ("Trialtype: <%script.currenttrial%>~nBuffer: <%values.mybuffer%>~n[items used in current and two previous trials]")
/ size = (50%, 15%)
/ position = (50%, 25%)
</text>
<text s1>
/ items = myitems
/ position = (20%, 50%)
/ select = values.s1
</text>
<text s2>
/ items = myitems
/ position = (40%, 50%)
/ select = values.s2
</text>
<text s3>
/ items = myitems
/ position = (60%, 50%)
/ select = values.s3
</text>
<text s4>
/ items = myitems
/ position = (80%, 50%)
/ select = values.s4
</text>
<text rprobe>
/ items = myitems
/ position = (50%, 75%)
/ select = values.rprobe
</text>
<text uprobe>
/ items = myitems
/ position = (50%, 75%)
/ select = values.uprobe
</text>
<counter stimcounter>
/ items = ("01","02","03","04","05","06","07","08","09","10","11","12",
"13","14","15","16","17","18","19","20","21","22","23","24")
/ select = noreplace
/ selectionrate = always
</counter>
<counter rprobecounter>
/ items = (0,0,0,0)
/ selectionrate = trial
/ select = replace
</counter>
<counter uprobecounter>
/ items = ("01","02","03","04","05","06","07","08","09","10","11","12",
"13","14","15","16","17","18","19","20","21","22","23","24")
/ select = noreplace
/ selectionrate = always
</counter>
<item myitems>
/ 1 = "#1"
/ 2 = "#2"
/ 3 = "#3"
/ 4 = "#4"
/ 5 = "#5"
/ 6 = "#6"
/ 7 = "#7"
/ 8 = "#8"
/ 9 = "#9"
/ 10 = "#10"
/ 11 = "#11"
/ 12 = "#12"
/ 13 = "#13"
/ 14 = "#14"
/ 15 = "#15"
/ 16 = "#16"
/ 17 = "#17"
/ 18 = "#18"
/ 19 = "#19"
/ 20 = "#20"
/ 21 = "#21"
/ 22 = "#22"
/ 23 = "#23"
/ 24 = "#24"
</item>
Regards,
~Dave