index

Article posted on: 2021-02-22 08:54
Last edited on: 2021-11-16 23:13
Written by: Sylvain Gauthier

Some random thoughts on the game of Go / WeiQi

Go is a fascinating board game. It has been around for more than 4000 years since its invention in ancient China, yet we are still light years away from grasping its complexity, and it has only been five years at the time of this article that computers got a bit further than us in mastering it.

But what is really striking with Go, is its abstract nature. The strategic thinking it requires can map on all sort of problems and, in fact, the more you play Go, the more you look at life itself in terms of Go.

In this article, I will try to give my perspective on this awesome game and how it relates to a lot of problem-solving tasks I encounter.

A brief explanation of the game

Go was created in ancient China about 4000 years ago, by the Chinese aristocracy to train the emperors and other leaders in high level strategic thinking and concentration.

The original Chinese name is 圍棋 (wéiqí) which literally means “encircle stone”. It was introduced to Japan, like most of Chinese culture, during the Tang dynasty, and got its Japanese name of “Igo”, shortened to Go. It was introduced to the West by Japan, hence why we usually use the Japanese name.

The essence of this game lies in the simplicity of its rules. One player has black stones, the other has white stones. They successively lay the stone, one after the other, on a board, at the intersections of a 19 by 19 grid (although the size may vary, 9 by 9 is also very common, and you can also play 13 by 13). Stones of a same color that are directly adjacent to each other (not diagonally) form a group. The empty spaces adjacent to a group are called “liberties”. Once a group’s liberties are reduced to 0 (by being encircled by the opposing color), the group is captured and removed from the board.

I want to draw attention on the almost outrageous simplicity of those rules. They can fit in a small paragraph, they introduce very little concepts. There is a board, black stones, white stones, groups, liberties and that’s it. It’s almost like if someone designed the minimal viable board game on purpose.

An insane complexity emerges from those tiny rules, a complexity that had thousands of people trying to figure out this game for thousands of years, thousands of books written, that captivated (and still does) millions of people, a complexity that only got defeated by the most powerful computers a few years ago using state of the art machine learning and neural networks.

No other board game can hold a comparison. Chess for example, introduces a lot more rules, six different pieces, as many ways of moving, rules, exceptions, edge cases. A lot of rules for a game that’s not remotely as strategically expressive as Go. It’s worth noting, for example, that when you put two of the best chess players against each other and give them unlimited time, they will almost always end up in a draw. Chess was also mastered by computers a long time ago since the (relatively to Go) small search space allowed for simple heuristic algorithms to perform vastly better than humans. It seems to me that chess requires mostly to be able to read in depth, and give little room to intuition and high level, abstract strategic thinking.

Go, with its enormous search space, requires such high-level, intuitive thinking that it can effectively be considered as an aesthetic art.

The rule variants and why some are better than others

The apparent simplicity of the rules to play the game comes at a cost. While playing is easy, determining the winner is a bit more complex and there are different rules as to how to do it.

The most widely used way of scoring is the Japanese (and Korean) way, and that’s the one that was introduced to the West.

The Japanese rules introduce a new concept of territory which is defined as “an empty area surrounded by stones of the same color”. Basically, at the end of the game (that is, when both players agree that nothing else needs to be played), you count the empty points surrounded by each color, you add the number of captured stones and that will be the score for each player. This is called territory scoring.

The Chinese scoring system, on the other hand, is a lot simpler. At the end of the game, both players fill out all of their territory, then the white stones are counted. If they exceed half of the max number of stones on the board (361 for a 19 by 19 board), white wins, otherwise black does. This is called area scoring.

Allow me, from the comfortable ignorance of my 20-ish kyu, to state that Japanese rules suck and that Chinese rules should prevail.

Japanese rules introduce an additional, very problematic and loosely-defined concept of territory. At the end of the game, players have to agree on what is their territory and if they don’t, the process to determine the winner is painful and requires an arbiter. There is also the problem of seki, a special configuration where empty spaces are left that are neither black nor white territory. Finally, players have to keep count of captured stones as they are added to the final score. Hence, there is now a state external to the board. Another annoyance that’s quite counter-intuitive is that you loose points for playing inside your own territory, since only empty points are counted.

Chinese rules are a lot more elegant. First, in case of conflict when determining the territory, players can simply resume playing until the conflict is solved. The seki case becomes irrelevant since you just count the stones, and the captured stones are irrelevant as well and can just be put back into the opponent’s basket since, again, only the stones on the board at the end are counted. Last but not least, you only need to count one color, since all available spaces should be filled at the end.

Allow me to go further down the rabbit hole, and make a classic, almost ubiquitous statement that sadly applies to almost everything in existence: it used to be better.

The traditional Chinese rules, alas not in use anymore, are literally the best from the standpoint of simplicity and purity. If Go is the C of board games, the traditional Chinese rules would be the --std=c89 --pedantic cherry-on-the-cake.

While in the modern Chinese rules, you fill all available spaces, in the traditional variant, you would leave two “holes” (called eyes) in each separate group to ensure it cannot be captured. Hence, the end-game state used for scoring is literally the state at which you would end up into would you keep playing until the last available moves are suicide moves.

Now tell me that’s not the purest, most elegant way. You just play until no moves are left, and you just count the stones. Period. No arbiter, no weird seki rules, no additional, bloated concept, no separate process to count. You play and when you’re done, you count. It does mean, however, that you get a 2 point penalty for each separate group but why not. It keeps the player base small and elitist.

