1

I have a list of similar elements, and I want to scatter a smaller set of strikingly different elements among them, with the intent of surprising the user and reviving interest in the list. Something like this:

OOXOOOXOXOOXOOOOOXOOOX

I do not want an actual random distribution, the possibility of clumps or excessive gaps should be avoided. A valid random distribution such as OOOXXXOOOO would defeat the purpose.

So, what predictable algorithms, sequences, or distributions have been shown to be best at surprising users and thwarting their ability to recognize a pattern, thus creating the illusion of being random and unpredictable?

An example algorithm that I am currently testing works as follows:

While there are normal elements to add:

  • Add one normal element
  • Add one odd element at a chosen probability (usually about .2 to .4).
  • Repeat

Adding one normal element for every chance of an odd element helps avoid clusters of odd elements.

  • 2
    Related: Casey Muratori’s blog posts “Working on The Witness” parts 5–7. They show his solution to the same problem in 2D instead of 1D, for scattering grass across a two-dimensional area. Part 5 introduces the problem, part 6 is about blue noise, a more regularly-spaced variant of white noise, and part 7 describes a non-random distribution that he calls “staggered concentric intersection”, which turned out to look better than random blue noise. – Rory O'Kane Aug 26 '15 at 20:57
2

Humans are bad at "random". So simulating a "perceived randomness" should require some experiments with people. What I would do is a combination of sequence/randomness, for example :

  • add one normal element
  • 20% to add one odd element and go back to step #1, else add one normal element
  • 40% to add one odd element and go back to step #1, else add one normal element
  • 60% to add one odd element and go back to step #1, else add one normal element
  • 80% to add one odd element and go back to step #1, else add one normal element
  • ...

You can adjust the initial percentage, the increment, and the number of normal that you have in sequence at the beginning. Your proposal is a specific case of this algorithm, by the way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.