dshawul / Scorpio

Scorpio chess engine
Other
81 stars 19 forks source link

path to .ini file ? #25

Closed tissatussa closed 2 years ago

tissatussa commented 2 years ago

i'm using the Python module 'python-chess' to run a UCI engine .. it seems Scorpio (v3.0.15) wants its .ini file to be found in the same folder as my Python script, although the engine is in another folder .. this way i can only use 1 .ini file but i want to use several Scorpio configs : a Scorpio 'normal' / 'MCTS' / 'NNUE' etc .. does an option or parameter exist which points to the path of the .ini file ? The 'help' function doesn't mention it ..

dshawul commented 2 years ago

Did you compile scorpio yourself or make an installation with install.sh ? If you did the installation, it should put everything it needs in the same directory except for network files so it is easier regarding paths. So that way executing scorpio.exe directly is more or less equivalent to using the script scorpio.sh. Try using scorpio.sh or scorpio.bat as the engine for Linux/Windows resp, not scorpio.exe because the scripts have code to make sure the ini file is found in the same directory as the exe.

tissatussa commented 2 years ago

Thanks, i will try that.

I should have mentioned i compiled Scorpio myself on Xubuntu 20.04. I have no Tensorflow or any modern NVidia GPU, so i disabled that during compilation and when setting options i do "use NN: no".

[this is another Issue but i want to mention it here:] Also i experienced the NNUE option doesn't work : Scorpio gives an error and doesn't run. For that, i tried both Stockfish and Scorpio nets, setting the options accordingly. But MCTS does work.

tissatussa commented 2 years ago

indeed : starting Scorpio with the .sh file does work ! here i can change the path to the .ini, so i guess my problem is solved.

shall i open a new Issue to ask about the NNUE settings ?

dshawul commented 2 years ago

Sure go ahead and open an issue.

If you haven't already, please take a look at the install instructions here https://github.com/dshawul/Scorpio/blob/master/INSTALL.md

tissatussa commented 2 years ago

UPDATE i changed your .sh file into :

#!/bin/bash

cd "/home/tissatussa/Apps/EPD_TEST_PY/myengines/Scorpio/v3.0.15/" >/dev/null 2>&1

# the Scorpio binary expects an .ini file with name 'scorpio.ini'
cp ./scorpio_mcts_nonnue.ini ./scorpio.ini
# Usually, when you run a cp command, it overwrites the destination file(s) or directory

NDIR=$( grep ^egbb_path ./scorpio.ini | awk '{ print $2 }' )
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NDIR

exec ./scorpio_v3.0.15_compiled "$@"

at this moment i give absolute paths, just to be sure : i want to test several configurations according to some EPD puzzle FENs, giving an engine x sec per move to output a bestmove : good option values should give best results .. your comments in the .ini are good but not complete - not so important now, i guess the default values will be OK in most cases ..

is it true only an .ini file called scorpio.ini is accepted ? i found no other option for that.

can the path/file be set as parameter of the execution ? that would be handy, in my case: exec ./scorpio_v3.0.15_compiled -scorpio_mcts_nonnue.ini (and what about the "$@" then?)

tissatussa commented 2 years ago

i've tried to carefully follow your instructions in the install.md before compiling .. i skipped all NN stuff, at first i just want to try a NNUE, both SF and Scorpio types .. and use MCTS! -i see many suboptions exist for it!? Hard chapter for me, and how to do my tests and tuning? - nevermind - at this moment i have trouble using the NNUE function : a crash .. i'll post a separate Issue about this.