# variation of random walk def bridge(): var a, b, x while a < x and x < b: tick 1 prob(1,1): x = x - 1 else: x = x + 1