Using Stockfish with En Croissant
It has been at least a decade since I analyzed chess positions using software. Someone mentioned Stockfish as the latest hotness in this space so I have downloaded Stockfish 17.1. I was pleased to learn that it is open source! The GitHub – official-stockfish/Stockfish: A free and strong UCI chess engine docs state that it does not include a GUI but the Download and usage wiki has a list of free chess GUIs. I’m drawn to En Croissant – The Ultimate Chess Toolkit because it is also open source.

With both installed, I just need to recall the details of FEN (Forsyth-Edwards Notation). The only file that En Croissant can open though is a PGN file (briefly described at Representations of Chess: FEN, PGN, and Bitboards – Chess.com). I created a FEN for the position I wanted to explore:
KR1r/n7/k/8/8/8/8/8 w - - 0 1
The “Analysis Board” command looks like the place to enter it. Click on the “Edit Position” button.

A FEN section appears with a textbox for your FEN. You can click on the EMPTY button to clear the board.

I pasted my FEN into the FEN position text box then tabbed out of it and it just reverts to the empty board. Very unintuitive behavior – I accidentally discover that I need to press ENTER in that text box to accept my new position. An error appears about this being an invalid position. It would have been nice to have this validation happen instead of deleting my entry on TAB.

This is the corrected FEN:
KR1r4/n7/k7/8/8/8/8/8 w - - 0 1
This leaves me confident that I get the computer to help me analyze this position.


I want to have an engine play the position but none are available. The Download and usage · official-stockfish/Stockfish Wiki · GitHub says to go to the Engines tab to select an engine.

I select “C:\software\stockfish-windows-x86-64-avx2\stockfish\stockfish-windows-x86-64-avx2.exe” as per the wiki.


Now that I’ve set the engine to play, why aren’t the arrows labeled? I actually switched to Arena (see below) before returning with a renewed determination to get this to work. On the “Play from Here” screen, notice that the Engine button now displays Stockfish 17.1. Perhaps it’s the UI that’s confusing, looks like a bunch of controls just dumped into a panel. Switch both controls to Engine and adjust the time as desired. I’m using a 3s limit to keep things moving. Finally, click on “Start Game” and watch the engine battle itself.

Here are a few other FEN positions (from various Facebook posts) to play with:
KR1r4/n7/k/8/8/8/8/8 w - - 0 0
kr6/1r1N4/2Q5/8/8/8/8/K7 w - - 0 0
8/7p/1k4p1/4K3/6P1/8/8/8 w - - 0 0
k7/b7/2K5/4B3/8/8/8/Q7 w - - 0 0
Arena (3.5.1)
I had actually installed Arena before En Croissant but didn’t like that it wasn’t open source. I initially struggled getting the engine to play the game in En Croissant and went back to Arena.

I was pleasantly surprised that I could just load the FEN by going to Position > Load FEN from clipboard then have the computer play by going to Game > Move Now.

However, I didn’t like how long it took to make a move. After some exploration, I found that I could go to Levels > Adjust and change from Tournament mode to Time per move mode. It was ironic that I was using Arena without Stockfish for my analysis but still wanted to document my exploration of En Croissant. Perhaps it was this experience with the time setting in Arena that allowed me to adjust the time settings for the engine in En Croissant and actually see the Stockfish engine in action!


Improvements?
I wonder if I could add this Load FEN from clipboard option to En Croissant since it is open source. Such a command should automatically open the Analysis Board window. As I’m wrapping up this post, I just noticed the error below when I switched back to the En Croissant window.

Making that UI change could be a good entry for me into the React world.