Patterns In Chess

If you don't know a lot about (good) chess, you probably think chess is all about "If I move here, he moves there, so I can move here...". This is wrong.

Computing moves is necessary to play chess in the first place. But just computing moves would not be enough to fill all those chess books (there are more books about chess than about all other sports combined), and just computing moves would not be enough to make highly intelligent people dedicate their whole lives to chess and nothing but chess.

There is more to chess... dozens and dozens of chess patterns, for one thing. Chess patterns range from simple ones (for example, having more space in the center, open lines, or "weak" squares which are difficult to defend - each of these can be exploited in certain ways) to rather complex ones. An example for a complex one might be:

"My opponent has two weaknesses, one on each side of the board. (E.g., on the queenside, I have an open line to attack; on the kingside, he has a weak square I could reach.) Plus, I command more space in the center. This command of space allows my pieces to get from one side of the board to the other more quickly than my opponent's pieces can. I can use this to my advantage if I switch between attacking first one weakness, then the other, then again the first and so on. Sooner or later, my opponent will not be able to defend quickly enough, and I will be able to get some kind of advantage."

Believe it or not, even complex patterns like this have a name (even if I don't know what it is in English) and are widely known. (As one might guess, this one is called the Principle of Two Weaknesses.)

Understanding these patterns (which I do not claim to do) will make you play good chess - but still not great chess. Chess patterns have been around for so long (about a century) that single patterns are no longer good enough for top class chess.

When one looks back over the last 50 years or so, the most important advances in chess were not driven by single patterns, but by pattern languages and their philosophies. What makes a chess match between, say, Kasparov and Karpov so exciting is that it's not just two persons playing chess, but also two opposing chess philosophies and two finely-tuned chess pattern languages (which in chess always go hand in hand) that are fighting.

Maybe this development is similar to what will happen to the pattern movement over the next decades - who knows?

-- FalkBruegmann


I've long been interested in chess as a toy universe for thinking about thought. In particular, a good chess player does not think up bad moves and then reject them so much as never consider them at all [GrandMasterEliminatesWrongMoves]. This is what Alexander refers to when he says a pattern language is generative. The meta-rules make chess easier rather than harder.

I believe something similar applies in poetry. The rule that poetry has to rhyme makes it easier to compose on the fly, as the bards did of old, because the constraint more or less tells you what the next line must be. The same is true with programming languages. FormLiberates. -- DaveHarris


In particular, a good chess player does not think up bad moves and then reject them so much as never consider them at all. I cannot quite agree to that. Often, it is exactly the seemingly "bad" moves (like, for instance, sacrificing your queen) that, when analyzed a few moves further, lead to a surprising advantage. -- ClemensEffHofreither


I think this is a terrific digression. I'd like to add my support and push a little on the boundaries.

The use of patterns in chess has been noted by many cognitive scientists. One researcher has estimated that expert chess players have internalized somewhere in the neighborhood of 1,000 patterns, and that Grand Masters internalize between 10,000 to 100,000 patterns.

Given these numbers, consider the level of effort required to achieve world-level play. A player may need to encounter a particular pattern numerous times to fully internalize it. While aspiring Grand Masters may play frequently, it is not possible for them to play enough to discover all the patterns on their own. They must study chess in order to acquire the requisite level of knowledge. They read through transcripts of famous matches and pore over articles and books describing opening, middle, and endgame strategies. Chess Informant has published a mammoth series of volumes that covers approximately 48,000 openings, 1,800 middle game strategies, and 8,500 endgame cases.

Note that even with constant matches and study, it usually takes about ten years to achieve world-level play.

Given the inefficiency of discovering patterns on our own, can those of us in software development afford not to document our patterns and study those discovered by others?

BUT THEN AGAIN, SOFTWARE DEVELOPMENT IS NOT CHESS.

(Thank God. I don't think my ego could handle living in a world with GrandMasterProgrammers)

Yes, chess expertise and software development expertise both make use of patterns, but software development is not chess. Chess has one clearly defined overarching goal - checkmate - whereas systems development typically has multiple, often conflicting and ill-defined, goals. And often, the information used to define these goals is also conflicting, and usually hard to interpret and constantly shifting. In addition, the domain of chess is quite limited in comparison to systems development. In fact, it is probably better to think of systems development as bringing us into multiple disparate domains - both business domains and technical domains. In these respects, systems development is more like chess? older cousin--foreign relations (hey, if we're going to digress...).

But in the midst of this complexity, diplomats also use patterns. They study history, and law, and diplomatic forms, and many other domains which enable them to reason through their problems by analogy. These analogies enable the diplomats to make inferences about and constrain the scope of the problems they face. It is the process of saying, "Hey, 'this' is like 'that'! And since I understand 'that' really well, I also understand 'this'." I've heard Iraq variously compared to WWII Germany, the lower classes in a class struggle, and bad neighbors. These comparisons highlight certain features of the problem before us and enable us to focus on them.

As soon as we hear the word "like", we know we're in the realm of analogies. Other key words might be "similar to", "akin to", or, if we're really feeling bold, "is" (e.g. "war is hell"). The two things compared are not literally the same (no matter how much it might seem like it in the moment, war is not hell), but the comparison helps us to understand or express important qualities of the thing before us.

AnalogicalReasoning? is a process so common that we're often not conscious of doing it, and it's as pervasive in software development as it is in political affairs. I recently worked on a system involving reservations for transmitting large quantities if electric energy. In the process of working on that project, we talked at length about hotel and airline reservations. Based on the key word "reservations" we said, "Hey, this is like that!" The comparisons enabled us to make a number of fruitful inferences about electricity transmission reservations, which the users were able to then confirm or deny.

My own hope for the pattern movement is that it will provide plenty of grist for this analogical mill. By studying patterns we'll find ourselves saying, "Hey, that's like a Visitor", or "Hey, that's like a Party", and that these comparisons will lead to insights.


I think this is a great idea. While software development may not be exactly like chess, it has a lot of learn from the art of chess. After all, software development is only decades old, while chess is a little older.

So here are some proposals for a collection of patterns:

-- CostinCozianu


Yes, chess is one of the most coherent thought-domains. Most others by now have been infected with politics, either by the fascist principle of "my leader believes this therefore it is true", or by the democratic principle "the voice of the people is the will of god". Which means arguments cannot be settled & progress is possible only after the deadlocked teams die off & another generation arises with different questions (sigh...). Whereas in chess, truth is proven by intensive research day after day. I wish both art & philosophy were closer to chess. Then theory might become less the swamp of delusion that now prevents us from using rationality to solve our problems.

Obviously you've never participated in a US Chess Federation election nor seen two GrandMasters? squabble over trivial rules violations. :(


If you don't know a lot about (good) chess, you probably think chess is all about "If I move here, he moves there, so I can move here...". This is wrong.

Computing moves is necessary to play chess in the first place. But just computing moves would not be enough to fill all those chess books (there are more books about chess than about all other sports combined), and just computing moves would not be enough to make highly intelligent people dedicate their whole lives to chess and nothing but chess.

Isn't this precisely how DeepBlue defeated GarryKasparov a while back? -- MikeSmith

Note: it was not DeepBlue that defeated Kasparov; only its successor, DeeperBlue?, was able to do so.

And given Kasparov's behavior when he lost, I'm very glad we don't have Grandmaster Programming!

Clearly, DeepBlue's big advantage over Kasparov was that DB did more computing than GK per turn, not necessarily "smarter" computing. DB was, however, schooled in chess, just like his human peers.

There are two basic processes in chess. "Searching" is where you literally play out the game scenarios in your mind (if I move here, he moves there, etc.) A basic MinimaxSearch?ing algorithm is pretty powerful even with a lousy HeuristicRule, and you can optimize it with AlphaBetaSearch?, and I'm sure there are even better searching algorithms that my late-1980's intro AI class never covered. :) (SingularSearchExtension? was the innovation used by DeepBlue. See also GameTree.) I would suppose that many young chess prodigies beat more experienced players by being more agile and accurate in their mental searches for good moves.

The other process is "evaluation". A master can look at the configuration of a board and determine, for example, that the knight in the corner is more dangerous than the bishop behind the pawn, even if no immediate threats are visible from the pieces. The master can immediately fit the layout of a board into a context of some familiar pattern that he's already seen before. His ability to evaluate the balance of power allows him to be more efficient in his searching.

Now, DB took a while to reach its world title. Certainly, improvements were made to its hardware, so that searching was more efficient. Hardware improvements include both general processor speedups and customization of circuitry to optimize calculations of particular heuristics.

Perhaps more importantly, DB improved its ability to evaluate board positions. This required human intervention, I'm guessing. After DB lost to a human, other humans would evaluate the game to determine a key move that turned the game. If humans decided that DB erred, they would try to improve his heuristic. Humans might say DB should have moved the queen, not the rook, on move 23. The humans would contrive a tweak to the evaluation scheme that would leave moves 1-22 intact, but which would lead to the correct move on move 23. Of course, DB itself would be a big help in this postmortem. If humans decided that DB played well, but that the human played a particularly brilliant move at some point in the game, then the humans might tweak DB's Kasparov evaluation formula, so that DB could predict Kasparov's moves better, and thereby put more realistic Kasparov moves into its search profile.

-- SteveHowell

Apparently, Kasparov resigned the first game he lost in a position where a draw was available.

Wasn't it because he made a blatant opening error in move 17, which lost him the queen, and the equalizing moves weren't trivial to spot?


What have people learned from computer chess?

Have people studied KenThompson's endgame databases to use them in practical play? The positions are fiendishly complicated. The KRB vs KNN position that is most difficult for White to win takes 243 moves to mate or force a winning capture.

Yes. Some GM's have analyzed the more common tricky piece combinations and distilled the patterns out of them. I remember this was done for KQ-KR at least. The current endgame database state-of-the-art is being advanced by Eugene Nalimov, who has been chugging through the six piece endgames. It is as much an exercise in data compression as efficient calculation.

Have there been any human-human games that have ended like game 5 of the second Kasparov-Deep Blue match? In that game, Kasparov obtained a passed pawn and was driving it to the eighth rank, and Blue ignored it, made a violent attack on Kasparov's king, and put it into a net. If Kasparov queened the pawn, Blue would have forced a perpetual check. If Kasparov had tried to free his king, Blue would have been able to stop the passed pawn, and would have gotten two or even three passed pawns of its own. -- EricJablow

Yes, this kind of double-edged position happens regularly in GM games. More frequently than in computer games, in fact. Computer chess tends to be very materialistic.


There are patterns, and there are patterns. One of these is discussed in ThreeDeeChess.

I wonder how far the "geometric" paradigm can be stretched in chess.

In my youth, I postulated that there were attacks and defenses that modeled shapes (like a "parabolic" attack). Some of these I actually got to work (though I'm pretty sure their success was largely due to their novelty). This was instructive, but more of an exercise in "knowing the answer and inventing the proof" than concluding a general case from a large set of observed data.

In spite of this, I managed to win slightly more than I lost. However an encounter with a really skilled player who had beaten several ranked opponents dissuaded me from ever pursuing it on a tournament level. I don't mind losing, but I hate having it made to look easy.

-- GarryHamilton

I once tried something somewhat similar with a chess program, to see if I could trap it geometrically in a way that would defeat its ply search. The idea was very roughly to set up something like this:

  *************
  bait                enemy queen
  *************
I.e. create an enclosure baited with a piece being sacrificed as bait to the enemy queen, which would be lured inside to take the bait, but then the enclosure would be shut, trapping the queen. The notion was that seeing the "free" piece would be within its horizon, but that the closing of the trap would be beyond its horizon until it was too late. It actually worked, but it was so contrived that I weakened my position so badly that capturing the queen wasn't enough to win; the chess program was able to exploit my horrible position to immediately gain more material than it had lost. -- DougMerritt

I did much the same within the opening play when playing against an early chess program, albeit set at a low skill level, giving me an easy win. A few days later, I came across one of the authors of the program and mentioned what occurred as a possible fault. However, the pompous prat refused to believe me.


There are similar concepts in the GameOfGo. Patterns in Go (mainly in the opening game) are called Joseki. See also GoPatterns.


EditText of this page (last edited August 10, 2006) or FindPage with title or text search