-
Notifications
You must be signed in to change notification settings - Fork 3
Software Overview
Chess Challenger 2018 is setup to run StockFish, conceivably any chess engine that can run on a PI could live on the Chess Challenger.
- The way in which I configured everything to run is sort of convoluted. Hopefully this explanation will answer any questions.
The operating system is the base system that everything else is built upon. Its like the foundation of a house. Upon boot, the operating system launches the software that yours truly is responsible for, the Chess Challenger program. The operating system chosen for Chess Challenger/PI was the popular Raspbian Stretch Lite. This was chosen for two reasons, I'm already familiar with it and it has a small operating footprint. A desktop version of Raspbian made little sense, all I needed was the command line.
This is where things get interesting, essentially the Chess Challenger program is an interface. It controls the main LED display, interprets button input and sends and receives dumb style win-board commands. Well gosh Slash/Byte, that's stupid, why did you make it do that? Well I'm glad you asked, I don't actually like writing software! In an effort to make things simple, I took what was already available, that did exactly what I wanted, so I had to do less. Not using the resources at my disposal is stupid.
The simple and honest answer to that is, I couldn't figure out how UCI worked. I tried for a few days to play an entire UCI based game in the console and was unsuccessful. Soon after, I discovered there was a UCI to win-board adapter, more on that later.
The Chess Challenger program is built on-top of the shoulders of giants, StockFish and Polyglot. The ChessCP talks to Polyglot, which in-turn talks to Stockfish. Stockfish then relays the information back to Polyglot which it then sends to the ChessCP. That doesn't sound simple Slash/Byte. Yeah... well this means all I had to do was send and receive simple win-board commands. Polyglot handles the game, Stockfish handles the computation, ChessCP handles the user interaction.
Chess Challenger--(WB)-->>Polyglot--(?)-->>Engine
Chess Challenger<<--(WB)--Polyglot<<--(?)--Engine
By orchestrating things as I did, I gained a lighter work load, and more importantly, flexibility. By using a UCI to win-board adapter, conceivably any engine that polyglot is compatible with, Chess Challenger is also compatible with.
Now as Mentioned in a previous page, Polyglot was not a magic bullet. I Did have to make minor changes to the source code. The modified version can be found here. This version is the current version present on the PI image made for Chess Challenger.
Stockfish version 10 is present on the PI image made for Chess Challenger. Now Stockfish has a compiler optimization for ARMv7, but the Raspberry PI Zero W, is featuring the ARMv6.
Initially I compiled Stockfish for the ARMv7, and it ran on the PI zero. After some reading I recompiled it for a Generic-32 bit processor, this gave me a slight jump in performance. After more reading, I compiled it a third time. This time for Generic-32 bit processor with optimizations, I saw another slight jump in performance. This third compilation lives on the raspberry PI image for Chess Challenger.
This is the benchmark data for Stockfish running on Chess Challenger/PI zero w.
stockfish bench 16 1 5 default perft
===========================
Total time (ms) : 223999
Nodes searched : 1450447254
Nodes/second : 6475239
stockfish bench
===========================
Total time (ms) : 75789
Nodes searched : 3057978
Nodes/second : 40348