Sunday, May 20, 2018

Round Robin Roundabout

In National Lampoon's European Vacation, Clark Griswold drives his family around the Lambeth Bridge roundabout for hours, unable to maneuver his car to an escape road. I tried to find an alliterative synonym for obsession, but the English language has only so many words and none seemed to fit the bill, so I went for this English landmark for a more figurative version of being stuck in a rut.

Last year, during the club championship qualifier, I looked up the round robin tables. In the past, while assisting with the organization of the chess club, I had typed the numerical pairings found in the USCF Rulebook into an Excel spreadsheet and then done search-replace operations to make pairings using the players' names instead of just their seed number. While laboring to retype a 7-player double round robin and a 16-player single round robin, Mother Necessity whispered into my ear, "This should be automated by a computer." But I could not find a website through a Google search that specifically generated the Crenshaw pairings used in chess.

So I set about writing one of my own. The reference that was most useful was Wikipedia's page on round-robin tournament. In it, the process for Standard, Berger, and Crenshaw round robin pairings is described. Using javascript, I implemented algorithms that generated these 3 types of tables. During the process, I learned many items of minutiae, which is the meat of this post. Those of you who are already bored can read this list and quit, since the remainder of this post is going to be tracing and retracing my steps on my own mental roundabout.

  • Standard round robin uses incremental rotation, while Berger rotates the field halfway around the circle. Crenshaw pairings are just Berger pairings in reverse chronological order.
  • The USCF 4-player and 6-player round robin tables are not generated by the Crenshaw algorithm. The 4-player printed in the rulebook is Standard algorithm. The origin of the 6-player table is shrouded in myth with advantages and disadvantages.
  • The reversal table is only used when the round robin has an even number of players and one player withdraws before playing half of the games. It is possible to create an algorithm to make the reversal tables as well as the pairing tables.
  • Generating the tables and the reversals helped me detect about a dozen typographical errors in the Fifth and Sixth Editions of the USCF Rulebook.
  • A man named Warren J. Porter has created his own round robin system and on his own website placed his name among Berger and Crenshaw, but Wikipedia and the USCF have yet to recognize his innovation.

The most basic way to set up a round robin uses a Standard Algorithm. Put player 1 in a stationary chair. Line up the first half of the n competitors next to him, 2 through n/2. Then come back in reverse order pairing n/2+1 against n/2 until n is facing #1. Next round, everybody rotates clockwise by 1 seat except #1, so that #1 plays n-1 and n sits next to 1 and plays against n-2. The Wikipedia article has good pictures to see this rotation. The Berger tables use a different set of iterative steps. The field is laid out like the Standard, but after round 1, the last player is held constant, while everybody rotates clockwise by n/2 seats. The Crenshaw tables, at least for n>6, are basically identical to the Berger schedule, just in reverse chronological order. In Javascript, these algorithms translate into the following statements:

