Thursday, January 12, 2012

Endgame Caveat #5: Space Invaders

Researching for this post, I came across this 80's music video at YouTube. Cross-links at YouTube eventually led me to this free online Space Invaders game.

The Lucena position is an intermediate endgame position involving a non-rook pawn on its 5th rank, with the defender's king cut off from the queening square, generally precluding a Philidor defense.

The first caveat is that just because your king is cut off doesn't mean that the Lucena is inexorable. If Black doesn't pay attention, White could try 1. Ke2 Rf7? 2. Rf1!. Exchanging rooks allows a drawn pawn ending. If the Black rook moves away from the f-file, the White King crosses to g1 and White can choose either the Philidor (camp the rook on a3 until the pawn reaches g3, then go to a8 and harass the Black King from behind) or even the First Rank defense against a rook pawn or a knight pawn (just shuffle the rook back and forth from a1 to f1).

Black to play wins starting with 1... Kh4 2. Rh1+ Kg3 3. Rg1+ Kh3 4. Rh1+ Kg2 driving the rook away. After Rh6

Now 5... g3 6. Rg6 Kh2 7. Rh6+ Kg1 8. Rg6 g2 9. Rg7 sets up Lucena

Standard Lucena continues with 9... Re8+ 10. Kd2 Re5 11. Rg8 Kf2 12. Rf8+ Kg3 13. Rg8+ Kf3 14. Rf8+ Kg4 15. Rg8+ Rg5

The Space Invader will land at g1, spelling doom for the White King. Notice that the White King on d2 is too far after 16. Rxg5+ Kxg5 17. Ke2. From the previous diagram, had Black proceeded with 9... Rf5 10. Rg8 Kh2 11. Rh8+ Kg3 12. Rg8+ Kh3 13. Rh8+ Kg4 14. Rg8+ Rg5? 15. Rxg5+ Kxg5 16. Kf2 would be a draw.

Whew! So that's the background. From the first diagram, what if we move Black's King and Pawn back one step?

1... Kh5 2. Rh1+ Kg4 3. Rg1+ Kh4 4. Rh1+ Kg3 5. Rg1+ Kh4. Black's attempt to land the Space Invader is repelled because he can't protect the pawn at g5 while driving the rook away as he did before. The crucial thing is that the White Rook maintains distance from the Black King and Pawn. If White plays Rg2 to stall at any point, then he may be lost again. e.g. 1... Rf7 2. Rg2? Kh5! 3 Rh2+ Kg4 4. Rg2+ Kh4 5. Rh2+ Kg3 and the rook has to run, giving Black time to get into the Lucena groove with g4. Even spotting Black another file won't always give him the win.

As long as White keeps his king in the red zone and his rook at g1, he should be able to draw using the Space Invaders defense. One subtlety is that with White to move or a Black finesse, 1...Re7 2. Kd2? is losing. 2... Re5! protects g5 and creates enough forward momentum to let the pawn squeak to g4. 3. Kd3 (second thoughts?) Kf5! 4. Kd4 (4. Rf1+ Kg4 5. Rg1+ (5. Kd4 Ra5) Kf3 6. Rf1+ Kg2) Re4+ 5. Kd3 and either 5... g4 or 5... Rf4 stay on track toward Lucena.

There is still some trickiness to deal with. After 5... g4 6. Rf1+ Rf4 7. Rg1 Kg5 8. Ke2 threatens the aforementioned drawing maneuver, but calmly advancing 8... Kh4 removes the danger of Rf1. e.g. 9. Rf1 Rxf1 10. Kxf1 Kh3. After the trickier 5... Rf4 6. Ke2 g4! is the lone winning move followed by 7. Rf1 g3! another lone winner. Game Over, Man!

A long time ago, I read Jeremy Silman's When a Philidor Position Goes Bad. But missing so many RPvR endgames at ChessTempo continues to reinforce that it's not all just Lucena and Philidor.

