Software Development

Main menu

Category Archives: stockfish

Recently I bought a book with about 1000 chess puzzles. But many puzzles were just incorrect. It is frustrating to spend alot of time to find a solution and later you recognize there is no solution. Then I got the idea to write a program that generates correct puzzles from a game database. But what makes a good chess puzzle? In my opinion a position is a good chess puzzle if

the best move is clearly the best, that means

the best move is winning and the second best move is not winning

or the best move is not losing and the second best move is losing

the best move is not abvious, that means

the best move was not played in that game

and the best move is not found by a chess engine at very low depth

To decide which move is winning or losing Stockfish is used.
Surprisingly with these simple rules I could find only one puzzle in about 200 games. Nevertheless my program generated already many thousends of puzzles.
I decided to create a simple Webapp on top of this puzzle database. The link ishttp://bestmove.abrok.eu

How often is that site updated?

The site is updated automatically. Every five minutes both repositories are pulled. If there is a new commit on the master branch the binaries are build. This takes some minutes.

What are the differences between all those versions?

Windows 32 runs on very old 32 bit versions of windows but it is relativly slow.

Windows x64 runs only on 64 bit versions of windows. It is clearly faster.

Windows x64 for modern computers additionally requires a cpu which supports the popcnt instruction. Most modern cpus do it. This popcnt instruction speeds up some calculations.

Windows x64 for Haswell CPUs additionally uses the bmi2 instruction set which speeds up some calculations further. Until now only Intels Haswell cpus support this instruction set. All future cpus probably will also have that support.

Linux … is obvious.

Which version is best for me?

In top-down order. Use the first version that works for you. If you are not sure you can start the program and type “bench”. If it did not crash it works on your computer.

It seems that the special SSE4.2 compile is not faster then the compile for modern computers. I decided to replace the SSE4.2 version by a special version for Haswell which I expact to be measurable faster. Since I dont have access to an Haswell computer I need your help to verify my assumptions.
If you have an Haswell computer, start any of the following executables and type “bench”. After that post the results for each version as reply.