lichess-org / external-engine

Using engines running outside of the browser on https://lichess.org/analysis
GNU General Public License v3.0
76 stars 22 forks source link

"Error loading engine" with some positions #30

Open UE2020 opened 1 year ago

UE2020 commented 1 year ago

When running external-engine with the position below, the analysis fails with "Error loading engine", despite the position being legal. The built-in WASM Stockfish works fine.

r1bq1rk1/ppp1ppbp/2np1np1/8/8/2P1PP2/PP1PQQPP/QQQQ1K1Q w - - 1 7

A screenshot of the error: https://i.imgur.com/4n4G3OY.png

niklasf commented 1 year ago

This is expected for vanilla Stockfish, because it's not built to work with impossible material combinations. I wonder if lila-engine should protect the provider from such positions, with a possible way to opt out for engines that can handle this.

Craftyawesome commented 1 year ago

I think this position maybe should work fine? It is illegal, but only 32 pieces. I know NNUE doesn't work with >32 pieces, and IIRC there are also some further (not NNUE specific?) limitations. But it might be nice to have some sort of handling for illegal positions.