Posts

Comments

Comment by arj on Halloween thread - rationalist's horrors. · 2013-12-02T20:49:41.890Z · LW · GW

This happened at uni ca. 2001. I had recently learnt Python, so I was sitting in the computer club lab messing about with a silly little script that I had written, that generated droll poetry by walking randomly through a tree of phrase structure rules. At that point I was pretty pleased with the results, so I did the up-arrow, enter, up-arrow, enter thing at the bash prompt and just looked at the results.

Until... I got the same output twice in a row.

Now this was very strange, I thought. I looked over the two algorithmic poems word by word and determined that they were indeed exactly the same. So, on two runs of the script, the brains of the little 90's era Power Macintosh had taken all the same paths through Python's random.choice() function several dozens of times. Had I forgot a random seed, thus potentially making the code effectively deterministic? No, the code did indeed have an explicit call to random.seed(). I tried running the script several more times. The results were always different.

I worked out a conservative estimate of the probabilities, and decided that I had just witnessed a staggering coincidence, or else a breakdown of physical laws.