Ironically, those variants almost always give the same winner except in very rare cases.

Now, I firmly believe that the Japanese clumsy mess of rules is yet another example of their “aesthetic over efficiency” cultural preference and to some extent, why not. “It’s just a game”, after all.

Go and programming

The “simple-rules-leading-to-enormous-expressiveness” paradigm is something that pops up everywhere, from mathematical theorems (a more powerful theorem is one with fewer assumptions), to philosophy with Occam’s razor, and, of course, programming.

Stripping tools and programs down to their essence is a primary principle of the UNIX philosophy and, as such, is very related to the core idea of Go.

UNIX strives on very few abstractions, which create an immense design space and freedom to assemble components together, just like Go, with its simple rules, allows endless strategies and tactics.

In fact, this similarity is so striking that it did not go unnoticed at Bell Labs. Ken Thompson, one of the creator of UNIX, created later while working at G**gle, a programming language with “simplicity and few concepts” as the main design principle. He named this language, you guessed it, Go.

First, thank you Ken, now I have to explicitly type “Game of Go” whenever I’m talking about it since people will mistake it for your stupid language. And second, let me tell you, if Go (the fucking game) was a programming language, IT WOULD NOT HAVE A FUCKING GARBAGE COLLECTOR. So cheers for taking away a good name for a minimal and pure programming language, and sticking it on a garbage collecting, memory abstracting, stop-the-world GC nonsense. Appreciate it.

Anyways, as said above, the only programming language that comes close to the elegance of Go (the fucking game) is C. Few abstractions, few concepts, few rules, maximum expressiveness. Go is the minimal viable board game in the same way that C is the minimum viable programming language.

When coding a program, you have to have a high level goal, refine it into different design choices, think about the implementation and how to express it down to the low level rules of your programming language. Once you start playing Go, you will see that those steps, in the end, are very abstract and the thought process is actually not so different in both activities. It’s all about intuition to come up with the best high level design, down to a more mechanical implementation, keeping the big picture in mind when elaborating local strategies.

Go was designed by the Chinese aristocracy to improve the problem solving capability and strategic thinking of their elites. Does it work? Does it really relate to actual, real world problems? I believe so.

Go and politics

I am no expert in world politics. But as all slightly educated, know-it-all millenials, I have my theories on how the world works. And when it comes to relations between China and the West, my theory goes like this.

China plays Go while the West plays Chess. And I mean it metaphorically, in terms of geopolitics.

EDIT a few months after writing this article: I discovered that I am not the first one to come up with this theory, Henry Kissinger already had.

Let’s think about it.

Go is a game where, if you want to win against an equal opponent, you have to constantly trade at a slight benefit for you, while letting your opponent think that he’s getting the upper hand. You want to take this corner? Fine by me if you let me extend a bit more toward the center. Don’t worry it’ll turn out just fine for you ;). I will let this group die if you let me invade this corner tee-hee. And so on. It requires, as said before, long term thinking, an aversion for open conflict, and shamelessly taking everything your opponent gives you for free.

Chess on the other hand, is really based on militaristic dominance. Imma take your big piece here and you can’t do anything about it haha. Chess is highly positional, based on a mechanical, short-term approach in order to gain a perceived advantage.

Does any of this sound familiar? It probably should.

China has a long history of trading with its neighbors while avoiding at all cost open conflict, even if that means building the longest wall in human history. And today in particular, it’s very obvious that China jumps into all the power vacuums left by decolonization and other diplomatic failures of the West. This video for example, explains very well how Trump’s focus on national economy, for better or for worse, gave China an opportunity to extend its influence in much of the developing world.

The debt trap for example, is a good example of a deal that seems good for both parties at first, but really only favors China. All the outsourcing of western industry to China, free stuff that China took without saying thanks. Same for all the real estate sales to China’s nouveaux riches.

China spent much of the second half of the 20th century consolidating its base, playing solidly on the defensive, and is now in the second half of its strategy, essentially expanding its influence and trying to establish smaller connected bases around herself. This is a typical Go strategy.

The West, on the other hand, is still stuck in an outdated mental framework that prevailed during the XIXth century. Sure, the English and the French led a vic(tor)ious military campaign against China. Good jobs guys. Now, barely a century later, can we really say it was of any benefit to us? That was an obvious failure to plan on the long term. China hasn’t forgotten its century of humiliation and thanks to this outstanding military performance, now it’s coming for us.

A quick glance at Western political commentators on Youtube will reveal a very militaristic mentality. People who fear China’s influence will advocate for an open conflict with it, stating “facts” about Chinese army, reciting the location of all known military outposts, the number of aircraft carriers, and so on and so forth. Real world look like a game of Risk to those people. A conception of an alternate reality where, somehow, the world’s economy is not the ultra complex, interconnected mess that it is today, but where all countries magically resume making their own electronics, ammunition, drugs and medical supplies that are required to lead a prolonged open conflict.

A chess mentality, if you want. Westerners are focused entirely on capturing China’s big pieces, but they are entirely missing the bigger picture that is, China is slowly but surely surrounding them and taking away their liberties, one after the other.

In the game of Go, it is said that the winner is the one who correctly figured out the game’s flow and structure. It seems that the West didn’t even figure out what kind of game it’s playing against China.

Conclusion

Go is as fantastic as it is intriguing. Its high level abstractions can relate to so many things that it makes it a very useful tool to understand the world around us.

Go players usually say “Go is like life itself”, and nothing in my opinion is closer to the truth.