﻿<?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  » choice task</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 12 Apr 2026 02:08:22 GMT</lastBuildDate><ttl>20</ttl><item><title>choice task</title><link>https://forums.millisecond.com/Topic17976.aspx</link><description>Hi Supreme being,&lt;br/&gt;&lt;br/&gt;I already asked you a question last week and you've been very helpful! So, here's another one:&lt;br/&gt;&lt;br/&gt;Two cues (stimulus A and stimulus B) appear simultaneously on the screen, so that participants have to select by mouse-clicking one of those two cues. &lt;br/&gt;Clicking on cue A gives access to a trial of task A,&amp;nbsp;whereas clicking on cue B gives access to a trial of task B.&lt;span style="font-style: italic;"&gt;&amp;nbsp;&lt;br/&gt;&lt;/span&gt;However, the number of clicks on cue A required to get access to a trial of task A increases every ten trials (during the first ten trials, the participant has to click only once on cue A in order to get access to the trial of task A, but during the next ten trials, he has to click twice, then 4 times, 8 times, 16 times, 32 times...).&lt;br/&gt;&lt;br/&gt;I would really appreciate your ideas on the best way to program this task.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Lucie&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;-&amp;nbsp;</description><pubDate>Tue, 15 Dec 2015 10:02:29 GMT</pubDate><dc:creator>Lucie1043</dc:creator></item><item><title>RE: choice task</title><link>https://forums.millisecond.com/Topic17980.aspx</link><description>You store the hposition for A and B in global variables (&amp;lt;values&amp;gt; entries) and only update those variables when the clickcount is 0, i.e. at the start of a "round":&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ aclickcount = 0&lt;br/&gt;/ arequiredcount = 1&lt;br/&gt;/ ahpos = 0%&lt;br/&gt;/ bhpos = 0%&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1-4=choiceblock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block choiceblock&amp;gt;&lt;br/&gt;/ onblockbegin = [if (block.choiceblock.totalcount &amp;gt; 0) values.arequiredcount = 2 * values.arequiredcount; ]&lt;br/&gt;/ trials = [1-10=choice]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial choice&amp;gt;&lt;br/&gt;/ ontrialbegin = [if (values.aclickcount &amp;lt;= 0) {values.ahpos=list.indicehposition.nextvalue; values.bhpos=list.indicehposition.nextvalue; }; ]&lt;br/&gt;/ ontrialend = [if (trial.choice.response=="astim") values.aclickcount+=1; ]&lt;br/&gt;/ stimulusframes = [1=astim, bstim, debug]&lt;br/&gt;/ validresponse = (astim, bstim)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.choice.response=="bstim") trial.b]&lt;br/&gt;/ branch = [if (trial.choice.response=="astim" &amp;amp;&amp;amp; values.aclickcount&amp;gt;=values.arequiredcount) trial.a else trial.choice]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list indicehposition&amp;gt;&lt;br/&gt;/ items = (30%, 70%)&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a&amp;gt;&lt;br/&gt;/ ontrialend = [values.aclickcount=0]&lt;br/&gt;/ stimulusframes = [1=mytext, debug]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b&amp;gt;&lt;br/&gt;/ ontrialend = [values.aclickcount=0]&lt;br/&gt;/ stimulusframes = [1=mytext, debug]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text astim&amp;gt;&lt;br/&gt;/ items = ("A")&lt;br/&gt;/ vposition = 50%&lt;br/&gt;/ hposition = values.ahpos&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text bstim&amp;gt;&lt;br/&gt;/ items = ("B")&lt;br/&gt;/ vposition = 50%&lt;br/&gt;/ hposition = values.bhpos&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%script.currenttrial%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text debug&amp;gt;&lt;br/&gt;/ items = ("A clicks required: &amp;lt;%values.arequiredcount%&amp;gt; | A clicks made: &amp;lt;%values.aclickcount%&amp;gt;")&lt;br/&gt;/ position = (50%, 10%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;</description><pubDate>Tue, 15 Dec 2015 10:02:29 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: choice task</title><link>https://forums.millisecond.com/Topic17979.aspx</link><description>I want to randomize the position of cue A and B in the script you wrote.&lt;br/&gt;&lt;br/&gt;In order to do so, I created the following script:&lt;br/&gt;&lt;br/&gt;&amp;lt;picture indiceA&amp;gt;&lt;br/&gt;/items = indiceA&lt;br/&gt;/vposition = 50&lt;br/&gt;/hposition = list.indicehposition.nextvalue&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture indiceB&amp;gt;&lt;br/&gt;/items = indiceB&lt;br/&gt;/vposition = 50&lt;br/&gt;/hposition = list.indicehposition.nextvalue&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list indicehposition&amp;gt;&lt;br/&gt;/ items = (30%, 70%)&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;However, I need the position of the cue to stay the same during a &amp;lt;trial choice&amp;gt; and to be random across trials.&lt;br/&gt;&lt;br/&gt;How shall I procede?&lt;br/&gt;&lt;br/&gt;Thanks again!</description><pubDate>Tue, 15 Dec 2015 08:07:38 GMT</pubDate><dc:creator>Lucie1043</dc:creator></item><item><title>RE: choice task</title><link>https://forums.millisecond.com/Topic17978.aspx</link><description>thanks a lot! It is working perfectly!</description><pubDate>Tue, 15 Dec 2015 06:26:24 GMT</pubDate><dc:creator>Lucie1043</dc:creator></item><item><title>RE: choice task</title><link>https://forums.millisecond.com/Topic17977.aspx</link><description>You can do something like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ aclickcount = 0&lt;br/&gt;/ arequiredcount = 1&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1-4=choiceblock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block choiceblock&amp;gt;&lt;br/&gt;/ onblockbegin = [if (block.choiceblock.totalcount &amp;gt; 0) values.arequiredcount = 2 * values.arequiredcount; ]&lt;br/&gt;/ trials = [1-10=choice]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial choice&amp;gt;&lt;br/&gt;/ ontrialend = [if (trial.choice.response=="astim") values.aclickcount+=1; ]&lt;br/&gt;/ stimulusframes = [1=astim, bstim, debug]&lt;br/&gt;/ validresponse = (astim, bstim)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ branch = [if (trial.choice.response=="bstim") trial.b]&lt;br/&gt;/ branch = [if (trial.choice.response=="astim" &amp;amp;&amp;amp; values.aclickcount&amp;gt;=values.arequiredcount) trial.a else trial.choice]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a&amp;gt;&lt;br/&gt;/ ontrialend = [values.aclickcount=0]&lt;br/&gt;/ stimulusframes = [1=mytext, debug]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b&amp;gt;&lt;br/&gt;/ ontrialend = [values.aclickcount=0]&lt;br/&gt;/ stimulusframes = [1=mytext, debug]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text astim&amp;gt;&lt;br/&gt;/ items = ("A")&lt;br/&gt;/ position = (40%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text bstim&amp;gt;&lt;br/&gt;/ items = ("B")&lt;br/&gt;/ position = (60%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%script.currenttrial%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text debug&amp;gt;&lt;br/&gt;/ items = ("A clicks required: &amp;lt;%values.arequiredcount%&amp;gt; | A clicks made: &amp;lt;%values.aclickcount%&amp;gt;")&lt;br/&gt;/ position = (50%, 10%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 15 Dec 2015 05:16:52 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>