Category Archives: Games

Chess Engine Update: Endgame Tablebases

In the background, while tons of work stuff has been happening, I’ve been continuing my mission to write a fully-featured computer chess engine in the C programming language.  My engine is named SpaceDog, in honour of my dog Laika, who is from space.

Work on SpaceDog has been proceeding well, with lots of additions to its evaluation function, convenience features like outputting fully-diagrammed logs of each game you play against it, outputting games in PGN format, etc.  Now I’m diving into adding more substantive features, in this case support for Syzygy endgame tablebases.

Endgames have always been a prominent feature of chess study, and over the centuries millions of players have stared uncomprehendingly at difficult endgame studies, mate-in-3 puzzles, and similar things.  For the improving player, endgame study is interesting but also very challenging, in that there are innumerable situations where a seemingly simple or natural move can lead to disaster, or conversely the failure to find a very specific and unintuitive move can lead to a missed win.

Naturally this is just as much of an issue for computer chess engines as it is for humans.  Many engines over the years have been programmed with specific rules for winning typical endgames like KPvsK (King and pawn versus a lone king) and some of the particularly long-winded and tedious ones like KRvsK (King and Rook versus King) or the dreaded KBNvsK (King, Bishop and Knight vs King — you get it now, abbreviations only from now on!).  Some of these endgames require remembering rules particular to each endgame, or even memorising long strings of winning moves in order to not mess up and give your opponent a stalemate.

Before we go any further, a quick reminder of the basic rules of ending a chess game:

  • Checkmate: opponent’s King is in check (attacked) and unable to escape to safety
  • Stalemate: opponent’s King is not in check, but your opponent has no legal moves, (remember it’s illegal to move into check)
  • Draw: declared when players repeat an identical board position 3 times in a row, OR when 50 moves have elapsed without a pawn move or capture taking place

These rules and the complicated nature of some endgames make things difficult for humans to succeed in their endgame play, and chess engines struggle too, even when looking ahead many more moves.  Let’s see, for example, how SpaceDog copes with the tricky KBNvsK ending:

KBNvsK no TBs 2

Here’s a snippet of SpaceDog’s attempt (before my recent additions) to play KBNvsK (the full PDF record is available here).  I actually stopped the engine after 26 moves as it was clearly making no progress!  If you check the full game log out, you’ll see that SpaceDog manoeuvres bravely, but is unable to work out the correct plan to trap the enemy King, even though it was looking ahead 25 moves at this point.  SpaceDog needed to trap the enemy King against the side or corner of the board to make it easier to deliver checkmate, but couldn’t coordinate its pieces correctly, and so the ending barrelled irretrievably toward a draw by the 50-move rule.

It’s worth saying that SpaceDog, even armed with only its core evaluation function and search, is more than capable of winning many endgames.  But even in those cases, it can make the occasional mistake that can allow a clever opponent to salvage a draw or stalemate, or can be simply inefficient and take longer than it should to mate the opponent.  Let’s take this KPPvsKP ending as an example:

KPPvsKP no TBs 2 This endgame looks simple, but the black King is in the way of White’s protected passed pawn on c4, so getting that pawn to promote and become a Queen requires some finesse.  SpaceDog manages this quite well without any additional help, mating the opponent in 24 moves.  However, with clever play it should be possible to checkmate Black quicker and with a greater material advantage.

And that clever play is what endgame tablebases are all about.  Endgame tablebases in chess came about thanks to Richard Bellman, who in 1965 proposed analysing chess endgames using retrograde analysis — starting from checkmate positions, and working backward from there to find the optimal moves to reach that position.  The end result of this would be a massive database containing every possible configuration of pieces on both sides of an endgame with small numbers of pieces, with complete information on how to reach the best possible ending from that position.  In 1977 computer science legend Ken Thompson used the first endgame tablebase in an engine against a human opponent, and from there chess engine programmers were off to the races.