var seeds = [1, 2, 3, 4, 5, 6, 7, 8];
var half = seeds.length / 2;
var rounds = seeds.length - 1;
var schedule = [];
for (var i = 0; i < rounds; i++) {
  var top = seeds.slice(0, half);
  var bottom = seeds.slice(half, seeds.length);
  schedule[i] = [];
  for (var j = 0; j < half; j++) {
    var pair = top[j] + "-" + bottom[j];
  //now we rotate
  var addon = seeds.splice(-1); //Standard algorithm rotates the last player...
  seeds.splice(1, 0, addon[0]); //...into the second position
  //Berger and Crenshaw rotate the field halfway around
  if ((type == "Berger") || (type == "Crenshaw")) seeds = bottom.slice(1).reverse().concat(top).concat(addon);
if (type == "Crenshaw") schedule.reverse();

At the end of the algorithm, the pairings will be stored in a two-dimensional array named "schedule[r][b]" where the first index refers to the zero-based round number and the second index refers to the zero-based board number.

Once I got the algorithm to work and output to a readable form, I noticed a couple discrepancies in the USCF tables for 4-player and 6-player round robins. The 4-player table is simply the Standard 4-player table. The 6-player table is weird in that seeds 1-2 meet in round 1 while they meet in the penultimate round for tables 8-24. This would seem to be a defect of the table, especially if you have seeded players into the round robin in descending rating order. However, the USCF tables also carry a not-so-useless provision that if a player drops out of an even round robin before playing 50% of the games, late-round reversals can help mitigate color imbalances.

  • The custom 6-player round robin table, unlike most round robin tables pairs seeds 1-2 in round 1 instead of the penultimate round like all the rest of the tables. This would seem to be a defect with the pairings if you have chosen to seed your players by rating order instead of by lot. However, the reversal table has all the reversals in the final round 5. When the 6-player table is generated by algorithm, some of the reversals occur as early as round 3 of 5.
  • Aside from the idiosyncrasies of the 4-player and the 6-player, the algorithm generates tables with players 8-24 with basically no error.
  • The reversal tables of the 10-player and the 14-player are sorted in such a manner that my algorithm is at a loss for matching it.
  • In the Fifth Edition USCF rulebook, on page 296, it should say, "Color reversals should be made in the last three rounds if someone withdraws before playing five games."
  • Also in 5th Ed., on page 298, the 14-player PAIRING table, round 1, board 1, should say, "7-14" as the pairing, not "7-4".
  • In 6th Ed(p 323) and 5th Ed(p 301), in the 18-player REVERSAL table, when #13 withdraws, the first pairing to reverse should be 18-1 instead of 8-1 (1-8 is a round 10 pairing). Also, when #14 withdraws, the second pairing to reverse should be 13-6 instead of 13-16 (13-16 is a round 7 pairing).
  • In 6th Ed(p 325) and 5th Ed(p 303), in 20-player REVERSAL table when #10 withdraws, the pairing to reverse should be 15-6 instead of 15-16 (15-16 is a round 9 pairing).
  • In 6th Ed(p 326) and 5th Ed(p 304), in the 22-player PAIRING table, in the 18th round, the second to last pairing should be 1-4 instead of 1-14 (1-14 is a round 8 pairing).
    • In 6th Ed(p 328) and 5th Ed(p 306), in the 24-player PAIRING table, many pairings in rounds 21-23 have typos, specifically:
    • In round 21, 10-17, 11-16, 12-15, and 13-14 instead of 0-17, 1-16, 2-15, and 3-14.
    • In round 22, the second to last pairing should be 23-3 instead of 23-2 (2-23 is a round 23 pairing).
    • In round 23, 10-15, 11-14, and 12-13 instead of 0-15, 1-14, and 2-13.

I have made a web application that produces the tables and reversals algorithmically at

Practical Rook Endgames 17: Cure a Vancura Amnesia

In the 1990 "Total Recall" starring Arnold Schwarzenegger, the main character encounters a video recording of himself lifting the veil on his amnesia, his real identity and the lie he was until recently living.

I was watching the St. Louis Chess Club's YouTube coverage of the 2018 U.S. Championships. In round 7, Zviad Izoria had this position with white to move against Hikaru Nakamura. Study the position and then watch 6 minutes of the broadcast from when White moves Rh8 until the game ends in a surprise.

FEN: 8/2k2K2/2P4R/2r4P/8/8/8/8 w - - 1 88

When Vancura was mentioned, I searched my memory and could only find a hazy mess despite having blogged about Vancura here and here. So I went back to a Vancura stem position with white: Ra8, Pa6, Kf4 and black: Ra1, Kg7, and this time I tried to create a more thorough treatise using the Shredder endgame tablebase and playing through plausibly interesting variations. The result of my effort is this one-page memory refreshment PDF tool of variations related to the Vancura position. It's not quite as vivid as Schwarzenegger's video recording, but this is the mnemonic device that should help stave off my next bout of Vancura amnesia. Now that I know a little more about Vancura, I'm going to comment on the commentators. Here is the blow-by-blow discussion with YouTube time indexes:

5:40:12 Maurice Ashley notices white playing 88. Rh8 dropping the c-pawn, going for an h-pawn win. Since the black king has the c-pawn blockaded, white's best chance for victory is the distant h-pawn.
5:40:16 Jennifer Shahade mentions a winning skewer trick. The Seventh Rank Skewer trick is one of the weapons in the stronger side's arsenal. It only comes into play when the weaker side tries to move his king to the pawn too early and steps on one of the two central files (d- or e-). The stronger king also tends to be out of the picture so that the skewering happens without interference. The skewer doesn't come into Izoria-Nakamura. I mentioned the skewer before in this blog post.
5:40:17 Yasser Seirawan says that the black king is so far away. In many variations, the draw or win depends upon a king race to a key Bishop-7 square. If the weaker king can stay within a knight's move of the stronger king, he can usually draw.
5:40:19 Awonder Liang on post-game interview couch suggests the position is "similar to Vancura". Similar to Vancura is as close as it gets.
5:40:27 Yasser disputes the closeness to Vancura. Awonder gives the line 88... Rxc6 89. h6 Kb7. 88... Rxc6 actually occurred. Had Izoria played 89. h6? Nakamura could have obtained a drawing Vancura with 89... Kb7!, the only move that draws! One of the reasons I find some of these endgames so fascinating is how moves can be both precise and counterintuitive at the same time. Vancura was only one move pair away from the actual game.
5:40:50 Yasser suggests 89. Re8 (build a lateral rook bridge) Building a lateral rook bridge is one technique to win. Usually, the defending rook has abandoned his order to keep the pawn under observation and is trying to get into Vancura lateral checking position.
5:40:54 Jennifer agrees 89. h6 might be the wrong move. 89. h6? is drawn with best play.
5:40:01 Yasser gives the line 89. Re8 Rh6 90. Re5 intending Kg7. The Shredder tablebase notes that 90. Re5! is the only move still winning for white.
5:41:10 Maurice adds 90. Re5 Kd6 91. Kg7 "just nails him". Yasser agrees "just nails him". Shredder says 91. Kg7? is drawn simply by 91... Kxe5! 92. Kxh6 Kf6!. The weaker king never allows the stronger king to move Kg7 or Kg8. If the stronger king does get Kg6, then he'd better be on his way to h8. e.g. 93. Kh7 Kf7 94. h6 Kf8! 95. Kg6 Kg8! and the weaker king can mindlessly play Kg8-Kh8-Kg8 until he gets stalemated. Shredder says 91. Rf5 keeps the win alive.
5:43:20 Yasser notices play continued 89. Kg7 Rc1. Jennifer starts analysis with 90. h6. 90. h6 is correct.
5:43:57 Maurice declares that "h6 is a draw." Shredder disagrees. In fact, at no point after 88. Rh8 did white let the win slip.
5:44:00 Yasser questions the draw assessment. Maurice says the black king might be close enough to draw. The black king is one tempo short of drawing.
5:44:11 Yasser extends the line 90. h6 Rg1+ 91. Kh7 Kd7 92. Rg8. The position of the stronger side's pieces is sometimes Pawn at rook 6, King at rook 7, and Rook at rook 8 while the weaker rook harasses from the knight file. The winning method often reorganizes these pieces starting with Rook to knight 8, King to knight 7 and if checked, King to rook 8 and then pawn to rook 7. It looks as if the king has castled by hand into a tight formation hugging the corner of the board. I used the moniker "Fortress of Solitude" for my mnemonic here. 92. Rg8! is the only move that wins.
5:44:29 Jennifer and Yasser agree that the black king is too far to draw. Correct.
5:45:11 Yasser comes up with the plan of Rg8, Rg6, Kg7, and queens. Black can throw a monkey wrench into this plan. Concretely, 92. Rg8! Rf1 93. Rg6? gives up a draw to 93. Ke7.
5:45:30 Maurice tries to draw with the plan 90. h6 Kd7. Yasser extends with 91. Rg8 Ke7 92. h7
5:45:44 Nakamura lets his clock run down to 2 seconds before recovering a 30-second increment. Maurice says "Nakamura's never going to flag." Never say never.
5:46:02 Maurice agrees that after 92. h7, the White King will win with a "laddering back" maneuver. With the weaker king at e7, the stronger king "ladders back" through harassing checks with Kg7-Kh6-Kg6-Kf5 and down to f2 if necessary.
5:46:20 Maurice mentions the queen versus rook ending. Jennifer asks, "Wait did you say there's a way to force queen versus rook?" Jennifer's question goes unanswered during the broadcast because of what happened next in the game. From the game continuation 90. h6 Rg1+ 91. Kh7 Kd7 92. Rg8! Rf1 93. Kg7 Rg1+ 94. Kh8 Rf1 95. h7 Ke6 96. Kg7 Rg1+ 97. Kf8 Rf1+ 98. Ke8 Rc1 99. Rg6+ Kf5 100. Rf6+ Kxf6 101. h8=Q+ Kg6 starts a complicated Queen versus Rook that is likely to become my next Endgame Obsession.
5:46:30 Nakamura flags just before playing 92... Re1. Maurice's head just about exploded when he learned that Nakamura had flagged.

Tuesday, April 17, 2018

Checkmate Nitpick

I fell for the trap of thinking that a chess movie starring Danny Glover and Sean Astin on Netflix couldn't be that bad. I probably fast forwarded through the last 30 minutes, but I still regretted the time I lost on it. No need to warn you of spoilers because I'm really doing you a service if you never watch this turkey. Mash up a bank robbery plot, a family disintegrating in the midst of a health crisis, and a high stakes chess game, and you'd probably do better than what director Timothy Woodward Jr put together. I should have read the reviews before I hit play because it's basically a string of the lowest ratings you could give.

I found myself shouting at the television screen because for a movie with a chess-themed title, they sure didn't know chess. Here are a couple of screenshots to play at home:

1. Vinnie Jones is sitting behind the black pieces awaiting his opponent. What's wrong with this picture?

2. Danny Glover arrives at the opposite side of the board and sets a case down. There are two things wrong here.


1. The black king is on Vinnie's right and the black queen is on his left. Standard setup should always have it opposite.

2. The player of the white pieces brought his own half-set which happens to match the style of the black pieces; this never happens because no one breaks up sets. The right lower corner nearest to Danny Glover should be a light square.

1 star for spending money on named cast members, 0 for skimping on writers who could put together plot, characters, or dialog. I still don't know why the chess game had any relation to the rest of the movie, but you know what? I just don't care.

Wednesday, November 29, 2017


I had been casting about for things to pique my interest and thought that reading a book about Paul Morphy might do the trick. I had done some translating of a German book about Leonid Kubbel and thought that translating a Spanish book about Morphy might also be entertaining. Alas, most games were listed in this book with little commentary. Eventually, I found Johann Lowenthal's book on Morphy. While dated, it provided me with a suitable biography and a selection of games against Adolf Anderssen. It was rather sad to read of his problems late in life and the fact that he never seemed to have a worthy rival to push him to greater heights. None of his games are in Burgess' World's Greatest Chess Games, not even the Opera Game, since his opposition during his brilliant games was rather weak.

With only a modicum of humility, I submit one of the games I played this year for the adjective of Morphyesque. In any event, I might as well dedicate this game to his memory. It was played at tournament time controls against an opponent with Elo 1900. It is short enough that I'm not going to use any diagrams, but instead appeal to the reader to try to follow the game "blindfolded". I have White against N.N.(1900).

1. e4 e5 2. Bc4 Nf6 3. d4 The Urusov Gambit is like the Scotch Gambit for the Bishop's Opening. It aims to open up the game quickly where tactics may provide for a quick win for White. There are a decent number of transpositions to Two Knights Defense and the Max Lange Attack. 3...Nxe4 Risky, but not bad yet. The worst part of this move is that Black begins to violate all kinds of opening principles, e.g. moving pieces multiple times and falling way behind in development. 4. dxe5 Notice that the knight is centralized but awkward because the pawn prevents the natural retreat to f6. 4...Nc5 5. Nf3 Ne6 6. O-O White hasn't even gambited a pawn and he has a strong e5 pawn, two naturally strong minor pieces, a castled king, and some possible heavy piece action on the d- and e-file. Black does not sense the danger and tries to catch up in development with an aggressive piece posting. 6...Bc5 7. Nc3 With the e5 pawn leading the charge, I have the natural Ne4 coming. My opponent saw this move and wasted two more tempi getting his bishop to a7. 7...a6? 8. Ne4 Ba7??

What move should White play? Hint: It's a developing move. If you are following along with no chess board in front of you, Black has two pieces developed: a knight at e6 and a bishop at a7. He also has moved one pawn to a6 and his e-pawn is missing. The rest of his pieces including QR, QN, QB, Q, K, and KR are on their home squares. White on the other hand has knights at e4 and f3, a bishop at c4, kingside castling, and the QR, QB, and Q on home squares.

9. Bg5! It looks like White is going to let Black exchange off a pair of pieces, but White gets the better of the deal. While Black loses a defender at e6, White gets the g5 outpost for his knight and opens a path to h5 for his queen. Development begets development. The pawn at e5 assures that f6 is only going to lose material for Black. 9...Nxg5 10. Nfxg5! O-O What's the naturally aggressive follow-up? 11. Qh5 h6 to prevent Qxh7#. I had calculated most of the outcome from here, but I must confess, that I didn't know what I would do if after my next move, Black sacrifices his queen. I thought I would just win the queen with Nxg5, but in another line without the queen sac, I saw that Nf6+ was strong. It turns out it remains strong even after the queen sac. I played a fun move here. 12. Qg6! My opponent resigned, so I didn't have to make the error of 12...Qxg5 13. Nxg5?!. I rationalize that maybe I would have found 12...Qxg5 13. Nf6+! Qxf6 14. exf6 and with two pins on the pawns in front of his king, Black is helpless to stop 15. Qxg7#.

Monday, July 24, 2017

A Fairly Simple Miss

My chess enthusiasm has been waning a bit even as my rating hit a peak of 2140 after winning a semifinal match in the club championship. I'm currently down 0-1 in the finals, so the struggle continues. Much of what brings me to chess can be attributed to two things: 1. defending my repertoire as the right way (at least for me) to play; and 2. other people's enthusiasm. By this I mean that I spend time with club players who seem to have a purer enjoyment of the game than mine. A new kid came to town and seemed quite keen on playing blitz with some skill. I invited him to our favorite coffee shop chess hangout and played a few games with him on Sunday.

One endgame stuck out in my memory and after I reconstructed it at home, I discovered something both of us missed. My opponent lost the exchange at one point and was annoyingly hanging on. I knew that my rook was better and that at some point, I needed to trade rook for bishop and pawn and win in the pure pawn ending. Here was a position right before that exchange took place. I was actually playing Black, but the diagrams work out better this way. White just played Rg4. Black to move:

I have surrounded the g5 pawn and plan on taking it soon. The rook is preventing Black from breaking through on the queenside. I could see my opponent do some quick calculations and decide that the pawn ending was drawn. He then played Bf4, probably as a prelude to Kb4 and Kxb3.

White to play: What's the best move? I had been prepared to take the bishop for a while. Now that the opportunity was present, I lost objectivity and only looked at my rook and his bishop disappearing from the board. I played Rxf4? and gxf4 Kxf4 quickly ensued. Now with Black to move, this is the position:

We soon found ourselves in a drawn Q+PvQ ending, confirmed by tablebases. In the previous diagram, what should I have played? I could have gained one critical tempo with the killer move Rxg5. Now if Black wants to regain the exchange with Bxg5 Kxg5, my king is magically transported from f4 to g5 with Black to move:

But this time my pawn queens quickly enough to win.

Saturday, May 13, 2017

TPS Report #20

A friend I hadn't seen in a while showed up at the club and congratulated me on my recent successes. I confessed that despite the success, my relationship with chess had been languishing toward ennui again. Having finished the tournament and rated the results, I have to remind myself of the good things.

After the year of no rated tournament games, I jumped into club games with the 2016 Holiday Swiss starting after Halloween. After a good 10.0/12 run in the Club Championship Qualifier, I now have the highest rating of my career at 2135. The statistics seem to be stacking up to say that I have made a quantum leap, but I worry that crowing about good things calls the attention of the karma-balancing forces. Here is one version of the cherry-picked statistics:

Opponent ClassPre-2004 (N=206)
Performance Rating
2004-2013 (N=240)
Performance Rating
2014-2015 (N=89)
Performance Rating
2016-2017 (N=17)
Performance Rating
Class B1877196320841949
Class A1885207820732200

In 2004, I volunteered to do the games bulletin for the master tournament in Reno. I had to annotate somewhere around 60-100 games between players in the rating range of 2000-2600. I think the two things that struck me most were how efficiently the masters moved their pieces in pursuit of their plans and how relentlessly their technique converted advantages into points. 2004 was the year I gave up the Sicilian in favor of the Modern Defense and I think 2004 was also the year that I fell in love with the endgame. In retrospect, my technique improved at beating the players in Class B and in Class A. However, playing against fellow Experts was a misery since I was only an Expert by virtue of a prize rating floor and I often felt outclassed.

In 2014, I gave up the English Opening and the Modern Defense in favor of more open, tactical games. I also started systematically studying and reviewing my opening repertoire with Chess Position Trainer, developing my own opening theory, and familiarizing myself with key positions and themes. I think that was the year that I began to fear Experts less and turn a losing percentage against them (37%) into a winning one (58%).

I don't have an explanation for what happened in the past 7 months, but I seem to more consistently avoid the emotional attitude of "I'll just make this move, see what happens, and hope it turns out right." My job is to know as well as possible what will happen and in as much as I had chances to avoid worse and losing variations, I seem to be capitalizing on a reduction in my mistakes. I'd like to say that some of my recent work with endgame studies has improved my kinetic linking to see further and clearer. Conversely, my opponents seem to be making disastrous mistakes more frequently. Or maybe I have improved at spotting opportunities.

Of course, there is still room for a regression to the mean since the N-number is small for the 17 recently picked cherries. Still, with my tendency to accentuate the negative, it's therapeutic to highlight the positive.

Going forward, I will try to mentally rest for a few weeks until the championship matches. Perhaps I will blog about more interesting and practical endgames that have come up in my games and in those of the masters.

Thursday, April 6, 2017

Tomb Raider Revisited

I have been watching the Saint Louis Chess Club's YouTube coverage of the 2017 U.S. Chess Championships. In round 8, Ray Robson played a Gruenfeld Defense against Alexander Onischuk. After 1.d4 Nf6 2.c4 g6 3.Nc3 d5 4.cxd5 Nxd5 5.e4 Nxc3 6.bxc3 Bg7 7.Nf3 c5 8.Be3 Qa5 9.Qd2 0-0 10.Rc1 Nd7 11.Bd3 b6 12.0-0 e6 13.Qe2 Bb7 14.Nd2, they reached this positon:

Ray Robson decided to raid the two pawns at a2 and c3. I'm not sure where he thought he was getting away with the loot, but the tomb closed up and Ray's Raider got trapped 14...Qxa2 15.Ra1 Qb2 16.Rfb1 Qxc3 17.Nc4!

I think Onischuk speculated that Robson might have missed 17.Nc4. Play could have progressed with 17...b5 18.Ra3 Qb4 19.dxc5! Qxb1+ 20.Bxb1 bxc4 21.Qxc4 with only +1.15 pawns to White.

Instead, Robson tried to get out with 17...Nf6? 18.Ra3.

It struck me here how similar the queen trap here is compared to the one in my own game. Not completely analogous, since I know there is a difference between Qb3 and Qc3. And now Robson played his own knight desperado 18...Nxe4

Unfortunately, the tactics are all in Onischuk's favor at this point. 19.Bxe4 Bxe4 20.Rxc3

Eventually, the game traded down to Queen and the 3 white kingside pawns versus Rook and the 4 black kingside pawns. Someone mentioned a fortress, but White forced some pawn exchanges and the Black king became too exposed to wait out the siege.