neat-chess
neat-chess copied to clipboard
Improved instructions on how to start an engine
I've tried for a good half hour to start stockfish using the provided startStockfish() method.
I have manually added the $PATH on my windows environment.
No matter what variation I tried, the code was unable to start stockfish - despite using the PATH in CMD working fine.
The thrown exceptions unfortunately were not helpful at all. It was the same general message every time.
My suggestion in a nut shell:
-
throw more detailed exceptions as to what went wrong when failing to start a uci instance
-
provide more Idiot -proof instructions in the readme.
Eventually though, I got it work by just pasting the raw path of stockfish.exe. whatever works
The reason that the startStockfish() function didn't work is because it uses the path "stockfish" not "stockfish.exe". This makes the startStockfish() method work on mac and linux but not on windows.
I created a fix for this and am currently waiting for it to be merged. For now you can use the branch win-fix which can be found in my fork.
First
provide more Idiot -proof instructions in the readme.
I think it is idiot-proof, but how to enable&force the idiot to read:
By using the startStockfish() method, the client assumes that Stockfish is already installed on the system, and it's accesible in $PATH as "stockfish". source
??
Solution for windows and stockfish not in %PATH%
:
UCI uci = new UCI();
uci.start("C:\\Path\\To\\My\\Enginge\\stockfish.exe");
;p
That was probably also a problem:
I have manually added the $PATH on my windows environment.
- It (the env variable) should already be in place (for user+machine), but not with name
$PATH
, butPATH
(env. variables are referred like${PATH}
in linux(like) and like%PATH%
in windows) - You should append to it (in windows with a
;
, in unix with a:
) not replace it.. ;)