Randomness

I was talking this week about ‘chucking some random numbers’ at my career; which I think some people listening thought might be bit reckless.

But in fact what I have in mind is well grounded in computer science.

A pseudorandomly generated bitmap – Wikipedia

Going back and listening again to ‘Algorithms to live by’ out walking the dog today, I was reminded that there are excellent design, creativity and evolutionary reasons to ‘chuck in’ a bit of randomness…

After all, life is all about optimisation.

Being randomly jittered, thrown out of the frame and focused on a larger scale, provides a way to leave what might be locally good and get back to the pursuit of what might be globally optimal.

But there are (and should be) limits:

The cult classic 1971 novel The Dice Man by Luke Rhinehart (real name: George Cockcroft) provides a cautionary tale. Its narrator, a man who replaces decision-making with dice rolling, quickly ends up in situations that most of us would probably like to avoid.

I remember flirting with The Dice Man in the 1990s – and it’s a young man’s game… Later on in life there’s much more at stake.

But maybe it’s more about how, and how much:

If the Dice Man had only had a deeper grasp of computer science, he’d have had some guidance.

‘Algorithms’ says there are three golden rules; first, from ‘Hill Climbing‘:

Even if you’re in the habit of sometimes acting on bad ideas, you should always act on good ones.

Second from the ‘Metropolis Algorithm’:

Your likelihood of following a bad idea should be inversely proportional to how bad an idea it is.

And third from ‘Simulated Annealing‘:

You should front-load randomness, rapidly cooling out of a totally random state, using ever less and less randomness as time goes on, lingering longest as you approach freezing. Temper yourself—literally.

And that’s that the original Dice Man did too:

Cockcroft himself apparently turned, not unlike his protagonist, to “dicing” for a time in his life, living nomadically with his family on a Mediterranean sailboat, in a kind of Brownian slow motion.

At some point, however, his annealing schedule cooled off: he settled down comfortably into a local maximum, on a lake in upstate New York.

Sometimes you need to know when you’re in a good place:

Now in his eighties, he’s still contentedly there. “Once you got somewhere you were happy,” he told the Guardian, “you’d be stupid to shake it up any further.”

Keep on rollin’

Attracted by algorithms some while back, I bought myself this audiobook… it sounded like exactly what I was looking for:

I found it hard going if I’m honest. Listening at 1.25x speed helped.

But while the ‘optimisation problems’ of public parking turned out to be vaguely useful at work, my heart sank a bit the other Saturday when rolling the ‘relevant complexity’ dice served up the answer: ‘Audiobook’…

…Ho hum. But you have to trust the dice.

And sure enough ‘Algorithms to live by’ proved the point; the chapter on ‘Randomness’ validates a lot of what I’ve been trying recently:

Recent work in computer science has shown that there are cases where randomized algorithms can produce good approximate answers to difficult questions faster than all known deterministic algorithms.

One problem they help with is ‘Hill climbing’ and local maxima.

At any point in life – however much you’ve perfected it, the risk is it could still be better. Like a climber in the mist, you know you’re in a good place – but there might be an even better one you can’t see for the fog.

And randomness is the way to find out.

Try something a bit different and you can find out whether you’re at the top of a small hill of possibilities – or surveying the entire range from the highest vantage point.

The truth of life is: you never can know if you’re stuck in a local maximum. But the odd throw of the dice now has the full weight of computer science behind it!

Keep on rollin!