﻿<?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 5  » noreplacenot not selecting images correctly</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 20 Sep 2026 19:32:48 GMT</lastBuildDate><ttl>20</ttl><item><title>noreplacenot not selecting images correctly</title><link>https://forums.millisecond.com/Topic26272.aspx</link><description>I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B').&amp;nbsp;&lt;br/&gt;I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Aimage_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Aimage_P&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bcorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_1&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = current(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bincorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_2&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = noreplacenot(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial ABtest_P&amp;gt;&lt;br/&gt;/ validresponse = ("1","3")&lt;br/&gt;/ beginresponsetime = 2500&lt;br/&gt;/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]&lt;br/&gt;/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;/ iscorrectresponse=[(values.hpos_1 == 25% &amp;amp;&amp;amp; trial.ABtest_P.response == 2) || (values.hpos_1 == 75% &amp;amp;&amp;amp; trial.ABtest_P.response == 4)]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;</description><pubDate>Thu, 24 Jan 2019 06:41:45 GMT</pubDate><dc:creator>jrobin</dc:creator></item><item><title /><link>https://forums.millisecond.com/Topic26282.aspx</link><description>&lt;div data-id="26278" class="if-quote-wrapper" unselectable="on"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26278" 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="26278" 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="26278" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26278"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="26277" class="if-quote-wrapper" unselectable="on" data-guid="1548302073890"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26277" 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="26277" 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="26277" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jrobin - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26277"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="26274" class="if-quote-wrapper" unselectable="on" data-guid="1548302073890"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26274" 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="26274" 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="26274" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26274"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="26272" class="if-quote-wrapper" unselectable="on" data-guid="1548302073890"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26272" 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="26272" 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="26272" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jrobin - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26272"&gt;&lt;div class="if-quote-message-margin"&gt;I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B').&amp;nbsp;&lt;br/&gt;I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Aimage_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Aimage_P&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bcorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_1&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = current(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bincorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_2&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = noreplacenot(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial ABtest_P&amp;gt;&lt;br/&gt;/ validresponse = ("1","3")&lt;br/&gt;/ beginresponsetime = 2500&lt;br/&gt;/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]&lt;br/&gt;/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;/ iscorrectresponse=[(values.hpos_1 == 25% &amp;amp;&amp;amp; trial.ABtest_P.response == 2) || (values.hpos_1 == 75% &amp;amp;&amp;amp; trial.ABtest_P.response == 4)]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26272"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for &amp;lt;picture Bincorr_ABtest_P&amp;gt; after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.&lt;br/&gt;&lt;br/&gt;If you want to avoid this, you could sample *with* replacement instead.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26274"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Thanks for the response, and the help! This does solve the problem of the same picture being shown twice, but it doesn't control the number of times each picture is shown as the wrong answer. (So some may only appear once, as the right answer, and others appear multiple times.) Is there a way to control this too?&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="26277"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;The only way to control this is to define all the combinations you want and then sample from those combinations. I.e. don't use "not" constraints, don't sample with replacement, define fixed combinations satisfying the property "every image is supposed to an equal number of times, and each image is supposed to serve as the correct answer once, and as incorrect answer in a different instance."&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26278"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Ok thanks!&lt;br/&gt;</description><pubDate>Thu, 24 Jan 2019 06:41:45 GMT</pubDate><dc:creator>jrobin</dc:creator></item><item><title>RE: noreplacenot not selecting images correctly</title><link>https://forums.millisecond.com/Topic26278.aspx</link><description>&lt;div data-id="26277" class="if-quote-wrapper" unselectable="on" data-guid="1548302073890"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26277" 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="26277" 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="26277" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jrobin - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26277"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="26274" class="if-quote-wrapper" unselectable="on" data-guid="1548302073890"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26274" 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="26274" 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="26274" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26274"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="26272" class="if-quote-wrapper" unselectable="on" data-guid="1548302073890"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26272" 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="26272" 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="26272" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jrobin - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26272"&gt;&lt;div class="if-quote-message-margin"&gt;I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B').&amp;nbsp;&lt;br/&gt;I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Aimage_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Aimage_P&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bcorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_1&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = current(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bincorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_2&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = noreplacenot(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial ABtest_P&amp;gt;&lt;br/&gt;/ validresponse = ("1","3")&lt;br/&gt;/ beginresponsetime = 2500&lt;br/&gt;/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]&lt;br/&gt;/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;/ iscorrectresponse=[(values.hpos_1 == 25% &amp;amp;&amp;amp; trial.ABtest_P.response == 2) || (values.hpos_1 == 75% &amp;amp;&amp;amp; trial.ABtest_P.response == 4)]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26272"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for &amp;lt;picture Bincorr_ABtest_P&amp;gt; after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.&lt;br/&gt;&lt;br/&gt;If you want to avoid this, you could sample *with* replacement instead.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26274"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Thanks for the response, and the help! This does solve the problem of the same picture being shown twice, but it doesn't control the number of times each picture is shown as the wrong answer. (So some may only appear once, as the right answer, and others appear multiple times.) Is there a way to control this too?&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="26277"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;The only way to control this is to define all the combinations you want and then sample from those combinations. I.e. don't use "not" constraints, don't sample with replacement, define fixed combinations satisfying the property "every image is supposed to an equal number of times, and each image is supposed to serve as the correct answer once, and as incorrect answer in a different instance."&lt;br/&gt;</description><pubDate>Wed, 23 Jan 2019 20:00:35 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: noreplacenot not selecting images correctly</title><link>https://forums.millisecond.com/Topic26277.aspx</link><description>&lt;div data-id="26274" class="if-quote-wrapper" unselectable="on" data-guid="1548298662808"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26274" 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="26274" 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="26274" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26274"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="26272" class="if-quote-wrapper" unselectable="on" data-guid="1548298662808"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26272" 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="26272" 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="26272" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jrobin - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26272"&gt;&lt;div class="if-quote-message-margin"&gt;I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B').&amp;nbsp;&lt;br/&gt;I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Aimage_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Aimage_P&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bcorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_1&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = current(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bincorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_2&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = noreplacenot(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial ABtest_P&amp;gt;&lt;br/&gt;/ validresponse = ("1","3")&lt;br/&gt;/ beginresponsetime = 2500&lt;br/&gt;/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]&lt;br/&gt;/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;/ iscorrectresponse=[(values.hpos_1 == 25% &amp;amp;&amp;amp; trial.ABtest_P.response == 2) || (values.hpos_1 == 75% &amp;amp;&amp;amp; trial.ABtest_P.response == 4)]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26272"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for &amp;lt;picture Bincorr_ABtest_P&amp;gt; after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.&lt;br/&gt;&lt;br/&gt;If you want to avoid this, you could sample *with* replacement instead.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26274"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Thanks for the response, and the help! This does solve the problem of the same picture being shown twice, but it doesn't control the number of times each picture is shown as the wrong answer. (So some may only appear once, as the right answer, and others appear multiple times.) Is there a way to control this too?&amp;nbsp;</description><pubDate>Wed, 23 Jan 2019 18:58:52 GMT</pubDate><dc:creator>jrobin</dc:creator></item><item><title>RE: noreplacenot not selecting images correctly</title><link>https://forums.millisecond.com/Topic26274.aspx</link><description>&lt;div data-id="26272" class="if-quote-wrapper" unselectable="on" data-guid="1548289968462"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="26272" 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="26272" 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="26272" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jrobin - Wednesday, January 23, 2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-26272"&gt;&lt;div class="if-quote-message-margin"&gt;I'm working on programming an experiment in which participant will learn pairs of pictures (i.e. A-B), and later be tested on those pairs. At test, one picture is displayed at the top of the screen (i.e. A) and the participant has to choose between two options (i.e. B and B').&amp;nbsp;&lt;br/&gt;I used noreplace to choose the A item, and then current and noreplacenot to choose the correctly paired item and another item not part of that pair. Sometimes, however, the same image is being displayed for B and B'. I don't know why this is happening - how can I ensure that a different image is selected from the list? Ideally I'd like every B image to serve as the correct answer on one trial and as the incorrect answer on another. See below or full script attached.&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Aimage_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Aimage_P&lt;br/&gt;/ position = (50%, 25%)&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bcorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_1&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = current(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture Bincorr_ABtest_P&amp;gt;&lt;br/&gt;/ items  = Bimage_P&lt;br/&gt;/ hposition = values.hpos_2&lt;br/&gt;/ vposition = 75%&lt;br/&gt;/ select = noreplacenot(Aimage_ABtest_P)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial ABtest_P&amp;gt;&lt;br/&gt;/ validresponse = ("1","3")&lt;br/&gt;/ beginresponsetime = 2500&lt;br/&gt;/ ontrialbegin = [values.hpos_1=counter.hposition.selectedvalue; values.hpos_2=counter.hposition.selectedvalue]&lt;br/&gt;/ stimulustimes = [2000 = Aimage_ABtest_P; 2000 = Bcorr_ABtest_P; 2000 = Bincorr_ABtest_P]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;/ iscorrectresponse=[(values.hpos_1 == 25% &amp;amp;&amp;amp; trial.ABtest_P.response == 2) || (values.hpos_1 == 75% &amp;amp;&amp;amp; trial.ABtest_P.response == 4)]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="26272"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;With noreplacenot you're sampling without replacement. Now suppose only one item is left in the pool for &amp;lt;picture Bincorr_ABtest_P&amp;gt; after X trials. Then that image will be sample -- because you are sampling without replacement -- regardless of whether it satisfies the "not" constraint. In other words, "noreplace" takes precedent over "not" in situations where it's not possible to satisfy both.&lt;br/&gt;&lt;br/&gt;If you want to avoid this, you could sample *with* replacement instead.&lt;br/&gt;</description><pubDate>Wed, 23 Jan 2019 16:40:43 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>