This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature

Chess engines for Linux

By M. Shuaib Khan on March 22, 2007 (7:00:00 AM)

Share    Print    Comments   

Chess engines for Linux are comparable in strength to commercial chess engines available for other platforms. Here's a look at the features of half a dozen of the most well-known chess engines for Linux.

A chess engine is the actual program against which you play the game. A chess engine can take a move as an input, and after analysis, generate a move of its own as an output.

To play against such an engine, you need a user interface. Most chess engines provide a command-line user interface, but that can be quite awkward. To make things easier, you can use a complete graphical user interface to communicate with the engine. XBoard and UCI (Universal Chess Interface) are two of the most popular and widely used free, open source communication protocols that enable a chess engine to communicate with a graphical user interface. Isolating the chess engine from its GUI gives you the choice of using any interface of your preference. You can easily make two chess engines, each of which supports these protocols, play against each other by making them communicate through an XBoard or UCI interface.

Crafty

Crafty, developed by Robert Hyatt, is a descendant of the Cray Blitz chess engine that was the World Computer Chess Champion from 1983 to 1989. Its current peak ratings at the Internet Chess Club (ICC) stands at 3,286 (bullet), 3,388 (blitz) and 2,792 (standard). In the Swedish Chess Computer Association's (SSDF) current rating list, Crafty is at 36th position with an Elo rating of 2,616. In the 2004 World Computer Chess Championships, Crafty won the fourth place with same amounts of points as the third place finisher, Fritz 8.

Chess engine ratings

Chess engines' ratings aren't evaluated by comparing them against human players because chess engines do not participate regularly in human chess competitions. That's why such engines do not have official ratings from FIDE, USCF, or other chess organizations. Most of the engines are rated by making them play against other computers, and thus any rating given to a chess engine doesn't quite compare to a rating given to a human player. The skills required to play against other computer programs are different than those for playing against a human player. Chess engines are strong tactically but weak strategically, and are much better at blitz chess than at slow chess.

Crafty uses the XBoard protocol, and thus you need an XBoard compatible graphical interface to play against Crafty.

You can download both binary files and source code from Crafty's FTP site. Read the read.me file in the FTP directory to learn about the files and folders present in the main directory. Opening books and endgame databases, which add to the strength of the engine, are available on the FTP site.

After installing Crafty, your can use it by specifying its location to XBoard with the -fcp parameter:

xboard -fcp "./crafty" -fd crafty_directory

Here crafty_directory is the directory where you installed Crafty.

Crafty is written in ANSI C and runs on Unix, Linux, DOS, Windows, OS/2, and Mac OS. Its strength depends on the processing speed of the machine it is used on, and the size of opening book and endgame databases you use. Even with minimal resources, Crafty can still provide quite a challenge. If you want to make it weaker so you can beat it, try the following options when loading it from the command line:

book off -- This options disables the use of opening book for crafty.

ponder off - Crafty can't think while you are playing your move.

st 1 -- Make the maximum thinking time for Crafty just one second.

sd n -- Crafty won't think more than n moves ahead.

If you are able to beat crafty too often, you can also make it more stronger with these options:

hash nK -- Makes the hash table bigger

hashp n -- Makes the hash table for pawns as large as possible

GNU Chess

GNU Chess is a free chess-playing program developed as part of the GNU project of the Free Software Foundation. It has been around for a long time and comes bundled in Linux distributions such as Slackware and Red Hat. The most recent version, GNU Chess 5, was rewritten from scratch in order to eliminate spaghetti code and replace antiquated data structures with more advanced computer chess implementation techniques. It uses opening books that are generated by studying games of masters. You can create your own opening books by listing all the games you want to include in the book in a PGN file, and using the command book add bookfile.png while running gnuchess from the command line. You can download an officially released PGN file to use to build the opening book from.

