﻿<?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  » No replace no repeat function</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 16 Apr 2026 09:00:48 GMT</lastBuildDate><ttl>20</ttl><item><title>No replace no repeat function</title><link>https://forums.millisecond.com/Topic28644.aspx</link><description>Hi, I have a script where I am going to randomly present people with a lot of faces, each repeated for a number of times. Each time the face is presented, a different question about the face would be asked. &lt;br/&gt;I was wondering if there is a way to program the script so that the same face and the same judgment question would not be presented back-to-back. &lt;br/&gt;Right now, I used the noreplacenorepeat function but it still happened that the same face is presented in two consecutive trials. I am attaching a brief version of my script here. May I ask if there is a way to solve the problem? Thank you. &lt;br/&gt;</description><pubDate>Tue, 31 Mar 2020 23:20:51 GMT</pubDate><dc:creator>Libra</dc:creator></item><item><title>RE: No replace no repeat function</title><link>https://forums.millisecond.com/Topic28656.aspx</link><description>I see. Thank you!</description><pubDate>Tue, 31 Mar 2020 23:20:51 GMT</pubDate><dc:creator>Libra</dc:creator></item><item><title>RE: No replace no repeat function</title><link>https://forums.millisecond.com/Topic28655.aspx</link><description>&lt;blockquote data-id="28654" class="if-quote-wrapper" unselectable="on" data-guid="1585694427906" id="if_insertedNode_1585694427027" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28654" 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="28654" 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="28654" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Libra - 3/31/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28654"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi Dave,&amp;nbsp;&lt;br/&gt;Thank you for your helpful reply!&amp;nbsp;&lt;br/&gt;I was trying to use the /not function in list element, hoping it could successfully implement the second constraint. My logic was that I would like to assign a value when a Likert trial ends, depending on which question was asked. And in the subsequent trial, the Likert of the same value will be excluded from selection, so that the same question will not appear back-to-back.&amp;nbsp;&lt;br/&gt;But I was puzzled by the fact that it still did not work. Do you have an idea why using the /not function in such a way did not work? Is there really no way to implement two constraints? Thank you!&amp;nbsp;&lt;br/&gt;&lt;br/&gt;(Below is part of the script with the main edits in bold font. I have also attached the full script.)&lt;br/&gt;&lt;br/&gt;&amp;lt;trial target1&amp;gt;&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ trialduration = 0&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ branch = [list.target1_trials.nextvalue]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list target1_trials&amp;gt;&lt;br/&gt;/ items = (likert.target1_attractive, likert.target1_trustworthy, likert.target1_moral, likert.target1_like, likert.target1_getalong, likert.target1_intelligent, likert.target1_competent)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;&lt;strong&gt;/ not = [(values.judgment_number)]&lt;/strong&gt;&lt;br/&gt;/ replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_attractive&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, attractive]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 1]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_trustworthy&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, trustworthy]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 2]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_moral&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, moral]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 3]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_like&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, like]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"] &lt;br/&gt;/anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 4]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_getalong&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, getalong]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"] &lt;br/&gt;/anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 5]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_intelligent&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, intelligent]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 6]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_competent&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, competent]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 7]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="28654"&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;The items in the list are not numbers, that is why your /not constraint does nothing -- it never applies.&lt;br/&gt;&lt;br/&gt;You can implement something like this by introducing yet another set of &amp;lt;list&amp;gt;s with values 1 to 7 each as its items. Apply the /not constraint to those. Sample a value from the applicable list in the respective dummy trial, then /branch based on that value.&lt;br/&gt;&lt;br/&gt;But again, as explained in the post on constrained randomization, note that this is not fail-safe. Constraint violations can occur when a given list does not have any items left to sample that do not violate the constraint.</description><pubDate>Tue, 31 Mar 2020 22:45:32 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: No replace no repeat function</title><link>https://forums.millisecond.com/Topic28654.aspx</link><description>Hi Dave,&amp;nbsp;&lt;br/&gt;Thank you for your helpful reply!&amp;nbsp;&lt;br/&gt;I was trying to use the /not function in list element, hoping it could successfully implement the second constraint. My logic was that I would like to assign a value when a Likert trial ends, depending on which question was asked. And in the subsequent trial, the Likert of the same value will be excluded from selection, so that the same question will not appear back-to-back.&amp;nbsp;&lt;br/&gt;But I was puzzled by the fact that it still did not work. Do you have an idea why using the /not function in such a way did not work? Is there really no way to implement two constraints? Thank you!&amp;nbsp;&lt;br/&gt;&lt;br/&gt;(Below is part of the script with the main edits in bold font. I have also attached the full script.)&lt;br/&gt;&lt;br/&gt;&amp;lt;trial target1&amp;gt;&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ trialduration = 0&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ branch = [list.target1_trials.nextvalue]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list target1_trials&amp;gt;&lt;br/&gt;/ items = (likert.target1_attractive, likert.target1_trustworthy, likert.target1_moral, likert.target1_like, likert.target1_getalong, likert.target1_intelligent, likert.target1_competent)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;&lt;strong&gt;/ not = [(values.judgment_number)]&lt;/strong&gt;&lt;br/&gt;/ replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_attractive&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, attractive]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 1]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_trustworthy&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, trustworthy]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 2]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_moral&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, moral]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 3]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_like&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, like]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"] &lt;br/&gt;/anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 4]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_getalong&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, getalong]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"] &lt;br/&gt;/anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 5]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_intelligent&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, intelligent]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 6]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;likert target1_competent&amp;gt; &lt;br/&gt;/ ontrialbegin = [values.trialcount_target1 +=1]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 == 1) {values.information_books_code_target1 = list.information_books_code.nextvalue; &lt;br/&gt;values.information_partners_code_target1 = list.information_partners_code.nextvalue; &lt;br/&gt;values.information_exercise_code_target1 = list.information_exercise_code.nextvalue}]&lt;br/&gt;/ ontrialbegin = [if (values.trialcount_target1 &amp;gt; 1) {values.information_books_code_target1 = values.information_books_code_target1;&lt;br/&gt;values.information_partners_code_target1 = values.information_partners_code_target1;&lt;br/&gt;values.information_exercise_code_target1 = values.information_exercise_code_target1}] &lt;br/&gt;/ stimulustimes = [0 = fixation; 500 = picture_target1; 1000 = blank, information_books_target1, information_partners_target1, information_exercise_target1; 3000 = blank, prompt, competent]&lt;br/&gt;/ pretrialpause = 000&lt;br/&gt;/ posttrialpause = 000&lt;br/&gt;/ anchors = [1="Not at all"; 2 = ""; 3 = ""; 4 = ""; 5 = ""; 6 = ""; 7 = "Extremely"]&lt;br/&gt;/ anchorwidth = 15%&lt;br/&gt;/ numpoints = 7&lt;br/&gt;/ position = (50%, 60%)&lt;br/&gt;&lt;strong&gt;/ ontrialend = [values.judgment_number = 7]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/likert&amp;gt;</description><pubDate>Tue, 31 Mar 2020 22:16:10 GMT</pubDate><dc:creator>Libra</dc:creator></item><item><title>RE: No replace no repeat function</title><link>https://forums.millisecond.com/Topic28647.aspx</link><description>&lt;blockquote data-id="28646" class="if-quote-wrapper" unselectable="on" data-guid="1585616520854" id="if_insertedNode_1585616519540" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28646" 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="28646" 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="28646" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Libra - 3/31/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28646"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi Dave,&amp;nbsp;&lt;br/&gt;Thank you for your prompt reply and helpful suggestions! I see why my previous coding didn't work. I would like to further ask, in the script you suggested, it is still possible that the same judgment question shows up back-to-back, right? Is there a way to further implement this constraint?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="28646"&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;&amp;gt; I would like to further ask, in the script you suggested, it is still possible that the same judgment question shows up back-to-back, right?&lt;br/&gt;&lt;br/&gt;Yes, that is the case as I mentioned in my previous response.&lt;br/&gt;&lt;br/&gt;&amp;gt; Is there a way to frther implement this constraint? &lt;br/&gt;&lt;br/&gt;Not without essentially re-writing the whole script from scratch in a very different fashion. And even then, it would be somewhat of a pain to get right.&lt;br/&gt;&lt;br/&gt;These things -- constrained randomizations -- are not entirely trivial (see e.g. for a brief primer that's still generally valid: &lt;a href="https://www.millisecond.com/forums/Topic6419.aspx"&gt;https://www.millisecond.com/forums/Topic6419.aspx&lt;/a&gt; ). If satisfying both of those constraints is absolutely integral for you, consider constructing a small number (say 4 or 5) of trial sequences that satisfy the constraints by hand and then run just select one of those trial sequences at random for each participant.</description><pubDate>Tue, 31 Mar 2020 01:14:04 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: No replace no repeat function</title><link>https://forums.millisecond.com/Topic28646.aspx</link><description>Hi Dave,&amp;nbsp;&lt;br/&gt;Thank you for your prompt reply and helpful suggestions! I see why my previous coding didn't work. I would like to further ask, in the script you suggested, it is still possible that the same judgment question shows up back-to-back, right? Is there a way to further implement this constraint?&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 31 Mar 2020 00:34:15 GMT</pubDate><dc:creator>Libra</dc:creator></item><item><title>RE: No replace no repeat function</title><link>https://forums.millisecond.com/Topic28645.aspx</link><description>&lt;blockquote data-id="28644" class="if-quote-wrapper" unselectable="on" data-guid="1585608944839" id="if_insertedNode_1585608944606" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="28644" 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="28644" 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="28644" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Libra - 3/30/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-28644"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi, I have a script where I am going to randomly present people with a lot of faces, each repeated for a number of times. Each time the face is presented, a different question about the face would be asked. &lt;br/&gt;I was wondering if there is a way to program the script so that the same face and the same judgment question would not be presented back-to-back. &lt;br/&gt;Right now, I used the noreplacenorepeat function but it still happened that the same face is presented in two consecutive trials. I am attaching a brief version of my script here. May I ask if there is a way to solve the problem? Thank you. &lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="28644"&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;In the place where you use noreplacenorepeat(), namely to sample trials, there is nothing that could possibly repeat, because you've chosen to make everything its own trial.&lt;br/&gt;&lt;br/&gt;You run 140 trials, and you have 140 separate trial elements you sample from -- not a single one of those trial elements will be run twice or more, and thus none of those trials will repeat. so using noreplacenorepeat() here in the first place makes no sense. That some of those trials happen to display the same face is completely immaterial to the sampling of separate trial elements from the pool.&lt;br/&gt;&lt;br/&gt;To get what you want -- two complex constraints on sampling -- you would have to rewrite the script completely. As compromise option, you can implement one constraint with moderate effort, by introducing dummy trials for one of the dimensions (let's say target) and sampling *those* dummy trials per noreplacenorepeat() at the block-level. The respective dummy trials can then /branch to the "actual* trials sampling them randomly without replacement from a &amp;lt;list&amp;gt;s.&lt;br/&gt;&lt;br/&gt;In a nutshell&lt;br/&gt;&lt;br/&gt;&amp;lt;block judgment1&amp;gt; &lt;br/&gt;/ onblockbegin = [values.blockcount +=1]&lt;br/&gt;/ trials = [1-140=noreplacenorepeat(target1_dummy,&lt;br/&gt;target2_dummy,&lt;br/&gt;target3_dummy,&lt;br/&gt;target4_dummy,&lt;br/&gt;target5_dummy,&lt;br/&gt;target6_dummy,&lt;br/&gt;target7_dummy,&lt;br/&gt;target8_dummy,&lt;br/&gt;target9_dummy, &lt;br/&gt;target10_dummy,&lt;br/&gt;target41_dummy,&lt;br/&gt;target42_dummy, &lt;br/&gt;target43_dummy, &lt;br/&gt;target44_dummy, &lt;br/&gt;target45_dummy,&lt;br/&gt;target46_dummy, &lt;br/&gt;target47_dummy,&lt;br/&gt;target48_dummy, &lt;br/&gt;target49_dummy, &lt;br/&gt;target50_dummy)]&lt;br/&gt;/ branch = [if (values.blockcount &amp;lt; 4) block.rest]&lt;br/&gt;&amp;lt;/block&amp;gt; &lt;br/&gt;&lt;br/&gt;with&lt;br/&gt;&lt;br/&gt;&amp;lt;trial target1_dummy&amp;gt;&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ trialduration = 0&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ branch = [list.target1_trials.nextvalue]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list target1_trials&amp;gt;&lt;br/&gt;/ items = (likert.target1_attractive, likert.target1_trustworthy, likert.target1_moral, likert.target1_like, likert.target1_getalong, likert.target1_intelligent, likert.target1_competent)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;and so forth for the other targets.&lt;br/&gt;</description><pubDate>Mon, 30 Mar 2020 23:23:58 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>