Caddell Chess Computer
Caddell, a stand alone chess computer, was birthed from the desire to play against the Rodent chess engine and its personality files, without using a computer or smartphone (and thus without the potential for distraction that those devices can bring). Caddell is for playing chess OTB (Over The Board) against a computer opponent. No special board or pieces are required… moves are inputted to the computer on its 3.5” touchscreen using long algebraic notation while you move the pieces manually on your physical board. Caddell might be compared to the Chess Challenger 7 from decades ago, I know I thought of my long lost Chess Challenger often while working on Caddell.
The Caddell Chess Computer can theoretically utilize any chess engine that supports the UCI protocol and that has been ported to the Raspberry Pi platform, and/or can be compiled for it. To date Stockfish 12 and Rodent IV have undergone the most compatibility testing.
- Raspberry Pi 3 model B+
- Nextion touchscreen display
- A handful of npm packages
- React for the optional browser component
Due to their recent availability, the Caddell Chess Computer now includes both Stockfish 13 and the Maia chess engines! Many thanks to Al ‘Scally’ Cooper for compiling those for the picochess community.
A Little Brief Terminology
- Chess GUI
- The Caddell Chess Computer is a Chess GUI and relies upon Chess Engines to be fully operational. A Chess GUI (like Caddell) is the interface between the human player and the computer program that has all the smarts to play challenging chess. A Chess GUI lets you choose black or white, lets you select the engine and the strength of the engine. A Chess GUI should be responsible for knowing if your move is valid, for reporting check or mate, etc...
- Chess Engine
- A Chess Engine generally isn't thought to have a human usable interface, and instead relies upon a Chess GUI for play. The Chess Engine knows the rules of chess and can make the best (or so, depending on a variety of factors like engine level, opening book, etc) move for any given board position. Caddell is not a chess engine and cannot determine a best move to play.
- Personality [files]
- Some Chess Engines have an option to use a Personality File, optionally in addition to setting a strength level. A personality defines the style of play... perhaps one personality favors keeping all pawns, while another might stress pawn trades very early in the game. Personality files can make an engine seem more human-like in its play.
- Opening Book(s)
- The Caddell Chess Computer allows you to select from a number of Opening Books to play against. The way Caddell uses this feature is to play moves from the opening book, bypassing the chess engine, for as long as lines of play continue to exist in the book. Books exist that favor semi-open, or Indian, or even "fun" openings. Using one of these books can guarantee that you play against an opening you are learning, or just to add some novelty to your play.
To get a local copy up and running you will need a Raspberry Pi board, the RPi 3 model B+ was used during the creation of Caddell and therefore is known to work. You will also need to acquire a Nextion 3.5” display (available on Amazon, banggood, and other online retailers). The basic and enhanced version of the Nextion display both work fine. The “Intelligent” series was not tested.
The following photos intend to give a little more info about the project as well as to begin to instruct on how to use the Caddell Chess Computer.
This is the main playing screen of Caddell, where you’ll spend most of your time. Moves are entered in long algebraic notation using the two rows of buttons, labeled A-H. When the letter for the square is tapped the buttons switch to numerics, 1-8, and then back again to letters when a number is tapped. This conserves screen real estate without impeding the ability to enter moves.
On this screen you can see the opening that Caddell has determined for this game. Below the opening name you can see that this game is using an opening book called “Fun”. At the bottom of the screen lists the engine and level (and personality if supported by the engine).
We can also see that Caddell believes your last move followed the opening precisely. The vertical bar shows Caddell’s idea of who has advantage.
The buttons on the right side of the screen show the current board position, a hint, and settings, from top to bottom.
This screen is reached by tapping the “show board” button on the main page. It shows the current position and the pieces that have been removed from the game. Moves can not be made from this page… the value of this screen is realized when a cat knocks your physical pieces to the floor.
Here we see the settings page. You can choose color, engine, and level on this screen, all by tapping on the item you want to change. In the case of engine and level a “drop down” list is displayed that you can scroll through and choose your desired item. If an engine has personalities they can be chosen from the next screen, reached by hitting the right arrow.
This is the second settings page. This page allows you to choose an opening book, and if the engine from the prior page supports personalities you will be given the chance to choose one here.
Worth noting: Caddell supports choosing both a level and a personality for the Rodent IV engine.
Caddell is judging you while you play and will let you know if you’ve made a mistake, a blunder, or by some chance a spectacular move.
Only a limited functionality beta feature for now, Caddell also has a browser component. The browser component is meant to compliment the stand alone chess computer and not to replace any of its features or functionality. An enjoyable game will always be able to be played without using a browser at all.
Some of what the browser component currently offers includes:
- seeing a large view of the board position (larger than on the 3.5” screen), for replacing pieces when a cat knocks your board over or a dog’s tail swipes the pieces away
- ability to step backwards and forward moves in the game… it doesn’t change the state of the game, it just allows you to view the history
- view the move history in either long algebraic or descriptive notation
- ability to see the engine’s info responses
- ability to download the PGN of the game
- ability to copy the FEN of the current position (including having stepped backward through history)
- set parameters (color, engine, level, etc) of a game and start it
A very experimental feature of the browser component is the new ability to select individual engines, levels, and/or personalities for the computer to play during the different game phases. You might want, for example, to have the computer play using Stockfish 13 at level 17 during the opening, then switch to Maia Elo 1300 for the middle game, and finally finish out with Rodent IV Elo 800 using personality Cloe for the endgame. The number of combinations available are staggering… a unique game experience is all but guaranteed.
This feature, inspired by a message1 on the Computer Chess Club forum, called “Relay Chess” after races in sports where members of a team take turns completing parts of a race course or performing certain actions2, is only available via the browser component. Once again, this is still a very experimental feature and it would not be unreasonable to expect bugs.
Partial Future Browser Features Planned
- read info about engines, pesonalities, and books
- set more options for the engine than are exposed on the stand alone device
Seeing It All Work
A brief movie showing the first couple of moves of a game. Initially the focus is on the stand alone Caddell device and then switches to the browser in the background.
Distributed under the GNU General Public License v3.0 or later.
The Caddell Chess Computer could not have been possible without the prior good works by several others. In the npm registry exists a few helper packages to make dealing with chess logic easier. The specific packages used can be found in this project’s package.json file.
Sincere thanks to the StingRay Chess GUI project. The look and feel of their GUI is very seducing and so for now the Caddell Chess Computer is leaning on it until Caddell grows a unique look of its own. No code, including no CSS, was lifted from StingRay. Caddell’s browser component was handcrafted from scratch.
And last but far from least, a huge debt of gratitude is due to the chess engines that are readily available. Caddell would be at best a proof-of-concept project only without a chess engine to actually play a game against.
Open source projects are made available and contributed to under licenses that include terms that, for the protection of contributors, make clear that the projects are offered “as-is”, without warranty, and disclaiming liability for damages resulting from using the projects. This project is no different. The open content license it is offered under includes such terms.
Running an open source project, like any human endeavor, involves uncertainty and trade-offs. We hope this project helps you, but it may include mistakes, and can’t address every situation. If you have any questions about your use of it, we encourage you to do your own research, seek out experts, and discuss with your community.