On the Internet Chess Club, a copy of GNU Chess running on an SGI Onyx R4400 under the handle MaxII achieved a blitz rating of over 2,500 and a standard rating of over 2,300.

There is a excellent Web-based version of GNU Chess that you can use to play against using a Web browser.

Phalanx

Phalanx chess engine was created by a young Czech student, Dusan Dobes, but he stopped working on it around the year 2000. His code is available under the GPL, and some members of the community are still working on it. It is weaker than either Crafty or GNU Chess, but still strong enough to beat an average player. Like Crafty it is XBoard compatible; to run it with XBoard, type xboard -fcp phalanx.

To change Phalanx's strength, use the following options:

-e level -- this can vary from 0 to 100, with 0 being the toughest level

-b [+/-] -- turns opening book on and off

-f [search time in seconds] -- time Phalanx takes to search for a move

For a complete list command-line options, see the README file that comes along with the source.

Sjeng

Sjeng was written by Gian-Carlo Pascutto with help from a few other colleagues. Deep Sjeng is a professional chess-playing and analysis program, complete with interface, opening book, chess server access, personalities, and multiprocessor and Universal Chess Interface (UCI) support. Its playing strength is over 2,750 Elo on fast hardware. In addition to standard chess, it can play other forms of chess, such as bughouse, crazyhouse, suicide. Like Crafty, Sjeng is XBoard-compatible. Sjeng is rated 2,674 in SSDF's current rating list.

Faile

Faile is an expert to master-strength chess program, depending upon the machine you run it on. It has a rating of 2,050 - 2,250 Elo. Faile's default book is based upon a collection of grandmaster games, designed to cover all Encyclopedia of Chess Openings lines. Faile's source code is small, but it is full-featured, and the code is well documented and thus can be helpful to those learning how to create their own chess engines.

Faile can be made to play stronger by increasing the amount of memory that it will use for its hash table:

faile -hash [size in MB]

Faile comes with a default opening book, but you can also make your own by making a Portable Game Notation (PGN) file of the games whose opening you wish Faile to use. After you have your desired PGN file, use Faile on it like this:

faile -mbook [PGN input file]

Fruit

Fruit, developed by Fabien Letouzey, offers incredible playing strength. Fruit 2.2 finished second in the last World Computer Chess Championships in Reykjavik in 2005.

Though it hasn't got any outstanding strengths, Fruit hasn't got any weaknesses either. It plays a strong opening game, with excellent tactics in the middle game, and a superior endgame. It can figure out weak moves on an opponent's part with great accuracy, and take full advantage of them. It has beaten strong commercial chess engines such as Shredder and Junior.

Until version 2.1, Fruit was an open source engine, and the source code for version 2.1 is still available. But with Fruit becoming the strongest engine, the author decided to close the source code to avoid clones which might participate in official tournaments. Toga II and GambitFruit are two derivative works based on the code of version 2.1 of Fruit.

Conclusion

Linux users have a variety of chess engines to choose from, all having a unique playing strength and style of play. A complete list of chess engines is available at Timm Mann's engines page. These engines not only provide a challenging opponent to test your chess skills against, but also provide excellent learning tools to help you boost your chess play.

Share    Print    Comments   

Comments

on Chess engines for Linux

Note: Comments are owned by the poster. We are not responsible for their content.

typo

Posted by: Anonymous Coward on March 22, 2007 05:03 PM
book add bookfile.pgn NOT png

regards,

#

Common Theme

Posted by: Anonymous Coward on March 22, 2007 07:17 PM
Early on in the article, the author mentions that a chess engine must have a user interface. Indeed! But, then he glosses over the issue by saying that there is a CLI as well as several graphical frontends and thats the end of the discussion for a feature that is a must have.

What he fails to mention is that all of the graphical Linux chess games look like crap! They look like a bad experiment from 1984. Which isn't far off from what most of them truly are.

