Skip to content

Problem with io redirection #4624

Answered by vondele
laguvajra asked this question in Q&A
Jun 15, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

as you redirect the input, that input file is closed by the OS as soon as all input is sent. Once the input is closed SF will stop and quit the search.

I would recommend to use python-chess for interaction with an UCI engine, but just keeping the input open until you see bestmove in the output works as well.

The easiest might be to send a ucinewgame after the go command, which will wait until the search finishes.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by laguvajra
Comment options

You must be logged in to vote
1 reply
@Disservin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants