Sunday, December 4, 2016

Entry 359: On Chess

Distractions...

It is a pretty good time for fans of Seattle sportsball.  The Seahawks are comfortably in first place; the Sounders improbably made it to the MLS finals; and the University of Washington even more improbably qualified for the college football playoffs.  But don't worry, I'm not going to talk about these things in depth.  Of the five people whom I know read this blog regularly not a one of them is interested in Seattle sports.  I am however going to talk about a different sport -- kinda: chess.

Magnus Carlsen, a 26-year-old Norwegian chess wunderkind, retained his title of "Greatest Chess Player Alive" (probably "ever," honestly), by defeating Russian challenger Sergey Karjakin in the World Chess Championship on Wednesday.  The match was incredibly close, which was not expected, but Carlsen, the heavy favorite, ultimately pulled it out in "overtime."  This event likely would have come and gone without my notice had I not heard it discussed on a podcast.  I don't follow chess regularly, but it's a great subject to do a deep dive on, so every now and then I will go down the chess rabbit hole, and this match gave me a great opportunity to do so.


[The baby-faced kid who runs the dining hall in your dorm?  No!  The greatest chess player ever.]

I've tried on several occasions to take up playing chess, but it has never really stuck.  I never felt like I was making much progress as a player.  I would read annotated games and have little idea why one move was better than another, even after it was explained.  When I would play (usually against a computer) my entire strategy was to set up a very focused, multi-move siege on one of my opponent's major pieces.  And then as I was carrying it out, my opponent would either (a) move the piece to safety; (b) take one of my major pieces that I had left unprotected because I was too focused on my attack.  Then I would lose.

Also, chess is a game with an extremely steep "entry fee," meaning in order to be good you have to do a lot of tedious memorization.  With the aid of computers, people have mapped out thousands upon thousands of different opening sequences, and if you don't learn them, you simply can't compete with somebody who has.  It's like Scabble in that if you don't have the dictionary more or less completely memorized, you will never be a top player no matter how good you are at actually playing Scrabble.

But chess is very different from Scrabble in that there is no randomness to it.  It never comes down to the luck of the draw.  This is both good and bad.  It's good in that it's pretty much as "fair" a game as you can possibly have -- our wits against your opponent's.  It's bad in that this can make games boring to follow.  When both players of a chess match are really good, ties are overwhelmingly likely (in the 12 regulation games, Carlsen and Karjakin drew 10 of them), and games often turn on a single misstep.  You rarely see amazing comebacks and swings in win-expectancy like you do in Scrabble or poker or a game in which luck is an integral part.  Now, there are variations of chess that are more exciting, and you can induce action by making players move more quickly (this is how they break ties in official matches -- they continually decrease the amount of time on the players' clocks until somebody wins outright), but I think a lot of "true" chess aficionados view this as a bastardization of the game -- like how many soccer fans don't like penalty kicks as a tie-breaker.

Another reason I'm interested in chess is the a.i. aspect.  It's the perfect human-vs.-machine game -- or at least it was.  It's not much of a competition anymore.  The decision is in: Machines won.  There is a good documentary Game Over about the (in)famous 1997 match in which IBM's Deep Blue beat grandmaster Garry Kasparov in disputed (by Kasparov, at least) fashion.  (Apparently you can watch the entire movie on YouTube.)  But the whole thing seems quite quaint now, given that I could probably download a free chess app on my phone that could defeat Magnus Carlsen with ease.


But don't despair, fellow human, Skynet isn't taking over just yet.  Although the best chess algorithm can defeat the best human, a decent chess player with the aid of a computer can defeat the best computer by itself.  There is a whole new variant of chess called centaur chess (or advanced chess) in which humans compete against each other, but the use of computers is completely legal.  The best players are those who can effectively manipulate computers to look for good moves, but not rely completely on the output from a single program.

In general, this is the way humans "stay ahead" of computers.  We use them to make ourselves smarter (and if you believe futurist Ray Kurzweil, we are not that far away from cyborg brains).  Computers can do amazing things like, say, solve difficult math problems or fill in crossword puzzle grids (y'know, for people who are into math and crossword puzzles), but the best work is still done by a human using a computer as a tool.  People aren't obsolete yet.  Also, when it comes to Terminator 2 style takeovers, there is another thing we have to consider: We can still turn computers off.  They aren't sentient beings.  That's a pretty big thing.  Imbuing a previously inanimate object with a sense of self is not exactly a trivial accomplishment.

When it comes to chess a.i. specifically, I have some personal connections.  When I was about ten I set out to "solve" chess.  That is, I was going to write down every possible combination of moves, so that when I played, I could just follow along in my master book of moves and never lose!  This, of course, is beyond naive.  The total number of possible combinations of chess moves is something literally unimaginable -- like if a billion people were able to write a billion moves per second for a billion days, you still wouldn't be anywhere near it.  (Note: I don't know if this is technically true or not; I'm just saying it to make a point.)  But, hey, at least I recognized that chess could, in theory, be solved by brute force enumeration.  That's not bad for a preteen.  I was just too ambitious.  If I had gone with tic-tac-toe, I probably could have pulled it off.

I remember I told my dad about my plan to solve chess, and he was like, "yeah... you're not going to do that."  And I insisted that I was, and he was like, "no you aren't."  And I again insisted that I was, and he again told me that I wasn't.  And the conversation finally ended with him telling me to go ahead and try.  (It's funny how the apple doesn't fall far from the tree.  I can't tell you how many conversations I have with Lil' S1 in which he insists something is true when it is clearly false.  The other day he drew a '3', and said it was an 'A'.  When I told him he was wrong, he ran into his room crying and got under his covers.  Oh well, he needed a nap anyway.)  I didn't even get past white's first move.  After I did a few pawns, I realized that perhaps my dad knew what he was talking about, and started playing Nintendo or something.

[Fisher vs. Spassky in 1972.  One of the most interesting chess matches in modern history.]

So I never did solve chess, but as a junior in high school I did program my own chess engine in computer science class: Ski-Bot the chess playing machine.  I consider it my greatest academic achievement.  I'm not being facetious.  I actually think it was a bigger accomplishment than my Ph.D. dissertation.  As a seventeen-year-old with about three months worth of programming classes, I wrote a computer algorithm that could actually play chess against the user.  Ski-Bot was by no means a great chess player, but it could whoop up on beginners, and it would always catch a mistake, so it impressed a lot of people.  I still have it on floppy disk somewhere, but I don't have an old Mac to run it on, and there is a decent chance that the magnetic tape of the disk has eroded anyway.  It's more than 20 years old after all.  So Ski-Bot might be gone forever.  But that's okay.  I'll just tell people I retired it after it beat Nat Nguyen, the best chess player in my class, much like IBM retired Deep Blue after it beat Kasparov.

Alright, I think you are probably tired chess by now (if you've even stuck it out this far), so I will call it a post.

Until next time...

No comments:

Post a Comment