external-engine icon indicating copy to clipboard operation
external-engine copied to clipboard

"Error loading engine" with some positions

Open UE2020 opened this issue 2 years ago • 2 comments

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

UE2020 avatar Jan 29 '23 20:01 UE2020

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.

niklasf avatar Jan 30 '23 20:01 niklasf

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.

Craftyawesome avatar Jan 31 '23 04:01 Craftyawesome