Today thanks to widely available supercomputer power we have access to tablebases that enumerate all the optimal moves for both players from every possible endgame position containing seven or fewer total pieces.  This is a truly staggering number of positions — 423,836,835,667,331 to be exact!  Yes that’s 423 trillion positions.  There are 512 billion KRBNvsKBN endgames alone!  For every single one of these positions, we know: the game-theoretic value of the position (Win, Lose or Draw, or WDL for short); the distance-to-zero (moves before a pawn move or capture that zeroes out the 50-move drawing rule, or DTZ); and the distance-to-mate (number of moves for the winning side to mate, or DTM).  You can explore any and all of these positions and view the winning moves and various stats about endgames at Syzygy-Tables.info; the front page also has handy links for downloading all the tablebases for yourself.

I should note that of course given the size of these databases, the actual files are very large.  The best available compression algorithm for full WDL and DTZ tables is Syzygy, which is what I’ve added to SpaceDog.  The 3, 4 and 5-piece endgames will take about 1GB of storage, but you’ll need 149GB for the 6-piece endgames, and a staggering 18.4TB for the 7-piece endgames!  To use them most efficiently, make sure the WDL tables are on very fast storage like a solid-state drive (SSD), as these are accessed by engines very frequently to guide the engines toward favourable endgame positions, whereas the DTZ tables are only accessed once the engine actually enters an endgame position and needs to know the best moves.

So, after a weekend of work, SpaceDog can now use the Syzygy endgame tablebases, and thus plays endgames perfectly.  This makes it far better for practicing endgame play, for learning difficult endgame and mating sequences, and for analysing games.  To see how dramatic the change is, let’s go back to that KBNvsK endgame from earlier, where SpaceDog stumbled about uselessly for 26 moves heading for a draw, despite having a massive advantage in material.  Once we add Syzygy tablebases, SpaceDog obliterates its opponent in only 7 moves:

KBNvsK TBs 2

Look at that lovely short move listing!  This time, SpaceDog uses all of its pieces in concert, confining the enemy King to the corner by occupying the short f1-h3 diagonal with its bishop.  Shortly afterward, we end up with an effectively and efficiently checkmated opponent:

KBNvsK TBs mate 2

Even when we revisit endgames that SpaceDog can win easily, the Syzygy tablebases provide significant improvements.  Going back to the KPPvsKP endgame from earlier, SpaceDog checkmates five moves faster:

KPPvsKP TBs 2

SpaceDog not only wins faster, but it ends up with two queens instead of just one!  The opponent doesn’t stand a chance:

KPPvsKP TBs mate 2

Of course these are far from the most complicated endgames available.  SpaceDog can now win endgames that take potentially hundreds of moves, without making a single mistake.  The Syzygy tablebases are built with the 50-move rule in mind, so in some longer endgames you’ll see clever trickery as SpaceDog just manages to make or allow a pawn move or capture before the deadline, to reset the clock and deliver checkmate later on.  Take for example this KBBvsKQ endgame, in which SpaceDog achieves mate in 52 moves:

KBBvsKQ TBs

Here SpaceDog methodically manoeuvres the Queen to neutralise both of White’s bishops, until it captures one of those bishops at the last possible moment (the last half-move of move 50):

KBBvsKQ move 50

That gives SpaceDog the time to finally deliver forced checkmate two moves later:

KBBvsKQ mate

As you might imagine, remembering forced sequences of so many moves and using them with such impeccable timing is impossible even for the top Grandmasters — there are simply too many endgame possibilities to make rote memorisation worth the trouble.  Even if it were worth it, remembering sequences like that over the board under time pressure against live opponents would be a very tall order!

During my testing I found a particularly cruel example of this kind of brutal efficiency in this KNNvsKP endgame, where White delivers a tricky checkmate with two knights after 52 moves:

KNNvsKP TBs

Note that the first move, Na2, immediately immobilises Black’s passed pawn, where it stays frozen until move 50, when White lets it run free.  ‘Yay!’ says Black, ‘I’m making a Queen!  I’m back in this!’

KNNvsKP move 50

Black does make a Queen, as it happens, but it’s ultimately pointless as they get checkmated immediately:

KNNvsKP mate

SpaceDog, that’s just harsh!

