Linux chess program PyChess
Checkmate

© © satori, 123rf.com
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
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs
News
-
MNT Seeks Financial Backing for New Seven-Inch Linux Laptop
MNT Pocket Reform is a tiny laptop that is modular, upgradable, recyclable, reusable, and ships with Debian Linux.
-
Ubuntu Flatpak Remix Adds Flatpak Support Preinstalled
If you're looking for a version of Ubuntu that includes Flatpak support out of the box, there's one clear option.
-
Gnome 44 Release Candidate Now Available
The Gnome 44 release candidate has officially arrived and adds a few changes into the mix.
-
Flathub Vying to Become the Standard Linux App Store
If the Flathub team has any say in the matter, their product will become the default tool for installing Linux apps in 2023.
-
Debian 12 to Ship with KDE Plasma 5.27
The Debian development team has shifted to the latest version of KDE for their testing branch.
-
Planet Computers Launches ARM-based Linux Desktop PCs
The firm that originally released a line of mobile keyboards has taken a different direction and has developed a new line of out-of-the-box mini Linux desktop computers.
-
Ubuntu No Longer Shipping with Flatpak
In a move that probably won’t come as a shock to many, Ubuntu and all of its official spins will no longer ship with Flatpak installed.
-
openSUSE Leap 15.5 Beta Now Available
The final version of the Leap 15 series of openSUSE is available for beta testing and offers only new software versions.
-
Linux Kernel 6.2 Released with New Hardware Support
Find out what's new in the most recent release from Linus Torvalds and the Linux kernel team.
-
Kubuntu Focus Team Releases New Mini Desktop
The team behind Kubuntu Focus has released a new NX GEN 2 mini desktop PC powered by Linux.