In the real world, people go out of their way to get fancy, elaborate and expensive chess sets. I see them made of marble and glass and wood and silver and all sorts of exotic materials. The pieces have fancy and artistic designs. On Windows, the chess games follow a similar approach with many different appearance options, On Linux you have, the command line and something that lacks the graphical appeal of an Atari.

So, I must ask... Why do Linux chess games follow the same theme? Why do they suck?

#

Re:Common Theme

Posted by: Anonymous Coward on March 22, 2007 09:12 PM
There's Brutal Chess that looks cool, although it's still under development and not quite production-ready yet.
<a href="http://brutalchess.sourceforge.net/" title="sourceforge.net">http://brutalchess.sourceforge.net/</a sourceforge.net>

And eboard is kind of like xboard but it has themes to change the appearance.
<a href="http://www.bergo.eng.br/eboard/index.php?p=3" title="bergo.eng.br">http://www.bergo.eng.br/eboard/index.php?p=3</a bergo.eng.br>

#

Re:Common Theme

Posted by: Anonymous Coward on March 23, 2007 12:04 AM
Thanks for the links.

Brutal chess is only three months old and is still in alpha so, bugs abound. Go figure. I can't put much hope in that one for a while.

eboard seems like a preety good basic frontend. It is certainly way better than the effing command line like the article suggested! Who plays command line chess? Puhlease.

#

Re:Common Theme

Posted by: Anonymous Coward on March 23, 2007 03:05 AM
Anyone who actually cares about chess, and not useless frontends?

#

Re(1):Common Theme - why programmers miss the entire point of play

Posted by: Anonymous [ip: 68.62.174.242] on September 13, 2007 11:17 AM
If you don't care about the aesthetics then you are a machine - If you are human, then you know you can't win against a machine. It is like having a race to see whether you or the machine can think faster - duh! If you want frustration - play a machine if you want war, personality, thrills, a true since of competition - the agony of defeat and the thrill of victory with all the human (we make mistakes) qualities then don't ever play computer chess. It is an exercise in futility. Computer chess has done more to kill chess playing than anything - buy a kid a computer chess game or let him play a linux chess engine, no matter what the interface and you will lose a future chess player. These geeks (yes I am a geek but not a nerd) are nerds because they think to beat a human is the object - duh - having fund, learning, developing thought processes, making mistakes and learning from them along with competition - trying to better yourself - that's playing chess. The rest of this is an exercise in advanced programming which has some value for the programmer but little to no value in learning or enjoyment to the player which is the object of play - hence - computer chess is worthless but as an exercise.

You want to make a great program for people - take on the greatest programming effort you could possibly do - let it be human with personality, mistakes, etc. If no one (except a grand master and then only the bad chess programs) can ever beat a chess program then what is the point in playing. Do you like to lose day in and day out every time you play - hey, then go beat your head against a wall - currently it is just as fun as play gnuchess or any of the other Plus 2200 rated programs and you have just as much luck of knocking the wall down before your head is mush as winning at the program.

#

Re:Common Theme

Posted by: Anonymous Coward on March 23, 2007 03:47 PM
I assume you're talking about xboard? I use Knights on KDE and find it quite appealing. In fact, it's one of the things that keeps me on KDE.

#

Re:Common Theme

Posted by: Anonymous Coward on March 24, 2007 02:34 AM
In the real world, no serious chessplayer play with sets made of marble, glass or silver. We use simple, standard sets made of wood or plastic.

Why: they just work better.

#

Re:Common Theme

Posted by: Anonymous Coward on March 24, 2007 09:08 AM
Actually theres a few for Linux that aren't bad.

Eboard is one : <a href="http://www.bergo.eng.br/eboard/" title="bergo.eng.br">http://www.bergo.eng.br/eboard/</a bergo.eng.br>

Jin is another:

<a href="http://www.jinchess.com/" title="jinchess.com">http://www.jinchess.com/</a jinchess.com>

#

Chess

