Chess Software for Linux

September 1st, 1998 by Jason Kroll in

Once there was a time when chess software for the home was slow, weak and expensive. To find human opponents, you had to go to your local chess club. Today, the situations is different.
Your rating: None Average: 4.6 (5 votes)

Linux offers a host of chess software that provides master strength computer opponents and analysis, and even an interface for playing against people all over the world via the Internet.

The strongest chess programs readily available for Linux (to my knowledge) are Crafty, Phalanx, and GNU Chess. Crafty is the strongest, though Phalanx and GNU Chess play at master strength (with fast hardware). Crafty is available via anonymous ftp from ftp.cis.uab.edu/pub/hyatt/ while Phalanx is available from the standard sunsite (sunsite.unc.edu/pub/Linux/games/strategy/) and GNU Chess can be downloaded from any GNU archive (prep.ai.mit.edu/pub/gnu/). The chess interface of choice (compatible with all three) is known as xboard, though a pretty 3D interface known as GLChess is available (the home page is http://nether.tky.hut.fi/glchess). The most recent version of xboard should also be available from any GNU archive, though an older release probably came with your Linux distribution along with GNU Chess.

Crafty

Crafty is the “long-time hobby” of Bob Hyatt, whose previous works include Blitz and Cray Blitz. Crafty is a very strong program and is constantly being enhanced. Though you could just download the Linux binary and use it as is, opening books and endgame databases are available from the ftp site, and add much to the playability and strength of the program. You have a choice between 1 MB (small), 30 MB (medium) and 74MB (large) opening books (or, if you like, the monstrous wall.gz which expands to 222 MB). For a basic installation, download the files crafty-14.13.linux, small.zip, start.zip, crafty.doc, crafty.faq and read.me, or the latest source if you want to compile it yourself. Give Crafty its own directory (to store the book, game, position and log files), move the Crafty files there and unzip them. Execute Crafty (if you get a permission denied error, try using chmod on crafty-14.13.linux).

To create the opening book (book.bin) from the file small.txt to a depth of 60 ply (30 moves), type:

book create small.txt 60

The file books.bin should also be created in order to tell Crafty which openings it should (and shouldn't) play. The file start.pgn contains the necessary data. Just type:

books create start.pgn 60
After this brief “installation”, you should have a small, master strength chess program on your Linux box.

Performance can be maximized by allocating more memory to the hash and pawn hash tables. I have a 64 MB machine, so I set the options hash=24M and hashp=10M. Crafty configurations can be specified on startup; this means that you can include Crafty's startup commands in the resource file of your window manager for easier Crafty startup in X Windows.

Crafty can be run through xboard, with the Crafty-exclusive benefit of a splendid analysis mode (compatible with more recent versions of xboard) that allows you to move the pieces for both sides while Crafty rattles off analysis several moves deep (you can use analysis mode without xboard, but it's not as much fun). In order to start up Crafty through xboard, type:

xboard -fcp 'crafty xboard'

or you can specify more options such as:

xboard -fcp 'crafty xboard hash=12M hashp=5M'

Phalanx

Even though Phalanx, by Dusan Dobes, is the youngest of the three chess programs (it began in '97) it has managed to become quite imposing; in fact, it is not much weaker than some modern commercial chess software. Phalanx is also fun to play and good for variety, since Crafty, GNU Chess, and Phalanx all have different personalities. Phalanx should compile easily without any errors, and is then immediately functional. It has a small, default opening book, but creating your own from a PGN (pretty good notation) file is easy; instructions are contained in the README file. Phalanx can be used through xboard by typing:

xboard -fcp phalanx
GNU Chess

GNU Chess is the classic chess program which has been around for ages on a number of platforms. It is also rather strong and quite fun to play. GNU Chess came with my Slackware and Red Hat installations, and I imagine it comes on other Linux distributions as well, so you may already have it on your machine. It is very fun for blitz chess, especially since with its default opening book it is prone to making original moves which may or may not be very good (this doesn't matter since it wins anyway). GNU Chess can be played in a console or under the X Window System through an interface. When xboard is executed, by default it loads up GNU Chess and prepares for blitz games of 5 minutes per side. You can, as usual, specify startup options; the xboard man page contains the details.

Chess on the Internet

xboard can also be used to play chess via the Internet, which is an excellent way to find fun opponents of all skill levels.

In order to use xboard to play on an Internet chess server, first set up a SLIP/PPP connection, and then to get to the main free U.S. server, type:

xboard -ics -icshost freechess.org

This will connect you to the Free Internet Chess Server (FICS) through port 5000 and open an xboard display so that you are ready to both observe and play games. You will first need to log in, of course, and for this you should choose a handle to use as a guest until you think of one especially clever. To get a list of the games in progress, type:

games
Then to test the interface, try typing:
obs 6
to observe game 6 (assuming it exists). Your interface should work and you should see some pieces moving hither and thither; type “unobserve” when you've seen enough. The commands are quite simple, and the online documentation is thorough, but if you need help getting started you can ask other players in channel 1. A great many chess servers exist throughout the world, including Grandmaster Dzindzichashvili's chess.net, the (commercial) Internet Chess Club chessclub.com, and the main European free server eics.daimi.aau.dk; I imagine any of these would be happy to have new players.

Conclusion

Those of us who were made to suffer at the hands of Sargon in the days of the Commodore 64, tormented by the malicious characters of BattleChess, or politely dismantled by Chessmaster, now have the pleasure of choosing a variety of master strength programs to defeat us on our modern machines (the struggle to prove a consistent match to the ever-improving Crafty is being made into a movie, apparently to be called Searching for Holes in Crafty's Opening Book). However, today's computers also provide the frustrated chess player with relief that computers did not offer when the Commodore 64 was king: Internet chess, featuring human players, complete with mistakes and oversights that computers don't make anymore.

Jason Kroll is a student of economics at the University of Washington. He likes music, computers, and chess, and thinks that Linux is the best thing to happen to computers since monitors (or at least since the Amiga). He can be reached via e-mail at hyena@u.washington.edu.

__________________________


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anonymous's picture

There seems to be no

On September 21st, 2008 Anonymous (not verified) says:

There seems to be no reasonable gui for chess in linux. Only xboard supports analysis. None other!!

Stevenaaus's picture

Linux Chess Gui

On September 30th, 2008 Stevenaaus (not verified) says:

I just discovered Scid http://scid.sourceforge.net/. It is mainly a database program, but with many strong engines that can be played against too.

It has bugs, but i'm fixing up the "Play" menu item to work flawlessly. CVS has the latest fixes.

Anonymous's picture

Clients

On January 7th, 2008 Anonymous (not verified) says:

I always use PyChess for playing offline, online or analyzing.
It has support for all the engines, and it even has its own, which isn't so hard to beat though.

Roberto Perez-Franco's picture

Any idea of ELO strenght?

On August 3rd, 2006 Roberto Perez-Franco (not verified) says:

Hi there! Thanks for the article. Is there any estimate of the strength (say, in ELO) of these chess softwares, for a given hardware?

Anonymous's picture

Re: Chess Software for Linux

On March 17th, 2003 Anonymous says:

Very nice article.

Just one mistake that can be corrected(pgn = portable game notation) and not pretty good notation :). Or maybe the author was being funny.

In any case, this article is good, there is also 1 more strong program called ruffian, but not sure if linux ruffian is available.

Anonymous's picture

Ruffian Linux

On September 19th, 2007 Anonymous (not verified) says:

Ruffian linux is a commercial product carried by Lokasoft.

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Featured Videos

Setting up an https server in Apache is easy. This tutorial covers how to create and sign your ssl certificate as well as how to configure the web server.

From the Magazine

January 2009, #177

It's a battle as old as time: good vs. evil. Fortunately, Linux and FOSS are on our side as we wage the battle against those who try to steal our secrets and invade our systems.

Checking your system's security is best done sooner rather than later. Test the locks with our article on security verification; find out how to use PAM to help secure your systems; use MinorFS and AppArmor to implement discretionary access control; learn more about Samba security in part III of our series; use Darknet to help detect bots and secure your systems; use the Yubikey to increase your site's security; and don't forget to lock the doors, because a cold boot attack could render your security useless if somebody has physical access to your computer.

But, we're not just about sowing the seeds of fear. We also show you how to use memcached in Rails, how to manage multiple servers efficiently, how to deploy applications easily with Capistrano, how to manage your videos with MythVideo, how to mix it up a bit (your audio that is), and even play a few games.

Read this issue