Page 1 of 1

How do I get a VB Express 2008 engine winboard compatible?

PostPosted: 04 May 2009, 15:30
by jacobbl
Hi, I have a problem with getting my chess engine to run with winboard. It is programmed i VB Express 2008. My problem is that I can't get any comunication between my program and winboard. I tried du use the dubug mode in Arena, but I've never managed to send a command from my program to Arena.

I have asked this question once before, and got som help, but I never got the source code I retrieved to work.

If anybody could help me with some source code (written in VB Express 2008) that just states the name of the engine, moves e2e4 wait for an answer and then moves d2d4 Iwould be very greatful. I've wasted a lot of hours on this problem instead of making the enginge better :(
It would be fun to try my engine against other engines without having to play each move manually.

Regards Jacob

Re: How do I get a VB Express 2008 engine winboard compatible?

PostPosted: 04 May 2009, 20:13
by Rohan Padhye
You might want to read Hints on Input/Output - Winboard Protocol. It could be a problem with buffered I/O. Make sure to to end all your messages to standard output with a newline "\n" and then flush the buffer, if any. In case of reading buffered input, don't use schemes that depend on the press of the return key or something... As soon as you encounter a newline character '\n', it means that is the end of the message that is being sent to you so read the entire line and flush the buffer. I don't know how VB programs access standard I/O so I can't help you platform-specifically.

Re: How do I get a VB Express 2008 engine winboard compatible?

PostPosted: 05 May 2009, 00:02
by Dann Corbit
There are zero total VB Express chess engines.

Here is a VB 6 chess engine. Perhaps something in there can help you:
http://cap.connx.com/chess-engines/new- ... RSENVB.ZIP

Module IOBAS accesses the Windows functions from kernel32.lib to get console input and output

Module LarsenVBBas has function:
Public Sub ParseCommand(ByVal sCommand As String)
which processes the Winboard commands.

Most likely, the problem is buffering.

Re: How do I get a VB Express 2008 engine winboard compatible?

PostPosted: 07 May 2009, 15:33
by jacobbl
Thanks for your help. I still can't get it to work with the api calls, but I used the system.console.readln and system.console.writeln functions, and these seem to work fine. I've played a couple of games and I haven't encountered any problems so far :-)

So I hope in a short time I will have implemented enough winboard functions for the engine to play multiple games automatic.

Regards Jacob

Re: How do I get a VB Express 2008 engine winboard compatible?

PostPosted: 07 May 2009, 18:38
by Rohan Padhye
If you can communicate even a single command to and from winboard it means your interfacing is fine, so now just concentrate on developing your engine and then supporting as many winboard commands as possible to maximise your engine's features. If you find it difficult to test your engine in console mode, then only implement those features that you need to adequately test your engine out on the real winboard (eg. moves, thinking, time controls, etc.)