neat-chess icon indicating copy to clipboard operation
neat-chess copied to clipboard

Improved instructions on how to start an engine

Open jaylawl opened this issue 2 years ago • 4 comments

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

jaylawl avatar Dec 23 '22 17:12 jaylawl

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.

KadTheAad avatar Jan 02 '23 17:01 KadTheAad

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.

KadTheAad avatar Jan 03 '23 11:01 KadTheAad

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

xerx593 avatar Mar 26 '23 19:03 xerx593

That was probably also a problem:

I have manually added the $PATH on my windows environment.

  1. It (the env variable) should already be in place (for user+machine), but not with name $PATH, but PATH (env. variables are referred like ${PATH} in linux(like) and like %PATH% in windows)
  2. You should append to it (in windows with a ;, in unix with a :) not replace it.. ;)

xerx593 avatar Mar 26 '23 19:03 xerx593