Posted by: Anonymous Coward on March 22, 2007 09:47 PM
I remember like 10+ years ago, there was this game "Battle Chess", it was dumb lol. When you take out an opponent piece, you see them fighting.<nobr> <wbr></nobr>:D

#

Re:Chess

Posted by: Anonymous Coward on March 22, 2007 11:55 PM
i still have it, it's the greatest chess game ever<nobr> <wbr></nobr>:)

#

Re:Chess

Posted by: Anonymous Coward on March 23, 2007 10:24 AM
Check out Brutal Chess:
brutalchess.sourceforge.net

#

terrible

Posted by: Anonymous Coward on March 22, 2007 11:20 PM
most of the engines here do not deserve to be mentioned. Fruit& Toga are close to the top of rating lists, you should have concentrated on them.

#

Wtf?

Posted by: Anonymous Coward on March 23, 2007 07:34 PM
Where did you find that these are the only linux engines?
The state of the art in linux chess engines is MUCH more advanced and includes at the very least toga, fruit (the last gpl version), arasan, scorpio and glaurung, but also many more engines that are utterly stronger then crafty!

#

For kids=?

Posted by: Anonymous Coward on March 25, 2007 02:23 PM
Frankly I don't care if the engine can beat the entire planet I want an engine which is useful for my kids to muck around on and win some games.

#

Re:For kids=?

Posted by: Anonymous Coward on March 28, 2007 10:58 AM
I'd like also to play chess against the machine but I didn't find a program powerful enough for my abilities. Any suggestion which includes "ultra-stupid" mode? TIA.

#

PyChess

Posted by: Administrator on March 23, 2007 03:51 PM
I think Iobais' PyChess @ <a href="http://pychess.googlepages.com/screenshots" title="googlepages.com">http://pychess.googlepages.com/screenshots</a googlepages.com> is very easy on the eyes.

#

Chess engines for Linux

Posted by: Anonymous [ip: 98.200.59.196] on September 19, 2007 05:42 AM
The strongest are: Fruit and its derivatives, Toga and Gambit Fruit. These engines alone can compete against the very best commercial engines. Crafty, Glaurung, Zappa, Baron, Gosu, Faile, Phalanx and Jonny are also good but not near the strength of the first ones mentioned. But above all, they remain to be very entertaining engines. I don't know why Scorpio never runs on my computer.

#

Chess engines for Linux

Posted by: Anonymous [ip: 98.200.59.196] on September 19, 2007 05:46 AM
Using a Chess database, you can try SCID or Jose. If development on Scid continues, it should become a dominating program since it is freeware. Scid has come a long way every since its first release. You can use the above engines as your analysis engine. By the way, Spike has a linux version which is also quite strong that surely can nick a game or two against the strongest commercial engines.

#

Chess engines for Linux

Posted by: Anonymous [ip: 98.200.59.196] on September 19, 2007 05:51 AM
So for chess addicts, do not hesitate to install linux over windows because there are several real strong programs out there that are of commercial strength. The engines Fruit/Toga/Gambit Fruit and Spike should be enough even for the strongest chess masters. Glaurung is also very strong.

#

Chess engines for Linux

Posted by: Anonymous [ip: 192.168.1.50] on December 17, 2007 08:51 AM
I care less about computer chess itself (I mean playing against chess engines) but what I really appreciate is playing chess against humans. A computer can and must help in this. There're plenty of chess interfaces to play chess on ICSs (Internet chess servers) but not so much to play h2h via sockets, speaking of cross-platform intercommunication. There're single clients that allow playing chess via internet messengers such as Skype, MSN etc. There is only one chess client that allows to play chess cross-platformly via socket (f.e. you run your client on Windows and your partner on Linux) and with instant messengers: Miranda, Trillian PRO, &RQ, RnQ. Its name is Chess4Net. And it is absolutely FREE! Read more about and get it on http://chess4net.ru

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya