Marvin Minsky (1927–2016). Photo taken Jul 2012. Source: Wikimedia. License: CC BY 2.0.

Marvin Minsky (1927–2016) was one of Artificial Intelligence’s pioneers. His contributions to and influences in the field are legion. But that’s not what this post is about.

Early in his career, when he was a graduate student, he spent a summer at Bell Labs inventing “useless things” such as a “gravity machine”, which was “a device that would ring a bell if the force of gravity changed”. [WSJ 2013]

Another invention Minsky dreamt up and described is known as “The Useless Machine”. The device itself was made by his Bell Labs mentor and father of communications theory, Claude Shannon. The device is rather simple. It features a box with a switch on it. If the switch is turned on, a hand pops out of the box, turns off the switch, and goes back into the box. Below is an example.

A useless machine. Source: wifflegif.com.

The device is simple but at the same time mind bending. Equally surprisingly, certainly to me, is that the equivalent computer programs seem perfectly ordinary and boring. I find this very strange.

Following are a few examples in different programming languages. To keep with the above spirit, the programs are kept as simple as possible.

Why do I find one so fascinating but the other utterly boring?

On reflection, it seems to me that in the programmatic version the explicit invocation of a function to end-this-program seems superfluous. It feels as if the program is mocking me. It’s as if it’s saying, what do you think will happen if you didn’t call quit? Do you think something different will happen? And that’s, I think, the rub. Regardless of the call, the program is facing the same result.

A closed box, on the other hand, is already mysterious. Throw in a switch on a box, it can do almost anything! It could turn on some lights, turn off some lights, open a door, launch nuclear missiles, the possibilities are endless. And what does it do? It flips the switch to its earlier position.

All this is pure conjecture. I do not know if my views are correct.

Perhaps all this pondering is also useless.