# Randomization problems

**URL:** <https://discourse.psychopy.org/t/randomization-problems/22945>\
**Category:** Builder\
**Tags:** timing, randomization\
**Created:** [May 12, 2021, 10:46am UTC](https://discourse.psychopy.org/t/randomization-problems/22945 "2021-05-12T10:46:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oykaydin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/oykaydin/32/16233_2.png) [@oykaydin](https://discourse.psychopy.org/u/oykaydin)\
**Post date:** [May 12, 2021, 10:46am UTC](https://discourse.psychopy.org/t/randomization-problems/22945/1 "2021-05-12T10:46:33Z")

</div>

Hello, I’m trying to create a cognitive psychology experiment (one-back task). I have several pictures as stimuli. I need to present some of them in a specific order (for instance a specific stimulus supposed to be in 15th or 17th place) and the other stimuli supposed to change randomly across participants. I had trouble doing it. PsychoPy present pictures in a random order but does it for every picture. I have to organize them as some pieces of them randomizing separately.

Some of the pictures also supposed to come after one another. I created an excel file, but again, these orders do not change appropriately as they have to, across participants.

I assume that there are some ways to organize these stimuli in the builder but I have no idea how to do it. I hope I explained it clearly? Can you please help me? ☹

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [May 12, 2021, 12:23pm UTC](https://discourse.psychopy.org/t/randomization-problems/22945/2 "2021-05-12T12:23:47Z")

</div>

Hi There,

This requires some custom code. As with all things involving there are many ways to do this. As this is a question many people ask I put together a quick demo here that I hope you may find helpful [Rebecca Hirst / custom\_randomisation\_demo · GitLab](https://gitlab.pavlovia.org/lpxrh6/custom_randomisation_demo)

Here participants are presented with a set of words, certain words are in fixed positions (as defined by the conditions file) with the interleaving words in a randomised order. The same principle will apply for any stimuli you are presenting (e.g. images, sounds).

Hope this helps,  
Becca

---

<div class="post-metadata">

**Author:** ![oykaydin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/oykaydin/32/16233_2.png) [@oykaydin](https://discourse.psychopy.org/u/oykaydin)\
**Post date:** [May 12, 2021, 1:13pm UTC](https://discourse.psychopy.org/t/randomization-problems/22945/3 "2021-05-12T13:13:14Z")

</div>

I’m working on it. Thank you so much for your help!