Sunday, January 8, 2012

The Karate Kid

When he made Daniel Russo wax his cars, paint his fence, paint his house, and sand his floors, Mr. Miyagi was secretly training him, not to be a slave, but to have strength and muscle memory to be able to block all kinds of attacks. This week, I overheard a martial arts instructor talk about the stages of training the other day. She highlighted these four:
  • Unconscious Incompetence - You have no idea what you're doing right or wrong.
  • Conscious Incompetence - You know what you're doing wrong but can't fix it.
  • Conscious Competence - You are able to do things right if you think about it.
  • Unconscious Competence - You do things right without thinking about it.

A lot chess training is pattern recognition and I agree it is important. If you know the beginning landmarks of all the checkmate patterns, then your analysis tree doesn't have to re-invent those checkmates every time you see them, especially when those set-ups show up at the end of your own analysis horizons. Wheels need not be reinvented every time. But when you get to the state of unconscious competence, it's hard to trust that stranger upstairs when you don't even know his name or party affiliation.

Perhaps this is a totally different part of chess competence, but when I analyzed a postmortem with future world champion Steven Zierk, I was dumbfounded at how quickly he could snap through variations to get to the truth about a line. I have difficulty buying into the oft-held forth de Groot assertion that around the expert-master level, the depth of analysis is not different, but the intuition and experience of evaluating different positions is where the difference lies. Arthur C. Clarke said "Any sufficiently advanced technology is indistinguishable from magic." Well, Zierk was so advanced, I thought I was watching wizardry. He seemed to be able to find a 10-ply refutation with ease. That kind of concrete ability I think is at least as valuable as a 9-ply calculating ability with a 1-ply correct intuition.

I listened to the entirety of Malcolm Gladwell's audiobook Blink. Here's an article about intuition pertaining to emergency room physicians that briefly mentions de Groot and some research gender-typing chickens. They used the term "sexing chickens", but I prefer gender-typing as a safer term. :)

Maybe I'm stubborn and mistrustful of the non-concrete. Or maybe de Groot's analysis doesn't even apply if I'm a Class A player masquerading as an Expert. Until I'm able to correctly verbalize or at least demonstrate deep-ply understanding of a complex tactic or position, I won't be focusing on my intuition to get me to the truth. I guess I'll be stuck at training stage 3 for a while trying for conscious depth and accuracy.

Thursday, January 5, 2012

A Song of Ice and Fire

I spent most of my leisure time during the holidays reading A Song of Ice and Fire by George R. R. Martin. This is more or less a review with a bunch of quotes at the bottom. It's probable that I'll give away some ***SPOILERS BELOW***, so there's your warning.

Where to begin? It's difficult to summarize a work of such grand scope. Let's start on the positive. George R. R. Martin is a great writer. If you took the story-telling gifts of William Shakespeare, Mark Twain, and J. R. R. Tolkein and rolled them all into one person, George R. R. Martin might be that person. He has a vivid style, flowery, but not excessively so. He has great instincts for pacing such that during climactic moments, the flowery words drop away and things happen in a rush. He has certain vocabulary mannerisms that seem very British ("arse") and some that seem a part of his invented fantasy universe ("Ser" instead of "Sir", "septs" instead of "churches", "sellswords" instead of "mercenaries"). There are also character mannerisms (every bearded character dribbles while drinking wine) and settings mannerisms (how many ways can you describe bone-numbing cold?) that mark his style. He also revisits about 10-15 themes such as "Winter is coming" (prudence) and "A Lannister always pays his debts" (monetary honor) that act as touchstones through the long tracts of pages.