Anyway, these are just some fun examples from 5-piece endgames — there’s some amazing endgames in the 6- and 7-piece databases of course, with forced checkmate sequences lasting hundreds of moves, totally bizarre-looking moves that turn out to be the only path to win or draw, and intricate piece play that has done wonders for our understanding of endgames.  I highly recommend taking a look at some cool endgames using an engine, or just browsing them via the web interface linked above — you’re bound to find something fascinating.  Assuming you care about chess, obviously.

So what’s next for SpaceDog?  Well first, my Syzygy tablebase support is only half-finished — endgame play is now perfect, but I have yet to implement searching of the WDL tables during midgame play to guide SpaceDog toward the best possible endgame positions.  That’s a relatively straightforward addition and will take much less time than adding the DTZ support, thankfully!

After that, I’m aiming to beef up SpaceDog’s search, making it more efficient to allow searching to greater depths, and making it much faster by using multi-threading (multiple CPU cores).  At that point, SpaceDog will have all the main features of a modern alpha-beta chess engine, and will make a worthy opponent for its eventual successor: SpaceDogNeuro.

You can download the latest SpaceDog executables for Windows and MacOS (Linux forthcoming, when I remember) at the Github repository, by the way, but bear in mind it’s a messy hobby project, and a major work-in-progress with bugs lurking everywhere!  If I were you I’d wait for version 1.0.  In the meantime, for serious chess analysis, Stockfish is the superior choice (and it’s free and open-source too).

Tagged , ,

(Re-)Learning C Via Computer Chess

In recent months I haven’t had much time to do a lot of programming, what with the demands of my work. One thing I’d been meaning to do, whether it factors into my research directly or not, was to re-acquaint myself with the C programming language. I used it way back in the day, but then as time went on I fell in love with Python, which despite being ridiculously slow in comparison, is extremely fun to use. But the fact remains that it’s very useful to be able to write compact, speedy code from time to time, either for writing simulations for work or for passion projects.

So, I decided to find myself just such a passion project to rediscover the joy of programming in C, and given that I’ve been playing and studying a hell of a lot of chess and shogi in my spare time of late, I decided to learn how to program a fast and relatively powerful chess engine in C. A traditional chess engine uses brute force to search a very large number of possible moves on its turn, evaluating each one in turn until it chooses what it thinks is the best move for the situation. Given how much computing power is available these days, even a half-decent smartphone can now play chess at a level greater than any human, including Grandmaster-level professionals.

In order to do this I followed a great series of videos on YouTube called ‘Programming a Chess Engine in C’, which is 95 videos long (!), but covers a ton of stuff, helping you build a fully-functional chess engine in C which uses the standard techniques in chess programming — alpha-beta search with null-move pruning and some other optimisations. The engine is capable of playing a game of chess via text commands with the user, or by communicating with graphical chess software using the UCI or WinBoard/CECP protocols to let you play a game with mouse control and lovely graphics for the pieces.

After watching all that and feeling my way around C again, I’ve now produced a chess engine of my own, which I’ve named SpaceDog, in honour of my dog who is from space.  At the moment it’s basically the same as the VICE engine which comes from the videos above, but has a few small additions in the evaluation function to make it a little stronger (hopefully), as well as a few quality-of-life improvements here and there.  It works great, and plays a mean game of chess already — which perhaps isn’t surprising since it searches and evaluates about 3.5 million chess positions per second!  In comparison a master-level human player might evaluate perhaps 3 or 4 positions per second.

Here’s a screenshot of SpaceDog playing in text mode:

Screen Shot 2018-10-14 at 03.23.34As you can see, it prints out a nice little text-based board for you (white pieces are capital letters, black pieces are lowercase).  Moves are entered in long algebraic notation — so to move white’s queen at the bottom of the board to the square above white’s king, you’d enter d1e2.  SpaceDog also prints out its search results and position evaluations on each move, so here you can see at the bottom that it searched nine moves ahead (depth:9) and spent 2.9 seconds evaluating 11.9 million moves before choosing the move e7e4 (taking my pawn with its queen) based on what it thinks of the resulting position and its future prospects.

