Is it possible to call an engine (fx stockfish) from a compiled QB64 basic-program with the [url]https://www.qb64.org/wiki/CHAIN command?
I want the positions in a game analysed for x seconds and get the score and the main line in return.
Call an engine from BASIC?!
Moderators: hgm, Rebel, chrisw
-
- Posts: 267
- Joined: Thu Jul 07, 2011 10:31 pm
- Location: Denmark
-
- Posts: 91
- Joined: Sat Nov 02, 2019 6:42 pm
- Full name: ɹǝƃɹǝqǝᗡ ǝɔnɹꓭ
-
- Posts: 267
- Joined: Thu Jul 07, 2011 10:31 pm
- Location: Denmark
Re: Call an engine from BASIC?!
Thanks.
So you think it is possible with SHELL?!
Do you know what the parameters should look like?
Or where I can read about it?
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Call an engine from BASIC?!
The link he gave is the manual page.
It includes syntax and example code.
It includes syntax and example code.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 2559
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: Call an engine from BASIC?!
but how does it help you loading and communicating with an engine?
you need to create a new process for the engine, setup pipes so that you can communicate with it. depending on what you actually need, it may be a good idea to have a thread for blocking reads to be able to process engine output in the background etc.
executing engine binary itself won't help, unless you can tell it to do something via commandline. if you need more commands, this would be horribly inefficient
-
- Posts: 267
- Joined: Thu Jul 07, 2011 10:31 pm
- Location: Denmark
Re: Call an engine from BASIC?!
Thanks; I know.Dann Corbit wrote: ↑Sun May 24, 2020 9:12 pm The link he gave is the manual page.
It includes syntax and example code.
But I don't know what Stockfish requires to communicate.
-
- Posts: 267
- Joined: Thu Jul 07, 2011 10:31 pm
- Location: Denmark
Re: Call an engine from BASIC?!
I would like to put this function into a single program:mar wrote: ↑Sun May 24, 2020 10:57 pmbut how does it help you loading and communicating with an engine?
you need to create a new process for the engine, setup pipes so that you can communicate with it. depending on what you actually need, it may be a good idea to have a thread for blocking reads to be able to process engine output in the background etc.
executing engine binary itself won't help, unless you can tell it to do something via commandline. if you need more commands, this would be horribly inefficient
[url]http://talkchess.com/forum3/viewtopic.p ... 21#p483721
-
- Posts: 91
- Joined: Sat Nov 02, 2019 6:42 pm
- Full name: ɹǝƃɹǝqǝᗡ ǝɔnɹꓭ
Re: Call an engine from BASIC?!
This: https://en.wikipedia.org/wiki/Universal_Chess_InterfaceJBNielsen wrote: ↑Mon May 25, 2020 12:24 amThanks; I know.Dann Corbit wrote: ↑Sun May 24, 2020 9:12 pm The link he gave is the manual page.
It includes syntax and example code.
But I don't know what Stockfish requires to communicate.
-
- Posts: 12542
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Call an engine from BASIC?!
You can use the bench command to have Stockfish process one or more EPD records.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 267
- Joined: Thu Jul 07, 2011 10:31 pm
- Location: Denmark
Re: Call an engine from BASIC?!
I have tried it manually and it works fine (though my old SF does not know the 'movetime' parameter).Dann Corbit wrote: ↑Mon May 25, 2020 2:49 am You can use the bench command to have Stockfish process one or more EPD records.
Thanks; perhaps I can use that.