﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » Counting/controlling the number of adjacent stimuli presented in 2 back task</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 03 May 2026 15:22:04 GMT</lastBuildDate><ttl>20</ttl><item><title>Counting/controlling the number of adjacent stimuli presented in 2 back task</title><link>https://forums.millisecond.com/Topic19642.aspx</link><description>Dear divine beings of the inquisit:&lt;br/&gt;&lt;br/&gt;I am adapting the "SINGLE N-BACK TASK NON_ADAPTIVE (2- KEY VERSION)" by Katja Borchert to complete a 1 back task. I have a sequence of 7 stimuli, and would like all adjacent pairs (stimuli 1&amp;amp;2, stimuli 2&amp;amp;3 etc....) to be presented back to back for all pairs for at least two times within a block. How could I accomplish that without making the block unnecessarily long?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Currently&amp;nbsp;I have target appearing 50% of the time, and the rest of the nontargets randomly chosen from the rest of the stimuli. Below is code for selecting the stimuli. Any help/suggestions are very welcomed!&lt;br/&gt;&lt;br/&gt;##############################&lt;br/&gt;######STIMULI-SELECTION: face&lt;br/&gt;&lt;br/&gt;*list.notargetvalue selects any of the 7 faces (item indices) but the one selected for values.currenttarget&lt;br/&gt;&amp;lt;list notargetvalue&amp;gt;&lt;br/&gt;/items = (1, 2, 3, 4, 5, 6, 7)&lt;br/&gt;/ not = (values.currenttarget)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;***randomly selects one of the faces as start value&lt;br/&gt;&amp;lt;picture startshape&amp;gt;&lt;br/&gt;/ items = shapes&lt;br/&gt;/select = replace&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;***selects any shape but the established target &lt;br/&gt;&amp;lt;picture nontargetshape&amp;gt;&lt;br/&gt;/ items = shapes&lt;br/&gt;/ select = notargetvalue&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;***selects the item with the same item number as the established target&lt;br/&gt;&amp;lt;picture targetshape&amp;gt;&lt;br/&gt;/items = shapes&lt;br/&gt;/select = values.currenttarget&lt;br/&gt;/size = (40%, 40%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); font-family: arial, tahoma; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"&gt;##############################&lt;/span&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); font-family: arial, tahoma; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"&gt;######trila nontarget&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;&amp;lt;trial nontarget&amp;gt;&lt;br/&gt;/ stimulustimes = [0 = nontargetshape]&lt;br/&gt;/ validresponse = (38, 30)&lt;br/&gt;/ correctresponse = (38)&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;{if (values.N == 1) values.currenttarget = values.minus1};&lt;br/&gt;{if (values.N == 2) values.currenttarget = values.minus2};&lt;br/&gt;{if (values.N == 3) values.currenttarget = values.minus3};&lt;br/&gt;{if (values.N == 4) values.currenttarget = values.minus4}&lt;br/&gt;]&lt;br/&gt;/ ontrialbegin = [values.trial_Hit = 0; values.trial_Miss = 0; values.trial_CR = 0; values.trial_FA = 0]&lt;br/&gt;/ ontrialend = [&lt;br/&gt;values.minus4 = values.minus3;&lt;br/&gt;values.minus3 = values.minus2;&lt;br/&gt;values.minus2 = values.minus1;&lt;br/&gt;values.minus1 = picture.nontargetshape.currentitemnumber;&lt;br/&gt;values.CorrReject = values.CorrReject + trial.nontarget.correct;&lt;br/&gt;values.trial_CR = trial.nontarget.correct;&lt;br/&gt;{if (trial.nontarget.response == 30) &lt;br/&gt;{values.FalseA = values.FalseA + trial.nontarget.error;&lt;br/&gt;values.trial_FA =&amp;nbsp;trial.nontarget.error;&lt;br/&gt;values.TotalFA = values.TotalFA + trial.nontarget.error}}; &lt;br/&gt;values.DV = (values.TotalHits - values.TotalFA)/values.TotalBlocks;&lt;br/&gt;]&lt;br/&gt;/ responsetime = 0&lt;br/&gt;/ posttrialpause = 250&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Fri, 02 Sep 2016 16:42:07 GMT</pubDate><dc:creator>AliciaShen</dc:creator></item><item><title>RE: Counting/controlling the number of adjacent stimuli presented in 2 back task</title><link>https://forums.millisecond.com/Topic19645.aspx</link><description>I can see #1 working *potentially*, although I don't see how it would necessarily fulfill your "[the] block [should not be] unnecessarily long" requirement, because you have no direct control when sufficient "adjacent pairings" occur. At any rate, I'd say give this a go and just see if it works reasonably well for your needs. You'll need to set up several global variables (&amp;lt;values&amp;gt; entries) to keep track of the instances / counts of the various pairings. You can then use those counts in the &amp;lt;block&amp;gt;s /stop attribute to terminate it when some criterion is reached.&lt;br/&gt;&lt;br/&gt;I frankly don't quite understand the 2nd idea. Syntax issues aside, lets say that the current target is item #4. Then, apparently, you'd want that list to exclude items #3, #4, and #5 from being selected. I'm struggling to figure out how this would end up satisfying "[I] would like all adjacent pairs (stimuli 1&amp;amp;2, stimuli 2&amp;amp;3 etc....) to be presented back to back for all pairs for at least two times." Intuitively, it seems to me that this setup would make it *harder* to achieve the desired outcome.&lt;br/&gt;</description><pubDate>Fri, 02 Sep 2016 16:42:07 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Counting/controlling the number of adjacent stimuli presented in 2 back task</title><link>https://forums.millisecond.com/Topic19644.aspx</link><description>@ Dave, thanks a lot for the reponse!&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Before I hardcode possible sequences (not ideal since the number of permutations are huge), I wonder if any one of the following method would work on inquisit?&lt;br/&gt;&lt;br/&gt;1) Create a counter that counts the number of adjacent pairs, if exceeding a certain number than end the block/experiment?&lt;br/&gt;&lt;br/&gt;2) Create a list of values that are not adjacent to the current target (see below)&lt;br/&gt;############This syntax is currently not workinng for me###########&lt;br/&gt;&lt;br/&gt;&amp;lt;list notargetvalue_notadjacent&amp;gt;&lt;br/&gt;/items = (1, 2, 3, 4, 5, 6, 7)&lt;br/&gt;/ not = (values.currenttarget) &amp;amp;&amp;amp; (values.currenttarget - 1) &amp;amp;&amp;amp; (values.currenttarget + 1)&lt;br/&gt;/ replace = true&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Fri, 02 Sep 2016 14:32:21 GMT</pubDate><dc:creator>AliciaShen</dc:creator></item><item><title>RE: Counting/controlling the number of adjacent stimuli presented in 2 back task</title><link>https://forums.millisecond.com/Topic19643.aspx</link><description>&amp;gt;  I have a sequence of 7 stimuli, and would like all adjacent pairs (stimuli 1&amp;amp;2, stimuli 2&amp;amp;3 etc....) to be presented back to back for all pairs &lt;br/&gt;&amp;gt; for at least two times within a block. How could I accomplish that without making the block unnecessarily long? &lt;br/&gt;&lt;br/&gt;Construct one or several sequences that satisfy this property by hand. Then have the script select from the sequence sequentially (/selectionmode = sequence). I don't see a way to do this "on the fly" using only random selection -- there are too many constraints involved.&lt;br/&gt;</description><pubDate>Fri, 02 Sep 2016 07:35:31 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>