Log in

No account? Create an account

Peter Rogers's Blog
Artist-in-Residence at Chez Firth

Sunday (1/29/17) 6:00pm - ... wherein Peter posts a Weekly Media Update.

Books:   Algorithms to Live By
Movies:  <none>
TV:  <none>

Algorithms to Live By by Brian Christian and Tom Griffiths
This is a book by two computer-science professionals about how principles of computer science can be applied to everyday life.

It's not a promising topic.

I bought the book randomly, when audible was having a massive sale, and I can't even remember my rationale for buying it beyond "Eh, it's like, three bucks."  Then, once I actually got around to listening to it, I couldn't imagine how it would have anything meaningful to say.  It seemed like the worst kind of gimmicky self-help, where they dress up hoary old maxims about business in some strained metaphor.  "And your sales team?  They're like the *RAM* of the computer!"  *shudder*

Fortunately, I was wrong.

Long ago, I reviewed Tron.  So long ago, in fact, that the Tron sequel was just a wispy rumor at that point.  And I went on for some length talking not about the thing I was reviewing (kind of a pattern, with me), but about my hopes for a sequel.  I pointed out that Tron gave filmmakers a unique chance to *show* all sorts of bizarre concepts in computer science as physical, watchable, tangible things.  Can you imagine what a DDoS attack would look like in Tron?  Or a botnet?  Or RSA encryption?

Most movies are based on other movies.  The shots you saw in wuxia come up in The Matrix.  Whole passels of war movies and heist movies combine to form Rogue One.  Old color-drenched MGM and French-new-wave movie musicals reappear as La La Land.  And so on.

But computer science is different.  Computer science is full of people asking weird questions ("how can a traveling salesman visit ten thousand cities via the quickest path?") and getting weird answers ("good luck finding out before the heat death of the universe").  And when you translate those abstruse concepts into film, you would get something interesting.

And then Tron: Legacy happened, and it was... fine.  Apparently.  Never got around to watching it, actually.

Anyway, back to Algorithms to Live By: the book succeeds largely *because* of the weird, abstruse nature of computer science.  Researchers in the field spend their careers discovering things that are bizarre, far-removed from everyday life and (more importantly) far removed from intuition, and yet still undeniably true.  The book does an amazing job of taking these strange ideas and not so much creating self-help 'recipes for good living' out of them, but using the brain-break-y ideas to suggest new perspectives on what you already know.

One of my favorite bits was "The Riddle of the Multi-Armed Bandit".  This is a fiendish math problem that has underpinned a lot of research in computer algorithms.  The basic notion is this: you walk into a casino, resolved on making as much money there as possible.  But when you walk in, you just see a vast, empty casino floor with only two slot machines, labeled "A" and "B", and only two other patrons, one at each machine.  You watch for a bit.  The first one pays out 9 times out of a total of 16 pulls.  The second, with a much slower patron, pays out 1 time out of a total of 2 pulls.

Both of the other patrons leave, and you're alone with the slot machines.  What do you do?

And the perhaps-counterintuitive answer is "I don't know."

You see, I never told you long you're going to *be* there.  If you're about to head out the door, pick A -- it has a higher observed pay out.  But if you're going to be in the casino for a while, go ahead and sacrifice some time trying out B.  After all, for all you know, B could actually pay out at 80%, and you just happened to see an unlucky start.  The solution to this problem states that exploring risky alternatives *early* pays off if you have time to exploit that knowledge *later*.

It makes perfect sense, and it feels like it should be some trite cliché: "The grass on the other side of the fence is always greener at the start of the day" or "Travel early, stay late" or something.  But I have *never* seen this concept mentioned in real life.  Nobody tells you how you should try as many new restaurants as you can find when you move to a town, but revisit your favorite one on your last night there.  A few people hinted at how youth is for trying new things, but nobody mentioned the strategy of discovering what you like while you're young so you can exploit that knowledge for decades afterwards.

And so it goes through the book.  It never gives you "the sure-fire Computer-Science Way™ to run your business!!", complete with groan-worthy puns and step-by-step processes.  Instead, it gives you the multi-armed bandit, and other odd little thought experiments like that -- deep concepts in computing that you've probably never heard of -- and maps their unexpected relevance to real life.  They touch on many interesting topics -- stopping problems, complexity theory, heuristic design, networking protocols -- and keep making strong and fascinating connections to everyday experience.

But even without all those specific examples, the overall concept -- that our hard-won knowledge about computers applies to the real world -- is, perhaps, even more powerful.  It's like those points where mathematicians find an equivalency between disparate ideas -- like Descartes realizing that you can draw functions and this make geometry out of algebra, or Wiles proving Fermat's Last Theorem by helping to nail down the link between elliptic equations and modular forms.[1] 

Now, every time I see a topic in comp. sci., I'll wonder if I can use it out in the world; and every time I see problem in the world, I'll wonder if the conceptual frameworks of comp. sci. can be brought to bear.

The book is nicely written.  It explains computer-science topics with remarkable clarity for newcomers to the subject, and I only noticed a few small, quibbly errors.[2]  The book reminded me just how *little* I know about the field I majored in.  Rice gave me a fine, solid foundation in writing computer programs, but wow have I not kept up with the field.  So on some level it was also an engaging overview of what the study of algorithms has been up to lately.  The audiobook is read by one of the authors, and no, algorithm researchers do not make good narrators.  But the book survives poor performance, and is well worth a read.

For next week: so, so many movies to catch up on: Rogue One, La La Land, and Love & Friendship.  I'm still reading that book about the chemistry of cooking and watching season one of Veep.  While exercising, I'm still watching season 10 of Good Eats and season 3 of Last Week Tonight.


[1] No, I don't understand it either.  But I'm assured it's very useful and very very cool.
[2] I may have to make a
"comprised of"-esque personal crusade out of explaining to everybody the 63% rule about, say, six people rolling a die or 20 people rolling a d20.

Tags: ,
Mood: [mood icon] contemplative · Music: none
Previous Entry Share Next Entry