jromang / picochess

GNU General Public License v3.0
74 stars 55 forks source link

build/engines.py has difficulty with The Baron 3.42 #265

Closed djdekker closed 6 years ago

djdekker commented 6 years ago

At http://www.chessprogramming.net/the-baron/ a Raspberry Pi build of chess engine The Baron 3.42 can be downloaded. This looks like an interesting engine because of its strength and its support for Chess960.

Although originally written as a Winboard engine, The Baron now also runs as a UCI engine from the command line without the need for a WB2UCI adapter.

I'm trying to use The Baron 3.42 with PicoChess. So I copied the binary and the required companion file english.lng into /opt/picochess/engines/armv7l and ran engines.py from /opt/picochess/build. Unfortunately, this runs into an error which I don't understand.

Is this error perhaps due to any response that engines.py is not getting from the engine? Or should the engine author change something in his source code in order for it to work with PicoChess?

Traceback (most recent call last):
  File "./engines.py", line 26, in <module>
    write_engine_ini()
  File "/opt/picochess/uci/write.py", line 105, in write_engine_ini
    engine = UciEngine(file=engine_path + os.sep + engine_file_name, uci_shell=uci_shell)
  File "/opt/picochess/uci/engine.py", line 73, in __init__
    self.engine.uci()
  File "/usr/local/lib/python3.5/dist-packages/chess/uci.py", line 684, in uci
    return self._queue_command(command, async_callback)
  File "/usr/local/lib/python3.5/dist-packages/chess/uci.py", line 662, in _queue_command
    return future.result(timeout=FUTURE_POLL_TIMEOUT)
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 405, in result
    return self.__get_result()
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.5/dist-packages/chess/uci.py", line 682, in command
    raise EngineTerminatedException()
chess.engine.EngineTerminatedException
LocutusOfPenguin commented 6 years ago

Basically this script tries to start the engine. send "uci" to it and read the output to form this engine cache file. Thats almost nothing compared to real usage.

Since this seems to already brake, i dont have big hope for Baron. You can try to call yr file by hand , and type "uci" and see if it running OK this way (perhaps let it search abit). If yes, its prob more a python-chess problem. Lets see first.

djdekker commented 6 years ago

Hi Jürgen, Thanks for your advice. I tried it by hand and found that the engine responds correctly to the "uci" command. So, since nothing appears to be wrong with the engine.py script, I'll close this issue. DJ