The series is about a struggle to rule Westeros, a land of pre-gunpowder medieval chivalry, rival lordships, simmering feuds, legendary heroes, and ancient castles. Magic and mythical monsters seem extinct, although the very first chapter sets the tone for the return of an ancient inhuman evil. Martin's world includes a continent beyond the Narrow Sea that allows him to extend his tale beyond Western European culture into exotic Eastern cultures, such that if Scheherezade were an actual person, I would include her among Martin's inner muses. Most of the first book lays out the missteps and opening salvos of a war that engulfs a noble family of seven called the Starks. But the land is filled with carnivorous rivals: Lannisters, Targaryens, and Baratheons (oh my!). Against the backdrop of the rebirth of myth and magic, Martin weaves a Gordian knot of plots and murder mysteries among seven powerful families trying to grab the brass ring, or in this case an Iron Throne. Martin's characters run the gamut between stupid to genius, saintly to demonic, vivacious to listless and at least for the characters he concentrates on, they jump out from the page, warts and all. And just like in Shakespeare's tragedies, main characters die.

The deaths of main characters were jarring to me, especially since I hang on to childhood notions of "happily ever after". I hated the ending of Oscar-winning "Million Dollar Baby" and judging by the surplus DVD bin, so did much of America. But I was able to forgive Martin and keep turning the pages in hopes that enough of my favorite characters survive to justify my investment in their causes. But I now realize that perhaps Martin had little choice to create real danger and surprise. When I read the David Eddings' Belgariad (Pawn of Prophecy, Queen of Sorcery, Magician's Gambit, Castle of Wizardry, and Enchanter's End Game) or many of Asimov's works, I felt somewhat bored because their protagonists intelligently hatched plans, and executed them, perhaps improvising a little when things go wrong. Danger to main characters seems only a distant possibility. Martin actually gives his villains the elements of surprise, initiative, intelligence, and victory. Good guys haven't always won so far and perhaps I will grudgingly admit that the story experience has been richer for it.

This series is not for the faint of heart. George R. R. Martin originally started out in 1995 making a trilogy, but like the horizon, the final book keeps moving away, until now he estimates the final act to be book seven. He has only published the first five so far. The reading is voluminous. To finish book five, you have to read about 4,000 pages. Compare that to J. R. R. Tolkein's Lord of the Rings at 1,200 pages. There is a cast of thousands and I am not exaggerating too much here. The books have appendices that show family trees out to four or five generations of semi-significant characters plus perhaps thirty minor families. There are so many names that it is almost a necessity to consult A Wiki of Ice and Fire to keep from being hopelessly lost in the crowd. The content of both the book and the first season on HBO I would definitely rate at NC-17. Martin does not shrink from describing the horrors of war including amputations and maimings, gang rapes, infanticide, and torture. He is also not one to gloss over consensual sexual situations; sex sells. But there is at least one child rape that I can think of and some tangential references to an underage sex trade from which I have some trouble withholding Victorian judgment. It does add realism and cultural richness to Martin's world in a time of war that such ugliness is not covered up.

Martin also tackles weighty issues within his fiction framework using a realistic and sometimes satirical viewpoint. In this endeavor, he follows Mark Twain whose Huckleberry Finn focuses on slavery and whose A Connecticut Yankee in King Arthur's Court take on chivalry. Knights follow codes of honor for each other, but treat the common folk as less than dirt. Slaves are not just servile robots, but human beings trying to survive through obsequiousness and insidious rebellion and the little resources that they can muster. One writer took Martin's work as a commentary on statecraft, concluding that Martin seems to advocate use of soft power.

In summary, the 4,000 plus pages of "A Song of Ice and Fire" are well worth the slog. For chess players, there are references to the "Game of Thrones" in the first three books. In book five, a game similar to chess named cyvasse makes its appearance. The plots to win the throne include of course the defeat of other kings with the death of the losing king the standard consequence. There's nothing like a tale of regicide to get a chess player's blood flowing. The characters in the first book roughly map out to a group of chess pieces:

