﻿<?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 6  » Randomising Trial Selection</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 20 May 2026 01:56:45 GMT</lastBuildDate><ttl>20</ttl><item><title>Randomising Trial Selection</title><link>https://forums.millisecond.com/Topic33679.aspx</link><description>Hello,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I'm looking for help on how to program an idiosyncratic presentation for sorting rules in a sorting task.&amp;nbsp;&lt;br/&gt;In my script I have a radiobutton selection of the sorting rules in which participants select 1 option of 4 possible options. Then using /skip I present this sorting rule in the first block of trials. What I want is, in a second block of trials, to randomly present one of the other 3 options. I believe should be using the /counter function. But I'm having a hard time thinking of a way to define the /items basic upon an earlier response.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks in advance&amp;nbsp;</description><pubDate>Mon, 17 Jan 2022 15:18:35 GMT</pubDate><dc:creator>raynae</dc:creator></item><item><title>RE: Randomising Trial Selection</title><link>https://forums.millisecond.com/Topic33682.aspx</link><description>&lt;blockquote data-id="33681" class="if-quote-wrapper" unselectable="on" data-guid="1642432625097" id="if_insertedNode_1642432624724" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33681" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="33681" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="33681" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 1/17/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33681"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="33679" class="if-quote-wrapper" unselectable="on" data-guid="1642432625097" id="if_insertedNode_1642422204214" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33679" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="33679" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="33679" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;raynae - 1/16/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33679"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hello,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I'm looking for help on how to program an idiosyncratic presentation for sorting rules in a sorting task.&amp;nbsp;&lt;br/&gt;In my script I have a radiobutton selection of the sorting rules in which participants select 1 option of 4 possible options. Then using /skip I present this sorting rule in the first block of trials. What I want is, in a second block of trials, to randomly present one of the other 3 options. I believe should be using the /counter function. But I'm having a hard time thinking of a way to define the /items basic upon an earlier response.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks in advance&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="33679"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You need to be more specific. Also, provide example code.&lt;a class="if-quote-goto quote-link" href="#" data-id="33681"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Here's a basic template; It contains a lot of guesswork since you didn't reveal very much about the structure of your script, but it should give you something you can adapt to your needs nonetheless.&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;values&amp;gt;&lt;br/&gt;/ selected_rule = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block first_rule&amp;gt;&lt;br/&gt;/ trials = [1=surveypage.first_rule]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage first_rule&amp;gt;&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.selected_rule = dropdown.first_rule.response; // store selected rule number in variable&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;list.rules.removeitem(values.selected_rule); // remove selected rule option from list&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;list.rulenumbers.removeitem(values.selected_rule); // remove corresponding rule number from list&lt;br/&gt;]&lt;br/&gt;/ questions = [1=dropdown.first_rule]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;// 4 rules available for the first selection&lt;br/&gt;&amp;lt;dropdown first_rule&amp;gt;&lt;br/&gt;/ caption = "select a sorting rule"&lt;br/&gt;/ options = ("&amp;lt;%list.rules.items.1%&amp;gt;", "&amp;lt;%list.rules.items.2%&amp;gt;", "&amp;lt;%list.rules.items.3%&amp;gt;", "&amp;lt;%list.rules.items.4%&amp;gt;")&lt;br/&gt;/ optionvalues = ("&amp;lt;%list.rulenumbers.items.1%&amp;gt;", "&amp;lt;%list.rulenumbers.items.2%&amp;gt;", "&amp;lt;%list.rulenumbers.items.3%&amp;gt;", "&amp;lt;%list.rulenumbers.items.4%&amp;gt;")&lt;br/&gt;&amp;lt;/dropdown&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block second_rule&amp;gt;&lt;br/&gt;/ onblockbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.selected_rule = list.rulenumbers.nextvalue; // now select one of the 3 remaining rules at random for the second round&lt;br/&gt;]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// option text displayed by the rule selection dropdown; can be any kind of descriptive text&lt;br/&gt;&amp;lt;list rules&amp;gt;&lt;br/&gt;/ items = ("Rule A", "Rule B", "Rule C", "Rule D")&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;// numerical identifiers for the rules used as optionvalues&lt;br/&gt;&amp;lt;list rulenumbers&amp;gt;&lt;br/&gt;/ items = (1, 2, 3, 4)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;// rule 1 block: skipped if selected rule is not rule #1&lt;br/&gt;&amp;lt;block rule_1&amp;gt;&lt;br/&gt;/ skip = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.selected_rule != 1;&lt;br/&gt;]&lt;br/&gt;/ trials = [1=trial.mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// rule 2 block: skipped if selected rule is not rule #2&lt;br/&gt;&amp;lt;block rule_2&amp;gt;&lt;br/&gt;/ skip = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.selected_rule != 2;&lt;br/&gt;]&lt;br/&gt;/ trials = [1=trial.mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// rule 3 block: skipped if selected rule is not rule #3&lt;br/&gt;&amp;lt;block rule_3&amp;gt;&lt;br/&gt;/ skip = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.selected_rule != 3;&lt;br/&gt;]&lt;br/&gt;/ trials = [1=trial.mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;// rule 4 block: skipped if selected rule is not rule #4&lt;br/&gt;&amp;lt;block rule_4&amp;gt;&lt;br/&gt;/ skip = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.selected_rule != 4;&lt;br/&gt;]&lt;br/&gt;/ trials = [1=trial.mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=text.mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Rule #&amp;lt;%values.selected_rule%&amp;gt; was selected. This is block.&amp;lt;%script.currentblock%&amp;gt;.")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1=sequence(block.first_rule, block.rule_1, block.rule_2, block.rule_3, block.rule_4); // first round&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2=sequence(block.second_rule, block.rule_1, block.rule_2, block.rule_3, block.rule_4); // second round&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;[/code]</description><pubDate>Mon, 17 Jan 2022 15:18:35 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Randomising Trial Selection</title><link>https://forums.millisecond.com/Topic33681.aspx</link><description>&lt;blockquote data-id="33679" class="if-quote-wrapper" unselectable="on" data-guid="1642422204549" id="if_insertedNode_1642422204214" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33679" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="33679" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="33679" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;raynae - 1/16/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33679"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hello,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I'm looking for help on how to program an idiosyncratic presentation for sorting rules in a sorting task.&amp;nbsp;&lt;br/&gt;In my script I have a radiobutton selection of the sorting rules in which participants select 1 option of 4 possible options. Then using /skip I present this sorting rule in the first block of trials. What I want is, in a second block of trials, to randomly present one of the other 3 options. I believe should be using the /counter function. But I'm having a hard time thinking of a way to define the /items basic upon an earlier response.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Thanks in advance&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="33679"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You need to be more specific. Also, provide example code.</description><pubDate>Mon, 17 Jan 2022 12:23:51 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>