﻿<?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  » Randomly select 6, 12 or 24 faces (image files) and place them at randomly selected pre-defined locations</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 05 May 2026 03:46:29 GMT</lastBuildDate><ttl>20</ttl><item><title>Randomly select 6, 12 or 24 faces (image files) and place them at randomly selected pre-defined locations</title><link>https://forums.millisecond.com/Topic20051.aspx</link><description>My problem boils down to a difficulty with generating a random subset from a list. I am not sure if this is possible, so before I drive myself crazy I figured I would come here. My specific goal is to code a task that will select a random group of faces of a specified set size&amp;nbsp;from a list and then place those faces each at one of 24 pre-defined locations. I cant even seem to generate a list of random numbers, let alone do what I want to do. I already have a version of this task coded in python but I wanted it in inquisit. Should I give up, or keep trying. Below is the code I am using to test/practice using the list element.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ test = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list testList&amp;gt;&lt;br/&gt;/ items = (5,3,4)&lt;br/&gt;/ selectionrate = always&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ itemprobabilities = uniform&lt;br/&gt;/ replace = false&lt;br/&gt;/ poolsize = 50&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;summarydata&amp;gt;&lt;br/&gt;/ columns = (values.test)&lt;br/&gt;&amp;lt;/summarydata&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text TestText&amp;gt;&lt;br/&gt;/ items = ("testText")&lt;br/&gt;/ txbgcolor = (white)&lt;br/&gt;/ size = (3%, 4.5%)&lt;br/&gt;/ hposition = 50%&lt;br/&gt;/ vposition = 50%&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ erase = false&lt;br/&gt;/txcolor = (black)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial TestTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = TestText]&lt;br/&gt;/ trialduration = 70&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block 1&amp;gt;&lt;br/&gt;/onblockbegin= &lt;br/&gt;[values.test = list.testList.poolitems.1]&lt;br/&gt;/ trials = [1 = TestTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;As I understand the pool attribute, I should be generating a pool of 50 items that are randomly selected but when I ask inquisit what the first item in the pool is, it is always 5. This doesnt seem to be very random at all. If I cant generate a random order to (at the absolute very least) shuffle my list, I cannot do what I want to do. Any help will be much appreciated.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Mike&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 07 Nov 2016 06:29:49 GMT</pubDate><dc:creator>mlleng13</dc:creator></item><item><title>RE: Randomly select 6, 12 or 24 faces (image files) and place them at randomly selected pre-defined locations</title><link>https://forums.millisecond.com/Topic20052.aspx</link><description>&lt;div data-id="20051" class="if-quote-wrapper" unselectable="on" data-guid="1478528820954"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20051" 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="20051" 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="20051" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;mlleng13 - Monday, November 07, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20051"&gt;&lt;div class="if-quote-message-margin"&gt;My problem boils down to a difficulty with generating a random subset from a list. I am not sure if this is possible, so before I drive myself crazy I figured I would come here. My specific goal is to code a task that will select a random group of faces of a specified set size&amp;nbsp;from a list and then place those faces each at one of 24 pre-defined locations. I cant even seem to generate a list of random numbers, let alone do what I want to do. I already have a version of this task coded in python but I wanted it in inquisit. Should I give up, or keep trying. Below is the code I am using to test/practice using the list element.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ test = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list testList&amp;gt;&lt;br/&gt;/ items = (5,3,4)&lt;br/&gt;/ selectionrate = always&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ itemprobabilities = uniform&lt;br/&gt;/ replace = false&lt;br/&gt;/ poolsize = 50&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;summarydata&amp;gt;&lt;br/&gt;/ columns = (values.test)&lt;br/&gt;&amp;lt;/summarydata&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text TestText&amp;gt;&lt;br/&gt;/ items = ("testText")&lt;br/&gt;/ txbgcolor = (white)&lt;br/&gt;/ size = (3%, 4.5%)&lt;br/&gt;/ hposition = 50%&lt;br/&gt;/ vposition = 50%&lt;br/&gt;/ hjustify = center&lt;br/&gt;/ vjustify = center&lt;br/&gt;/ erase = false&lt;br/&gt;/txcolor = (black)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial TestTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = TestText]&lt;br/&gt;/ trialduration = 70&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block 1&amp;gt;&lt;br/&gt;/onblockbegin= &lt;br/&gt;[values.test = list.testList.poolitems.1]&lt;br/&gt;/ trials = [1 = TestTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;As I understand the pool attribute, I should be generating a pool of 50 items that are randomly selected but when I ask inquisit what the first item in the pool is, it is always 5. This doesnt seem to be very random at all. If I cant generate a random order to (at the absolute very least) shuffle my list, I cannot do what I want to do. Any help will be much appreciated.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Mike&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20051"&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;/onblockbegin= &lt;br/&gt;[values.test = list.testList.poolitems.1]&lt;br/&gt;&lt;br/&gt;You are not selecting a random item from the list here. You are merely accessing the list's 1st item, which is 5. It's always 5, because that's what you listed as the lists's 1st item. If you want to sample a random item from the list you do:&lt;br/&gt;&lt;br/&gt;/onblockbegin= &lt;br/&gt;[values.test = list.testList.nextvalue]</description><pubDate>Mon, 07 Nov 2016 06:29:49 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>