Every searched position is evaluated quite simply, with a score calculated on the basis of material balance, the position of the pieces, and things like whether there are isolated pawns and other key features.  Right now I’m adding some additional evaluation terms that better capture how the relative value of certain pieces, and their ideal placement on the board, changes as you proceed from the opening to the endgame.  Hopefully this will make SpaceDog a bit more shrewd at finding checkmate!

The engine can also use opening books — these are files generated by processing millions of opening moves from many hundreds of thousands of professional chess games, choosing a repertoire of openings based on what moves proved to be most successful.  This means SpaceDog essentially has a huge file of opening moves already catalogued in the book, with an enormous selection of replies and counter-replies for all the best possible responses from the opponent.  These moves then don’t need to be searched, meaning that SpaceDog saves tons of time for searching much deeper in difficult middlegame and endgame positions.

At this point SpaceDog probably plays well enough to beat anyone I know, but would likely still lose to players above Master level.  That would probably change at fast time controls — i.e., quick game setups like blitz (5 or 10 minute time limit for each player) or bullet (1 minute each!).  At these time controls, humans simply can’t make much use out of our superior long-term strategic planning abilities, so even SpaceDog’s rudimentary but tactically sound play should be tough to beat when us human meat-bags are sweating over the clock and feeling the pressure.

Anyway, it’s been a lot of fun so I plan to keep it going!  Next steps are to continue to enhance the evaluation function to better account for things like keeping the king safe and setting up outposts for bishops and knights.  I’ll also work on some more technical enhancements like multi-PV search (searching multiple lines of play on multiple CPU cores simultaneously) and adding support for endgame tablebases to allow SpaceDog to achieve perfect endgame play.

Most importantly though, I want to add a mode so SpaceDog can play Crazyhouse and Chessgi, variants of chess in which captured pieces become yours and can be dropped back onto the board as part of your army.  This is a feature taken directly from shogi which is a game I also love, so I’m looking forward to implementing these.  Eventually I may try to build on that foundation and add a shogi mode as well.

‘What’s the point of all this?’ you’re probably asking at this point — after all, SpaceDog will never be as good as current strongest engine Stockfish, and plenty of other engines play Crazyhouse and lots of other variants besides (such as this version of the mighty Stockfish).  There are even innovative neural-network-based engines coming out now like LCZero that are challenging for the throne of toughest computer opponent.  But nevertheless writing SpaceDog has been satisfying and fun, and it’s given me another way to learn more about chess and enjoy the game from a different angle.  I’d also forgotten how satisfying coding in C can be — the final SpaceDog program takes up only 74KB (!), yet it effortlessly plays chess better than I can.

Anyway, I thought I’d post this up just on the off chance anyone else might get something out of learning a bit about chess programming.  I highly recommend the tutorial videos I linked above from Bluefever Software — they’re really easy to follow and provide excellent explanations of the key concepts you’ll need to know to write a chess engine.

Someday I’ll post up the code for SpaceDog too, once I add a few more additional features in!

Tagged , , ,

The Game of Go

I’ve been off work for a couple of weeks now, and rather than going on holiday I’ve mainly been trying to rest up after several months of really intense work.  As part of my attempted recuperation I’ve been playing a lot of the board game Go, a game I have a tremendous fondness for but go through long periods of slacking off when my brain is busy with work stuff.  I’ve been enjoying the opportunity to play more and thought that some of my friends and colleagues might enjoy the game too, so I decided to put together an intro to the game, alongside copious links to resources and ways to play online.  I hope this might spur some of you out there to give it a try.

Go is a board game that’s been around for a very long time, and is generally believed to be the oldest board game still being played today; Go was invented about 3000 years ago in ancient China.  The game is still immensely popular in Japan, China (where it is known as weiqi), and Korea (baduk), where professional play is well-established, and it boasts a  growing following in America and Europe as well.

I’ll start by giving you a very brief summary of the rules of the game, then link you to some resources that will help you get started.

Playing Go

Go is known as a game of great complexity and subtlety, but the actual rules are simple.  There are two players, White and Black, and each has 180 stones of the appropriate colour.  Black always goes first, which confers a slight advantage, so in compensation White receives a bonus (komi) of 6.5 points at the end of the game (under Japanese rules, it’s 7.5 under Chinese rules).

