Select a random neighbour when the previous random neighbour is beyond the minimum or maximum value.
Useful links