Knuth has a version of this game. Fun read: http://www-cs-faculty.stanford.edu/~knuth/programs/advent.w....
I wish more people had this attitude to distracting things.
I suspect you mean both. And I agree. I'd probably agree with all permutations of meaning here, actually.
This is also a chapter in https://smile.amazon.com/Selected-Papers-Games-Lecture-Notes...
I would be lying if I said this was super easy to read. It is easy, though. Not sure if it is a good exposition for literate programming. I certainly like it, but I think I was predisposed to.