Linux chess program PyChess
Checkmate
Powerful and flexible chess programs have been scarce on Linux. But PyChess sees the free operating system checkmate other platforms.
The game of chess is one of the oldest strategic board games known to humankind. Despite its centuries-old history, chess has lost none of its fascination, and the advent of computer technology in recent decades has not stopped the game of kings. Computers with multi-core processors effortlessly beat most human chess players. The market for chess programs is overrun by countless more-or-less sophisticated competitors that spoil users for choice.
Linux did not play a major role as a platform for chess programs for a long time. Although all major desktops have had graphical chess programs for many years, they have been unable to assert themselves because of functional deficits, poor performance of the chess engines, and a lack of compatibility with the commercial offerings from the Windows world. It was only with the publication of the Java-based chess program Shredder [1], available for Linux for the first time in 2006, that the tide began to turn. Shredder is now regarded as one of the most powerful commercial chess programs in the game, but free applications under Linux have also made significant progress.
Most of the current crop of chess programs on Linux are made up of two components: The graphical user interface defines the gaming experience, and above all, supports additional features for advanced users, such as game analysis or replaying matches for training purposes. Underneath the interface, the brain – the actual chess program – interacts with the user. These engines do not have a graphical interface but simply compute the moves.
For many years, free chess engines were unable to keep up with their commercial competitors, but this has now changed. When Stockfish [2] appeared on the Swedish ranking list of the strongest chess engines in 2015, this meant that two free chess programs had made it into the top ten [3]. Crafty [4], another free engine, has made the headlines on several occasions through its outstanding achievements.
The GUI and the chess program in these solutions communicate via standardized protocols. The quasi standards are the Chess Engine Communication Protocol (CECP), also known as the Xboard protocol due to the graphical interface of the same name, and the more-recent Universal Chess Interface, UCI.
PyChess
PyChess, a recent development among graphical interfaces for chess programs, supports both CECP and UCI. Originally designed for the Gnome desktop, the Python chess client is based on the GTK libraries. However, the current version 0.12 "Anderssen" also runs perfectly on Linux desktops that do not rely on GTK components. The software can now be found in the repositories of many distributions; and, the project offers precompiled binaries and the source code on its website [5].
After installation, check out the Games submenu in your distribution for a PyChess entry. When you press the starter, the program opens a nondescript window, where you can first select your color and the chess engine to use from two selection lists. In the lower part of the window, you have the option to sign up to the FICS chess server on the Internet, where you can then play live games, by entering a user name and your password. You can enable the desired function by press the Start game button to play a game locally or pressing Connect to FICS to start an online match (Figure 1).
PyChess comes with its own chess engine called PyChess.py, which is used by default when you launch the software. Below the selection box, you can adjust the skill level of the program. You can add other engines without much effort: The package managers of most Linux distributions will give you packages such as crafty, fairymax, gnuchess, phalanx, sjeng, and not least stockfish, which you can then install via your package manager. Additionally, the developers of PyChess provide multiple chess engines for downloading [6]. After restarting, PyChess should find the desired engine automatically and offer you a choice.
Settings
After you click Start game, the actual program screen appears. Below the menu bar at the top, the screen is divided into the two-dimensional chessboard on the left side and several display panels on the right. In the lower section, you will also find a display area with two tabs: Tips and Engines.
All the display areas are empty at the beginning of a new game, but they fill with data as the game progresses so that you can follow every game later on without any problems. Before the first game, it makes sense to first configure the software to suit your own needs in the Settings menu.
The corresponding dialog lets you add various options to the program window via the General tab arranged on the left. Among other things, you can display the coordinates of the chessboard and the captured pieces.
You can also display the move times and evaluations within the program window. In the second tab, Information, you can set the opening move and select an engine for the analysis function. The selection boxes automatically list all the available engines.
In the middle tab Sidebars, you can then define which basic information is displayed in the program window: Turning off unnecessary functions removes the clutter from the interface (Figure 2). Then, from the list of active display areas, you can select one or more areas and disable them, pressing the Active button below the settings window.
The two rightmost tabs, Themes and Sounds, are used to tune the visuals and sound of the software. For example, you can tell the program to notify you of program messages with acoustic feedback or to adjust the chessboard visually to suit your wishes; PyChess features more than three dozen view options.
Espionage and Tips
In the View menu, you can check the Tip mode box to see tips for your next moves during the game. This box particularly benefits weaker players who want to improve their skills in the game. Spy mode, which is enabled in the same menu, shows you what the chess engine is "thinking about;" the moves appear directly on the board in the form of red arrows for your opponent's next moves.
If you want to turn off any additional ads and only see the game board with the clock on the screen, uncheck the Show sidebar box in the View menu. The sidebar goes away (Figure 3), although PyChess continues to update the list displays in the background, and you can view them during the current match by pressing Show sidebar.
To make sure you can quit a game or track a played game at a later date, PyChess lets you save the game. The Save game and Save game as options in the Game menu let you store the current game on your hard disk in the standardized PGN format. Most chess programs support this text-based format. Additionally, there is nothing to prevent you from exchanging data via the PGN format with chess databases such as Scidb. The Load game and Load last game options, also in the Game menu, let you reload the desired game at a later date.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.