The players start with an empty board of 19×19 squares, like so:

empty go board

Notice that the board has nine marked star points which help players to orient themselves in this large playing space.

The players take it in turns to place a stone on an unoccupied point on the board.  Once placed, a stone never moves, although it can be removed when captured.  Stones are captured if all of the empty points surrounding them (their liberties) are occupied by stones of the opposing colour.  This GIF shows an interesting example, where Black keeps capturing White stones only to eventually have his entire group captured himself by cutting off his own stones’ liberties:

go capturing gif

Over time as stones are placed and some groups are captured or fortified, the players will sketch out and secure territory where their opponent cannot play without being captured.  At the end of the game, both players total up the amount of territory surrounded by their stones, add in the number of stones they’ve captured from their opponent, and compare the totals (plus the 6.5 points komi for White) — the player with the highest total of territory and prisoners wins the game.

Below is an animated gif showing an example of play: a complete record of the famous ‘Game of the Century’ between Go Seigen (Black) and Honinbo Shusai (White).  In this match players could adjourn to think at any time, so this game dragged on for three months!  White won by two points in the end and the game is celebrated for some brilliant moves and fierce fighting over territory.

seigen shusai gotc

You can download a huge archive of 48,000 historic Go games in SGF format here, or if you want to view records of professional games in a handy web applet you can check out GoKifu.com.

The Style of Play

From the simple rules of Go, very complex patterns of play emerge.  Unlike other prominent competitive board games like chess, in Go the board starts empty, and the number of available points to play a piece is very large (361 points on a Go board vs 64 squares on a chess board).  The sheer number of possible moves is so huge that players must rely on intuition, a solid grasp of fundamental principles of play, and keen awareness of their opponent’s movements to play well.

This reliance on intuition makes Go a surprisingly emotional game — pick up any book by a serious professional and you’ll see them speak with great passion about how various moves and games made them feel.  This in turn leads to some seriously intense contests — watch professional matches and you’ll see the players’ faces often contort with pain as they confront a powerful move by their opponent.

As a result of the complexity of the game, you’ll see Go players start their play in the corners and edges of the board — this is because it’s easier to make territory on the sides and corners, since you can use the edges as boundaries for your territory.  As the sides and corners are decided, players begin reaching toward the centre of the board, attempting to connect their strongest groups of stones together and grasp larger chunks of territory.

The beginning of a Go game is often overwhelming for new players, who struggle to figure out where to start placing stones on this massive empty board.  Generally the Black player will start play on the upper-right star point, which is considered polite to your opponent — it’s close to their end of the board and gives them a clear idea of where to start play.  This helps somewhat, but the opening is still the toughest part of the game for newcomers.

As a result, most experienced players recommend that new players start on a smaller board, either 9×9 or 13×13.  These are less intimidating to start with and get you into territory fights right away, giving you an immediate introduction to the moment-to-moment tactics of Go.  Just bear in mind that you should try to advance to the full 19×19 board as soon as you can, as it’s a very different game at that scale.  On the full board strategy becomes as important as tactics, and stones in distant corners have powerful implications elsewhere as patterns of territory shift and evolve over large swathes of the board.

Learning the Game

Learning Go is a long process, as the game requires an understanding of a lot of complex interactions between stones.  There’s also a bit of a language barrier, as many Go terms derive from Japanese and are difficult to translate, so most players just use the Japanese words.  As a result you’ll need to understand things like what it means when stones are in atari (stones that will be captured on the next move unless you do something to save them), or in seki (opposing groups of stones that can’t capture one another without endangering themselves).

Luckily there are some great introductory books I can recommend that will give you copious examples of these terms and many helpful and illustrative Go problems (tsumego) to test your skills.

For complete newbies I highly recommend Go: A Complete Introduction to the Game by Cho Chikun.  Cho Chikun is one of the greatest players alive today, being the only player in history to hold all four main Japanese titles at the same time.  His book is surprisingly short but very dense with helpful illustrations of key go concepts, and it rewards deep study and playing out the examples on a real or computerised board to experience each pattern for yourself.

From here you can check out the Elementary Go Series from Kiseido Publishing.  This series covers key concepts of the game in detail in each volume.  Many players recommend these books for players seeking to advance to intermediate levels of play.

When you’ve fully digested all this, you can try Lessons in the Fundamentals of Go by Toshiro Kageyama.  This book is thicker than the others and quite dense with content — expect getting through this to take weeks, not days.  But the concepts he explores are critical to good high-level play, and if you master them you’ll be well on your way to a thorough understanding of the game.

For online resources, I recommend studying the games of great masters, which you can easily find via the archives linked above and at places like GoKifu.com.  The LifeIn19x19 forum is a great place to get tips from other Western players, with many members happy to give guidance on your development as a player.  Finding good software is also key to learning the game, as this will be how you view and study the games of great players, or analyse your own games to examine your own strengths and weaknesses.

 

Go Software

This section will be relatively short, because in my view there’s really just one piece of software you really need to study Go, and that’s Sabaki.  Sabaki is free, open-source, and works perfectly on Windows, Mac and Linux.  It also nicely captures the austere aesthetics of the game, showing you a lovely 19×19 wooden board sat on a tatami mat and simple black and wide stones.  You can customise the look with themes as well, if you like.

A subtle touch that I really appreciate is that each stone is placed with a slight random touch, rather than precisely on the relevant point on the board, giving the whole thing a slightly more organic look as the game evolves.

Looks aside, Sabaki is a great piece of Go software, allowing you to view SGF files (the move-by-move records of Go games, as in the archives linked above), edit your own, and play against any AI Go engine that supports the GTP protocol (basically all of them).  In particular I recommend using Tencent’s PhoenixGo engine, which is very strong and comes with instructions on how to link it with Sabaki on Windows and Mac.

Here’s a screenshot, stolen from Sabaki’s GitHub page:

Sabaki screenshot

If you’re a more advanced user and want sophisticated analysis of your games from a strong AI, you can use Lizzie, which uses the Leela Zero engine to analyse your moves and show you what the engine recommends in each situation.  Download the latest version from the Releases page at the link, then follow the instructions in the Readme file to get started.  The results can be helpful, but bear in mind Leela Zero can only show us what she thinks, not explain why she thinks it, so still it’s better in my opinion to get input from human players and learn Go fundamentals rather than just ape the moves the computer engines recommend.

Here’s an example of Lizzie’s output, showing the user its recommended moves (the cyan-coloured one is Leela’s top recommendation):

lizzie screenshot

 

Go Equipment

Go equipment, much like the game itself, is steeped in centuries of history and tradition.  Japanese aesthetics in particular have had a profound influence on Go equipment.  Today most high-level players or keen amateurs in search of fine equipment will go to Japan to get it.

go set1

The finest Go boards are made from the Japanese Kaya tree, and makers prefer that the tree is between 700-1000 years old when the wood is harvested.  This combined with the fact that Kaya trees are protected in Japan means that true Kaya boards can be ludicrously expensive; free-standing boards with legs can rise well into the tens of thousands of pounds.  Normal people go for so-called ‘Shin Kaya’ boards, usually made of Alaskan spruce, which looks close enough to the right colour and feel for most people and can be had for £100 or so for a tabletop board of 3cm thickness.

go stones 2

The finest Go stones, meanwhile, come from a place called Hyuga in Miyazaki Prefecture in Japan.  The black stones are made of nachiguro slate stone, while the white stones are meticulously carved from clamshells, resulting in a beautiful shining surface striped with subtle lines.  The finer the stone, the thicker it is and the denser and thinner the lines are.  As with the Kaya boards, genuine Hyuga stones are incredibly rare and have price tags far beyond most mortals.  However, these days you can get clamshell and slate stones made from imported Mexican clams that are nearly as perfect as the real thing, and a good set of decent thickness will set you back about £200-300 rather than tens of thousands.

go bowls1

Finally you have the Go bowls, which hold each player’s stones.  Traditionally you place the bowls next to the board with the lid upside-down in front of it, and place any captured pieces in the upturned lid.  This is polite to your opponent, who needs to know how many pieces you’ve captured as that affects the game’s final score.  Go bowls again can cost ridiculous amounts for traditional Japanese wooden articles, but beautiful and functional bowls hand-carved from cherry and other woods needn’t set you back more than £150 or so.

The overall effect of a fine Go set should be a beautiful, smooth board with a soft yellow tone that perfectly compliments the black and white stones.  When you place a stone on the board, it should make a satisfying ‘click’ against the wood — in particular on the free-standing boards, which have a chunk hollowed out of the interior to ensure it makes a pleasing sound.

In total, if you purchase a nice table Go set from a prized Japanese maker like Kuroki Goishi-ten, expect to pay about £300-400 for the lot (plus shipping/Customs fees of course).  This is assuming a 3cm or 6cm Shin Kaya board, ‘Blue Label’ Mexican clamshell stones, and mid-level bowls of sakura wood or similar.  Various distributors do sell some of their products in Europe — check Masters of Games in the UK, or Go-Spiele.de in Germany.  Both stores also offer budget sets with Korean glass stones that are more than fine for most people; a set with a nice Shin Kaya board, Korean glass stones and Go bowls made with European wood should cost no more than about £200.

One of my great regrets from my time in Japan is that despite my intense desire for one, I never purchased a fine Go set for myself.  They really are lovely.  As a consequence of not taking that leap, I have this masochistic ritual of checking Kuroki Goishi-ten’s sales every summer, finding myself unable to justify the ~£100 in shipping costs on top of the cost of the set, and end up torturing myself over it for weeks.  Someday I’ll take the plunge; in the meantime I do hope to get a Shin Kaya/glass stones set someday soon, and then eventually upgrade to proper clamshell stones.

Go vs Chess

For those of us in the West, the average person’s familiarity with abstract strategic board games often starts and ends with chess — even people who don’t play have probably heard of Garry Kasparov and Bobby Fischer.  Both chess and go are intellectually challenging and stimulating, but they differ in quite fundamental ways.  I’ll say up front that I enjoy both, and feel each one offers something the other doesn’t.

As described above, Go is simpler than chess as far as the rules go — stones are simply placed and never moved, and complex interactions between pieces arise from their configurations, not from the rules themselves.  Meanwhile, in chess each piece moves, different types of pieces move differently, and the goal of the game is to trap the opposing king, which again depends on intimate knowledge of the roles and movements of the different major and minor pieces.

For the chess player, Go can initially seem a bit incomprehensible.  Chess openings have been so thoroughly explored by humans and computers that many experienced players play the first 10-15 moves essentially from memory (depending on their choice of opening), while in Go this vast empty board makes the opening phase really perplexing.  Note that Go players also have opening patterns they study called joseki, but these aren’t overly necessary except at high levels of play, and in fact many pros discourage new players from studying them until they’re quite advanced in their play.

The smaller boards and armies of chess mean the game also turns much more on tactics than Go.  Chess does have lots of strategy to it of course, but on the whole it’s more likely that a single move can change the course of a chess game than a single move massively changes a Go game on that huge 19×19 board.  So, if you’re more interested in intricate tactics and moment-to-moment attacking play, chess may be more your game; whereas if you’re interested in sweeping strategic movements and more intuitionist play styles, Go may be for you.

Honestly though, I’d say just play both — each game is rewarding in its own way, and I suspect a strong tactical chess background will serve you well in Go, just as strong strategic instincts in Go should surely help your chess game.  I also recommend trying chess’ East Asian cousins Shogi, Xiangqi and Janggi.  Shogi (Japanese chess) allows captured pieces to re-enter the game on the capturing player’s side which creates an interesting dynamic feel.  Xiangqi (Chinese chess) has unique pieces and a larger board with territorial restrictions; Janggi (Korean chess) is very close to Xiangqi but with some rules differences that make it a very interesting variant.  In fact I may post about these games someday down the line, as all are very accessible now with free apps for online play, and both Shogi and Xiangqi have some excellent English-language resources available (less so Janggi).

Playing Go Online

