Using Crafty Chess Engine to Benchmark Your Hardware

Published in: HowTo

There was a time when I was really involved with the computer chess community. I used to organize off-line and online computer chess tournaments. Try all the new free or commercial chess engines out there. I was so involved with the community that commercial chess engine authors from ChessBase (one of the largest, if not the largest, chess software company) used to send their beta commercial engines to me (among other testers) to test them out for bugs before officially releasing them. The computer chess engine was a serious business. It still is to a certain extent but it’s not the same anymore. There are way too many chess engines to keep tabs on and engine authors are copying each other’s code and packaging them as their own either as commercial or even as freeware engines. Writing a very strong chess engine is not difficult anymore, they are too many open-source examples out there and very few of them are unique and have a noble approach to playing the game.

But of course, this post is not about Chess engines and its history. I just wanted to give you some background on the community.

Crafty is one of the most well known open source chess engines out there. In its days, it used to be very close in strength to the leading commercial engines in terms of strength. It had a unique approach to playing games and pioneered many chess engine concepts. One of the less known features was the ability to benchmark your CPU to see how much NPS (nodes per second) is can count on some pre-defined chess positions. It was part of the official SPEC CPU2000 benchmarking tools.

Anyways, you can use crafty to benchmark your own cpu. Crafty is available in many platforms. On Ubuntu default repo. the current version is 23.4. Crafty is a command-line chess engine which hooks in to GUI engine using chess-engine protocols (winboard). But we don’t need to use GUI. We can run crafty from command-line on Windows/Linux/Mac with the simple crafty command and then on the prompt you just simply type bench to run the nps benchmark. It Looks like this:

benchmark

Raw nodes per second mean the number of chess positions crafty searches on your hardware. In this case, in my virtual machine crafty searched over 3.3 million chess positions per second. The higher the number the deeper crafty can search for a better chess position and the stronger game of chess it can play. There was a time when getting 1M-NPS was a huge deal.

If you want to benchmark your CPU for raw speed, this is an interesting way to do it.




about | twitter | facebook | archive | rss