scamp_extensions.process.generators.random_walk

scamp_extensions.process.generators.random_walk(start_value, step=1, turn_around_chance=0.5, clamp_min=None, clamp_max=None)[source]

Returns a generator starting on start_value that randomly walks between clamp_min and clamp_max, using a step size of step, and turning around with probability turn_around_chance

Parameters:
  • start_value – walk start value

  • step – walk step size

  • turn_around_chance – probability of turning around (affects wiggliness)

  • clamp_min – random walk bounces off of this lower limit. If None, walk can go arbitrarily low.

  • clamp_max – random walk bounces off of this upper limit. If None, walk can go arbitrarily high.