[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[computer-go] Named pipes in Windows work well with kgsGTP



Another update on my adventures as Windows programmer using gtp.

The console solution did not work well because Delphi consoles do not
allow non-console Windows to open. In a way this quite logical. This
meant that my program would not be allowed to output anything at all,
which would be terrible hard task to fix.

I therefore tried named pipes again and this time it worked. I used the
same code to read and write from the pipes as I used for the
consoleversion, and now it worked. One good thing to do was probably to
call ConnectNamedPipe which waits for the other process to connect to
the other end of the pipe.

If anyone wants to see the code let me know.

I have now implemented a fully functional connection to KGS. There are
probably some bugs left. And other things that could be improved such as
recovery from exceptions.

But my conclusion is that it is easy (if you know how to do it) to use
GTP together with a program such as kgsGTP. But only with named pipes!

One thing I have not tried yet is to spawn a childprocess (e.g. gnugo)
and connect that way. Anyway my view now is that good
gtp-implementations should support named pipes. That way
window-programmers would have an easy time if there also some
documentation on how to do it.

You can now play with viking4 on KGS in the computer room (well until
something crashes that is). 

--
Magnus Persson
Center for Adaptive Behavior and Cognition

_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go