King:King Robert Baratheon
Queen:Queen Cirsei Lannister
Queen's Bishop:Lord Varys - "The Spider"
King's Bishop:Lord Petyr Baelish - "Littlefinger"
King's Knight:Ser Barristan Selmy - "Barristan The Bold"
Queen's Knight:Ser Jaime Lannister - "The Lion of Lannister"
Queen's Rook:Lord John Arryn
King's Rook:Lord Eddard Stark
Pawns:Robb Stark, Brandon Stark, Sansa Stark, Arya Stark, Jon Snow, Joffrey Baratheon, Tommen Baratheon, Theon Greyjoy
Here are some quotes from the book that are tangentially relevant to chess.

Volume 1: A Game of Thrones
Ser Jorah Mormont: The common people pray for rain, healthy children, and a summer that never ends. It is no matter to them if the high lords play their game of thrones, so long as they are left in peace. They never are.

Queen Cersei Lannister: When you play the game of thrones, you win or you die. There is no middle ground.

Lord Eddard Stark: Lord Baelish, what you suggest is treason.
Lord Petyr Baelish: Only if we lose.

Volume 3: A Feast for Crows
Lord Petyr Baelish: Always keep your foes confused. If they are never certain who you are or what you want, they cannot know what you are like to do next. Sometimes the best way to baffle them is to make moves that have no purpose, or even seem to work against you. Remember that, Sansa, when you come to play the game.
Sansa Stark: What... what game?
Lord Petyr Baelish: The only game. The game of thrones.

Lord Petyr Baelish: I am tempted to say this is no game we play, daughter, but of course it is. The game of thrones.
Sansa Stark (thinking): I never asked to play. The game was too dangerous. One slip and I am dead.

Lord Petyr Baelish: I might have to remove her from the game sooner than I'd planned. Provided she does not remove herself first. In the game of thrones, even the humblest pieces can have wills of their own. Sometimes they refuse to make the moves you've planned for them. Mark that well, Alayne, It's a lesson that Cersei Lannister still has yet to learn.

Volume 5: A Dance with Dragons
Haldon Halfmaester: The day you beat me at cyvasse will be the day turtles crawl out of my arse.

"Prince Aegon," said Tyrion, "since we're both stuck aboard this boat, perhaps you will honor me with a game of cyvasse to while away the hours?"
The prince gave him a wary look. "I am sick of cyvasse."
"Sick of losing to a dwarf, you mean?"
That pricked the lad's pride, just as Tyrion had known it would. "Go fetch the board and pieces. This time I mean to smash you."

They played on deck, sitting cross-legged behind the cabin. Young Griff arrayed his army for attack, with dragon, elephants, and heavy horse up front. A young man's formation, as bold as it is foolish. He risks all for the quick kill. He let the prince have first move. Haldon stood behind them, watching the play.

When the prince reached for his dragon, Tyrion cleared his throat. "I would not do that if I were you. It is a mistake to bring your dragon out too soon." He smiled innocently. "Your father knew the dangers of being over-bold."
Smiling, he seized his dragon, flew it across the board. "I hope Your Grace will pardon me. Your king is trapped. Death in four."
The prince stared at the playing board. "My dragon..."
" too far away to save you. You should have moved her to the center of the battle."
"But you said..."
"I lied. Trust no one. And keep your dragon close."
Young Griff jerked to his feet and kicked over the board. Cyvasse pieces flew in all directions, bouncing and rolling across the deck of the Shy Maid. "Pick those up," the boy commanded. He may well be a Targaryen after all.
"If it please Your Grace." Tyrion got down on his hands and knees and began to crawl about the deck, gathering up pieces.

The thin man shifted an onyx elephant.
Across the cyvasse table, the man behind the alabaster army pursed his lips in disapproval. He moved his heavy horse.
"A blunder," said Tyrion. He had as well play his part. "Just so," the thin man said. He answered with his own heavy horse. A flurry of quick moves followed, until finally the thin man smiled and said, "Death, my friend."

Tyrion Lannister: I play better with a full belly and a cup of wine to hand.