Article View: gnu.chess
Article #2887Re: Communication to chess engines
From: Tim Mann
Date: Tue, 19 Jan 1999 00:00
Date: Tue, 19 Jan 1999 00:00
50 lines
2653 bytes
2653 bytes
WinBoard communicates with a chess engine by creating two anonymous pipes and setting them up to be the standard input and standard output of the engine. It then writes commands to the first and reads responses from the second. The tricky aspect of this is that WinBoard has to do the reads (and writes) in a non-blocking fashion so that the GUI does not freeze while waiting for the engine to do something. This can be done using either multiple threads or polling. WinBoard uses multiple threads. Most of the Windows primitives you mention have to do with polling, which can work too, but (in my opinion) is messier. I can't tell you whether the necessary primitives for doing threads or polling are available in Visual Basic. I rather doubt it, but as I know nothing about Visual Basic, I'm just guessing here. Once you've figured out what Windows primitives to use and how to get at them from Visual Basic, you then still have a challenging programming problem to implement the UI side of the WinBoard UI/engine communication protocol. It sounds like you may not have enough expertise to tackle this yet. --Tim In article <7828cf$r3p$1@mailusr.wdf.sap-ag.de>, Ulrich Kreichgauer <ulrich.kreichgauer@sap-ag.de> wrote: >Hi, >I have a question concerning the communication between Winboard and the >chess engines (no matter which one...). >I want to start a chess engine and communicate with this engine not using >Winboard, but a self written program (using VBasic). I read lots of help >files but don't know how to do it - seems that you have to use some WinAPIs >like PeekNamedPike, GetNumberOfConsoleInputEvents, WaitForSingleObject or >whatever. >I think the information is hidden in the Winboard coding, but in the C >training classes I dropped out after the malloc command... > >Does someone know how to do it and would give me a brief example (e.g. first >you have to use Alpha with parameter Olga to get the information..., then >start WinAPI Omega with parameter Boris, at the end you can leave the engine >using Omicron Delta...) > >Thanx >Ulrich > > -- Tim Mann <mann@pa.dec.com>, Compaq Systems Research Center http://www.research.digital.com/SRC/personal/Tim_Mann/
Technical Details
Message-ID:
<7830p8$s2c@src-news.pa.dec.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7828cf$r3p$1@mailusr.wdf.sap-ag.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,4507f6c786f2573d X-Google-Attributes: gid10d71d,public From: mann@src.dec.com (Tim Mann) Subject: Re: Communication to chess engines Date: 1999/01/19 Message-ID: <7830p8$s2c@src-news.pa.dec.com> X-Deja-AN: 434575904 References: <7828cf$r3p$1@mailusr.wdf.sap-ag.de> Organization: Compaq Systems Research Center Newsgroups: gnu.chess