# \#randomization

**URL:** https://discourse.psychopy.org/tag/randomization/4.md

[Latest](https://discourse.psychopy.org/latest.md) · [Categories](https://discourse.psychopy.org/categories.md) · [Tags](https://discourse.psychopy.org/tags.md)

---

## [Movie loop psychopy error 3221225477](https://discourse.psychopy.org/t/movie-loop-psychopy-error-3221225477/48006)

<div class="topic-metadata">

**Author:** [@lele](https://discourse.psychopy.org/u/lele)\
**Replies:** 13\
**Last updated:** [October 1, 2026, 3:51pm UTC](https://discourse.psychopy.org/t/movie-loop-psychopy-error-3221225477/48006 "2026-10-01T15:51:50Z")

</div>

Hi everyone, I’m having an issue with a PsychoPy experiment using Movie components inside a loop. I’m using PsychoPy Standalone 2026.1.0 on Windows. The experiment starts normally and some videos play correctly, but a…

---

## [Pavlovia Surveys: Page-level timers and one-time random assignment without blocks/triggers?](https://discourse.psychopy.org/t/pavlovia-surveys-page-level-timers-and-one-time-random-assignment-without-blocks-triggers/47314)

<div class="topic-metadata">

**Author:** [@AmandaW](https://discourse.psychopy.org/u/AmandaW)\
**Replies:** 78\
**Last updated:** [September 10, 2026, 5:39am UTC](https://discourse.psychopy.org/t/pavlovia-surveys-page-level-timers-and-one-time-random-assignment-without-blocks-triggers/47314 "2026-09-10T05:39:05Z")

</div>

Hi everyone, I’m building a study in Pavlovia Surveys and am having trouble implementing two pieces of survey logic. I’m using a survey structure that consists of a flat list of pages. My version appears to generate sy…

---

## [How to allocate participants to 1 of 3 conditions](https://discourse.psychopy.org/t/how-to-allocate-participants-to-1-of-3-conditions/47077)

<div class="topic-metadata">

**Author:** [@skull666eater](https://discourse.psychopy.org/u/skull666eater)\
**Replies:** 1\
**Last updated:** [May 5, 2026, 2:49am UTC](https://discourse.psychopy.org/t/how-to-allocate-participants-to-1-of-3-conditions/47077 "2026-05-05T02:49:04Z")

</div>

Hi all, i am a student trying to make an experiment testing the effects of different sounds on memory. I am new to psychopy and want to randomly allocate participants to 1 of 3 conditions, where in each condition they w…

---

## [Randomise stimuli without consecutive presentation](https://discourse.psychopy.org/t/randomise-stimuli-without-consecutive-presentation/24343)

<div class="topic-metadata">

**Author:** [@you330](https://discourse.psychopy.org/u/you330)\
**Replies:** 8\
**Last updated:** [April 8, 2026, 9:07pm UTC](https://discourse.psychopy.org/t/randomise-stimuli-without-consecutive-presentation/24343 "2026-04-08T21:07:01Z")

</div>

Hi, I am programming a psychological experiment. In every trial, they read a scenario and see a face photo and hear an answer for the scenario. Scenarios are 20. And there are 4 conditions for the scenarios. (Happy f…

---

## [Default random seed using random module on mac OS](https://discourse.psychopy.org/t/default-random-seed-using-random-module-on-mac-os/46889)

<div class="topic-metadata">

**Author:** [@RayanE](https://discourse.psychopy.org/u/RayanE)\
**Replies:** 0\
**Last updated:** [March 27, 2026, 6:05pm UTC](https://discourse.psychopy.org/t/default-random-seed-using-random-module-on-mac-os/46889 "2026-03-27T18:05:35Z")

</div>

Hi Everyone, I posted a couple weeks ago about trying to recover unsaved random conditions. I have not found a direct way to recover the conditions yet, but I was hoping I could try to recover the random seeds to recrea…

---

## [Customizing randomization](https://discourse.psychopy.org/t/customizing-randomization/46455)

<div class="topic-metadata">

**Author:** [@kkiddo](https://discourse.psychopy.org/u/kkiddo)\
**Replies:** 6\
**Last updated:** [January 26, 2026, 12:03pm UTC](https://discourse.psychopy.org/t/customizing-randomization/46455 "2026-01-26T12:03:15Z")

</div>

OS: Win10 PsychoPy version: 2025.2.4 Do you want it to also run online? (y/n) no What are you trying to achieve?: Randomise my set of stimuli (from the uploaded table) so that two consecutive stimuli don’t appear one…

---

## [Can you use conditions files within nested loops?](https://discourse.psychopy.org/t/can-you-use-conditions-files-within-nested-loops/46362)

<div class="topic-metadata">

**Author:** [@PsychNerd](https://discourse.psychopy.org/u/PsychNerd)\
**Replies:** 7\
**Last updated:** [January 12, 2026, 7:53pm UTC](https://discourse.psychopy.org/t/can-you-use-conditions-files-within-nested-loops/46362 "2026-01-12T19:53:49Z")

</div>

OS (e.g. Win10): MacOS Sequoia/Tahoe PsychoPy version (e.g. 2024.2.4 Py 3.8): 2024.2.2 Hello, I am curious as to whether you could use two different conditions files within nested loops. I have an outer loop I am usin…

---

## [Filtering stimuli from participant response](https://discourse.psychopy.org/t/filtering-stimuli-from-participant-response/46306)

<div class="topic-metadata">

**Author:** [@Ian\_Raugh](https://discourse.psychopy.org/u/Ian_Raugh)\
**Replies:** 1\
**Last updated:** [January 5, 2026, 10:05pm UTC](https://discourse.psychopy.org/t/filtering-stimuli-from-participant-response/46306 "2026-01-05T22:05:04Z")

</div>

Hello! I am a new Psychopy and Pavlovia user, I searched the forum for related questions and couldn’t find an answer that helped me to resolve this. I have a task based on text stimuli in a csv file organized by random…

---

## [Paired comparison/forced choice task using audio stimuli](https://discourse.psychopy.org/t/paired-comparison-forced-choice-task-using-audio-stimuli/46238)

<div class="topic-metadata">

**Author:** [@leighvh](https://discourse.psychopy.org/u/leighvh)\
**Replies:** 4\
**Last updated:** [January 3, 2026, 12:41am UTC](https://discourse.psychopy.org/t/paired-comparison-forced-choice-task-using-audio-stimuli/46238 "2026-01-03T00:41:19Z")

</div>

OS (e.g. Win10): Mac 14.6.1 PsychoPy version (e.g. 2024.2.4 Py 3.8): 2025.2.3 Standard Standalone Installation? (y/n) y Do you want it to also run online? (y/n) y, on Pavlovia Hi all, I’m new to PsychoPy and I’m str…

---

## [Codes for fMRI tasks](https://discourse.psychopy.org/t/codes-for-fmri-tasks/45762)

<div class="topic-metadata">

**Author:** [@Jersey\_Castillo](https://discourse.psychopy.org/u/Jersey_Castillo)\
**Replies:** 1\
**Last updated:** [October 23, 2025, 10:50pm UTC](https://discourse.psychopy.org/t/codes-for-fmri-tasks/45762 "2025-10-23T22:50:33Z")

</div>

I’m super new to psychopy, but I’m trying to find/write codes for a few basic fMRI tasks. I’m wondering if anyone knows codes or a place to find them for tasks that involve displaying pictures or being show descriptive w…

---

## [New Counterbalance Routine Question counterbalance.group = none?](https://discourse.psychopy.org/t/new-counterbalance-routine-question-counterbalance-group-none/41526)

<div class="topic-metadata">

**Author:** [@dwbatten](https://discourse.psychopy.org/u/dwbatten)\
**Replies:** 4\
**Last updated:** [October 1, 2025, 9:13pm UTC](https://discourse.psychopy.org/t/new-counterbalance-routine-question-counterbalance-group-none/41526 "2025-10-01T21:13:34Z")

</div>

If this template helps then use it. If not then just delete and start from scratch. Mac PsychoPy version (e.g. 1.84.x): 2024.2.0 (same behavior in 2024.1.0) \*\*Standard Standalone? Y I’m trying to counterbalance to cr…

---

## [Selecting rows in an Excel sheet within a loop?](https://discourse.psychopy.org/t/selecting-rows-in-an-excel-sheet-within-a-loop/45437)

<div class="topic-metadata">

**Author:** [@lucy\_s](https://discourse.psychopy.org/u/lucy_s)\
**Replies:** 2\
**Last updated:** [September 18, 2025, 10:39am UTC](https://discourse.psychopy.org/t/selecting-rows-in-an-excel-sheet-within-a-loop/45437 "2025-09-18T10:39:22Z")

</div>

If this template helps then use it. If not then just delete and start from scratch. OS (e.g. Win10): 11 Home PsychoPy version (e.g. 2025.1.1): Standard Standalone Installation? (y/n) y If not then what?: Do you want …

---

## [How to randomise the polygon stimulus?](https://discourse.psychopy.org/t/how-to-randomise-the-polygon-stimulus/45508)

<div class="topic-metadata">

**Author:** [@daisy.s](https://discourse.psychopy.org/u/daisy.s)\
**Replies:** 3\
**Last updated:** [September 5, 2025, 12:23pm UTC](https://discourse.psychopy.org/t/how-to-randomise-the-polygon-stimulus/45508 "2025-09-05T12:23:32Z")

</div>

OS (e.g. Win10): Win10 PsychoPy version (e.g. 2024.2.4 Py 3.8): 2025.1.1 Standard Standalone Installation? (y/n): y What are you trying to achieve?: I am trying to create a stop-signal reaction time task with four di…

---

## [Random assignment to equal-size conditions for Pavlovia](https://discourse.psychopy.org/t/random-assignment-to-equal-size-conditions-for-pavlovia/45352)

<div class="topic-metadata">

**Author:** [@lucy\_s](https://discourse.psychopy.org/u/lucy_s)\
**Replies:** 3\
**Last updated:** [August 22, 2025, 11:02pm UTC](https://discourse.psychopy.org/t/random-assignment-to-equal-size-conditions-for-pavlovia/45352 "2025-08-22T23:02:37Z")

</div>

What are you trying to achieve?: For my experiment, I need to randomly assign participants to two conditions (of equal size - let’s say 50 participants in each condition). I am building the experiment in the desktop ver…

---

## [Between subjects design](https://discourse.psychopy.org/t/between-subjects-design/17034)

<div class="topic-metadata">

**Author:** [@becker](https://discourse.psychopy.org/u/becker)\
**Replies:** 6\
**Last updated:** [August 18, 2025, 10:36am UTC](https://discourse.psychopy.org/t/between-subjects-design/17034 "2025-08-18T10:36:48Z")

</div>

OS: Win10 PsychoPy version: 1.9.6 Standard Standalone? (y/n): y What are you trying to achieve?: I want to build a between subjects online experiment. The subjects are to be split up randomly in two groups (optimally…

---

## [When a video is playing, the audio of another video appears](https://discourse.psychopy.org/t/when-a-video-is-playing-the-audio-of-another-video-appears/32595)

<div class="topic-metadata">

**Author:** [@Violet](https://discourse.psychopy.org/u/Violet)\
**Replies:** 2\
**Last updated:** [August 14, 2025, 11:03am UTC](https://discourse.psychopy.org/t/when-a-video-is-playing-the-audio-of-another-video-appears/32595 "2025-08-14T11:03:55Z")

</div>

URL of experiment: Sign in · GitLab PsychoPy version: 2021.2.3 Description of the problem: In this experiment, there are 3 blocks and each block contains 6 video trials. After watching each video, participants will re…

---

## [Routine/image component skipped when "random" loop type is selected but not when "sequential"](https://discourse.psychopy.org/t/routine-image-component-skipped-when-random-loop-type-is-selected-but-not-when-sequential/45224)

<div class="topic-metadata">

**Author:** [@neurowink](https://discourse.psychopy.org/u/neurowink)\
**Replies:** 3\
**Last updated:** [July 16, 2025, 2:13pm UTC](https://discourse.psychopy.org/t/routine-image-component-skipped-when-random-loop-type-is-selected-but-not-when-sequential/45224 "2025-07-16T14:13:57Z")

</div>

I’m running a (currently) simple task in version 2024.2.4 (compatibility version) on Windows 11. In this task, a fixation (1000ms) is followed by a blank screen (static ISI component) for 300ms and then an image is pres…

---

## [Generating dynamic auditory stimuli online](https://discourse.psychopy.org/t/generating-dynamic-auditory-stimuli-online/45165)

<div class="topic-metadata">

**Author:** [@MMS](https://discourse.psychopy.org/u/MMS)\
**Replies:** 3\
**Last updated:** [July 9, 2025, 7:56am UTC](https://discourse.psychopy.org/t/generating-dynamic-auditory-stimuli-online/45165 "2025-07-09T07:56:34Z")

</div>

Hi! I am quite new to Psychopy. I apologize if the question is rather obvious. I am using the standalone version of Pychopy. My goal is to create an experiment where stimuli are generated dynamically with values that d…

---

## [Is there a way to export the block order when using shuffle in Pavlovia Surveys?](https://discourse.psychopy.org/t/is-there-a-way-to-export-the-block-order-when-using-shuffle-in-pavlovia-surveys/45136)

<div class="topic-metadata">

**Author:** [@PsychNerd](https://discourse.psychopy.org/u/PsychNerd)\
**Replies:** 2\
**Last updated:** [July 4, 2025, 5:18pm UTC](https://discourse.psychopy.org/t/is-there-a-way-to-export-the-block-order-when-using-shuffle-in-pavlovia-surveys/45136 "2025-07-04T17:18:52Z")

</div>

Since randomization is super common in psychology experiments, I am sure this is possible, but I am getting some slightly finicky results when trying to view the file that is exported from a pilot run of the survey. Mor…

---

## [Error: Cannot read properties of undefined (reading "0")](https://discourse.psychopy.org/t/error-cannot-read-properties-of-undefined-reading-0/45141)

<div class="topic-metadata">

**Author:** [@savtremblay](https://discourse.psychopy.org/u/savtremblay)\
**Replies:** 1\
**Last updated:** [July 3, 2025, 6:52am UTC](https://discourse.psychopy.org/t/error-cannot-read-properties-of-undefined-reading-0/45141 "2025-07-03T06:52:49Z")

</div>

Hi! I am trying to have my 120 stimuli presented randomly with a rest break occurring exactly in the middle of the study phase. At first I had issues where the JS code was not counting the number of trials correctly, so …

---

## [How to implement iterative video adjustments (speed/complexity) with sliders](https://discourse.psychopy.org/t/how-to-implement-iterative-video-adjustments-speed-complexity-with-sliders/45071)

<div class="topic-metadata">

**Author:** [@Alkmini](https://discourse.psychopy.org/u/Alkmini)\
**Replies:** 3\
**Last updated:** [June 25, 2025, 3:30pm UTC](https://discourse.psychopy.org/t/how-to-implement-iterative-video-adjustments-speed-complexity-with-sliders/45071 "2025-06-25T15:30:38Z")

</div>

I need help designing an experiment where participants iteratively adjust video stimuli using two unlabelled sliders (5 discrete levels each). Videos are pre-rendered (not manipulated in real-time). Participants must wat…

---

## [Interleaving Loops](https://discourse.psychopy.org/t/interleaving-loops/45034)

<div class="topic-metadata">

**Author:** [@nico\_30](https://discourse.psychopy.org/u/nico_30)\
**Replies:** 1\
**Last updated:** [June 13, 2025, 9:01am UTC](https://discourse.psychopy.org/t/interleaving-loops/45034 "2025-06-13T09:01:00Z")

</div>

I have two routines (search\_trial and probe\_trial) that I need to interleave randomly. With the search trial appearing 70% of the time, and the probe trial appearing 30% of the time. Specifically, I want 336 search trial…

---

## [How does the second level loop correspond to the random images in the first level loop](https://discourse.psychopy.org/t/how-does-the-second-level-loop-correspond-to-the-random-images-in-the-first-level-loop/44989)

<div class="topic-metadata">

**Author:** [@foryi-123](https://discourse.psychopy.org/u/foryi-123)\
**Replies:** 1\
**Last updated:** [June 7, 2025, 8:23am UTC](https://discourse.psychopy.org/t/how-does-the-second-level-loop-correspond-to-the-random-images-in-the-first-level-loop/44989 "2025-06-07T08:23:09Z")

</div>

How does the second level loop correspond to the random images in the first level loop.

---

## [Cross task dependent randomisation](https://discourse.psychopy.org/t/cross-task-dependent-randomisation/44746)

<div class="topic-metadata">

**Author:** [@Caitlin\_Illingworth](https://discourse.psychopy.org/u/Caitlin_Illingworth)\
**Replies:** 1\
**Last updated:** [May 7, 2025, 3:50pm UTC](https://discourse.psychopy.org/t/cross-task-dependent-randomisation/44746 "2025-05-07T15:50:39Z")

</div>

OS: Win11 PsychoPy version: 2024.1.5 Py 3.10 Standard Standalone Installation? Yes Do you want it to also run online? No What are you trying to achieve?: I am using fNIRS to measure brain activity in monolinguals an…

---

## [Need help with Word Triad experiment](https://discourse.psychopy.org/t/need-help-with-word-triad-experiment/44688)

<div class="topic-metadata">

**Author:** [@karadefrost](https://discourse.psychopy.org/u/karadefrost)\
**Replies:** 1\
**Last updated:** [May 5, 2025, 2:32pm UTC](https://discourse.psychopy.org/t/need-help-with-word-triad-experiment/44688 "2025-05-05T14:32:40Z")

</div>

Hello fellow PsychoPy people. I am a grad student in cog psych super new to PsychoPy trying to build my studies from scratch ASAP. Would appreciate any help. This is what I’m trying to do: \*In this study, you will be pr…

---

## [What does the "reserved" section mean in the shelf for counterbalancing?](https://discourse.psychopy.org/t/what-does-the-reserved-section-mean-in-the-shelf-for-counterbalancing/44720)

<div class="topic-metadata">

**Author:** [@Cailey\_Ten](https://discourse.psychopy.org/u/Cailey_Ten)\
**Replies:** 0\
**Last updated:** [May 1, 2025, 3:02pm UTC](https://discourse.psychopy.org/t/what-does-the-reserved-section-mean-in-the-shelf-for-counterbalancing/44720 "2025-05-01T15:02:40Z")

</div>

Hello, We are running an online study and it is our first time using the counterbalance feature in the shelf. What does it mean when it says that there are reserved slots? Can I still open the experiment for new people…

---

## [Help with Randomizing Multiple Routines (with Language Conditions)](https://discourse.psychopy.org/t/help-with-randomizing-multiple-routines-with-language-conditions/44524)

<div class="topic-metadata">

**Author:** [@tolga\_sahinca](https://discourse.psychopy.org/u/tolga_sahinca)\
**Replies:** 1\
**Last updated:** [April 8, 2025, 3:41pm UTC](https://discourse.psychopy.org/t/help-with-randomizing-multiple-routines-with-language-conditions/44524 "2025-04-08T15:41:11Z")

</div>

Hi everyone, I’m building an experiment in PsychoPy (2024.2.4) where participants choose their language (monolingual or bilingual) at the beginning. Based on that, they either see 4 routines in their native language or …

---

## [Create an experiment - routines](https://discourse.psychopy.org/t/create-an-experiment-routines/44503)

<div class="topic-metadata">

**Author:** [@Mataviola](https://discourse.psychopy.org/u/Mataviola)\
**Replies:** 0\
**Last updated:** [April 7, 2025, 12:23pm UTC](https://discourse.psychopy.org/t/create-an-experiment-routines/44503 "2025-04-07T12:23:13Z")

</div>

Hi, I hope youi are well, I am trying to create an experiment like this one :There are 96 participants. and there are 80 displays, of these displays, 40 were same classifier pairs, and 40 were different classifier pairs…

---

## [Error: The argument should be an array of numbers of length 3, colours defined in code component](https://discourse.psychopy.org/t/error-the-argument-should-be-an-array-of-numbers-of-length-3-colours-defined-in-code-component/44448)

<div class="topic-metadata">

**Author:** [@pmmacabulos](https://discourse.psychopy.org/u/pmmacabulos)\
**Replies:** 4\
**Last updated:** [April 2, 2025, 2:39pm UTC](https://discourse.psychopy.org/t/error-the-argument-should-be-an-array-of-numbers-of-length-3-colours-defined-in-code-component/44448 "2025-04-02T14:39:59Z")

</div>

If this template helps then use it. If not then just delete and start from scratch. PsychoPy version (e.g. 2024.2.4 Py 3.8): \*\*Standard Standalone Installation? Yes URL = Change-Localisation-Task \[PsychoPy\] Do you wa…

---

## [Image stimuli randomization](https://discourse.psychopy.org/t/image-stimuli-randomization/44276)

<div class="topic-metadata">

**Author:** [@Erge7](https://discourse.psychopy.org/u/Erge7)\
**Replies:** 4\
**Last updated:** [March 19, 2025, 9:11am UTC](https://discourse.psychopy.org/t/image-stimuli-randomization/44276 "2025-03-19T09:11:02Z")

</div>

Hello! I have been having a problem for a while now, so I would like to ask for your help. I need to present to a participant a total of 20 images within one block (1 loop). Within that one block I have an image compone…

[Next page](https://discourse.psychopy.org/tag/randomization/4.md?match_all_tags=true&page=1&tags%5B%5D=randomization)