Speaking of online play, Go is likewise more accessible than ever thanks to the efforts of an extremely dedicated global community of players.

There are a number of great free services that enable online play against opponents all over the world, 24/7/365.  A few of them specialise in real-time games, in which you and your opponent finish the game in one sitting, while others focus on correspondence games, where you take your time with each move and update the game on the server when you’ve chosen your move, and games take place at a leisurely pace over weeks or even months.

All of these services are free, by the way, though some offer subscriptions with extra benefits.

Real-Time Servers

IGS (The Internet Go Server) — By far the oldest of the bunch, the IGS has been around since 1992 (!).  It started in Japan and still has the largest Japanese player community; many professionals play here.  A nice software client, CGoban2, is available for all major operating systems, and there’s a good app as well for Android and iOS.

KGS — Popular with Westerners, KGS is well-known for being a chatty server where more experienced players will offer learning games for newbies and analyse your games to help you improve.  Has lost popularity somewhat in recent years and the Android app is apparently a bit unreliable, however.  I’ve heard some players recently recommending people shift to other servers, as they have difficulty finding good opponents here nowadays.

TygemBaduk — A Korean server but has an English-language website and client.  Quite popular and apparently a good place to face strong opposition, though the client only works on Windows and iPad so be aware of that.  The web client will work on any platform, though.

WBaduk — A very large Korean server, immensely popular.  Another great place to face strong opposition, but they’ve also got problems with accessibility — just a few days ago the English client disappeared off the Google Play Store (!).  Worth joining once you’re ready for strong opponents, but perhaps worth keeping on eye on things to see whether some changes to the service might be forthcoming.

Fox Weiqi — An absolutely massive Chinese server that’s becoming increasingly popular among Westerners due to having an English-language client and a polished Android app.  Do note however that you have to sideload the app onto your Android phone, presumably due to China not really being a fan of Google services.  Also the app is in Chinese only as far as I can tell.  I’m installing the app as I write this so we’ll see if I can manage to find what buttons to mash to play a game with someone!

Correspondence Servers

Online Go (OGS) — A fabulous place to play correspondence Go.  Uses a constantly-updated, modern web interface with responsive design — meaning it works perfectly and looks great regardless of whether you use it on desktop, laptop, phone or tablet.  At any given time there are tens of thousands of correspondence games going.  Real-time play is also supported, but most players do opt for correspondence games.

Dragon Go Server — A bit old-school design-wise, but has been around a long time.  I’ve never personally played here but my impression is the userbase is pretty loyal.  The web interface works fine for what it is, but definitely miles behind OGS.  For playing on Android you can use a free plugin for the Go app BW-Go.

 

Go Apps

AQGo — An Android app that lets you play against the super-strong neural-net go bot LeelaZero, which is a community attempt to replicate Google’s super-powerful AlphaZero go bot.  Needs to be sideloaded onto your phone.

Crazy Stone Deep Learning — A beautifully polished Go app that lets you play against a strong neural network opponent.  The Pro version is a bit pricey as apps go (£12.99), but it’s been worth it for me to have an ever-present strong opponent that will analyse my games in-depth.  Also available on Steam for a much higher price but also has a stronger rating (7-dan).

GridMaster Pro — A cheap, no-frills Go app that lets you play against a variety of Go engines, including Leela Zero.  A slight caveat here in that in my experience, sometimes Leela Zero will refuse to make a move until I forcibly shut and reopen the app, but your mileage may vary.  Leela and other engines can be downloaded directly through the app and installed instantly — check the app’s website for details.

TsumeGo Pro — An app for tsumego problems, Go puzzles that test your knowledge of key Go concepts.  Extremely useful for polishing your skills and furthering your understanding of the complexities of keeping groups of stones alive — or killing your opponents groups!  In-app purchases get you more problems to solve.

Pandanet IGS — The app for the Internet Go Server above.  Free and works really well in my experience.

 

Well, that’s quite enough for one day — I hope this info might prove useful to someone out there who’s curious about Go.  It’s a wonderful game and more accessible than ever, so if you’re interested in giving it a try, just pick your choice of app and get in there!

Tagged , , ,