How can I go from one routine to another in a probabilistic way?

Sorry, I typed that post on an iPad which was a bit laborious, and there was a typo in the code (now amended). In particular note that if random should have been if random()

1 Like