human-random

This library is intended to help with generating more "human" random sequences. This is different from "true" randomness (and it's definitely makes random generator less secure), so don't use it for any security-related purposes.

Basically, it just makes it less probable (or impossible) to select same element from a sequence twice in a row.

Demo

Default (true) random, duplicates happen regularly (as they really should):

Using human-random, duplicates are rarer, but can still happen (recovery = 7, mult = 1.2, no cooldown):

Larger multiplier → less duplicates (recovery = 7, mult = 2.0, no cooldown):

With cooldown (cooldown = 1, recovery = 6, mult = 1.2), no duplicates:

Longer cooldown, very regular (cooldown = 2, recovery = 5, mult = 1.2):

Max cooldown (fully non-random, repeating pattern):