A question about sending commands from engines to winboard

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

A question about sending commands from engines to winboard

Postby Uri Blass » 31 Oct 2004, 19:32

I can tell winboard paste position from clipboard to show me a specific position.

Can I tell my engine to tell winboard the same thing and if yes how can I do it?

I think about giving humans to solve some test positions when I use winboard as a graphic interface but I simply do not know how to do it.

It may be productive if someone can post a C program that simply tell winboard to show the user some positions and ask the user questions that he can reply by yes or no and give the user a score for the answers.

The program even does not need to know the chess rules and can only remember the right answers.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A question about sending commands from engines to winboa

Postby Sune Fischer » 01 Nov 2004, 08:07

I don't think there is an easy way to do what you want, the WB protocols does not give an engine the posibility to do things like that.

Maybe it can be done indirectly by creating a third program to control winboard. The engine could then control the thing that controled winboard.

That is assuming winboard can be controled on-the-fly and not just through the arguments to main().

This is probably one of the reasons why some people write their own GUI though, to get exactly what they want. I'm writing one myself, with a kind of communication form you need here.
Instead of a typical GUI is master and engine is slave design, the engine and GUI will be equals in a sense. The engine can take control and send setboard commands back to the GUI for instance.

-S.
User avatar
Sune Fischer
 
Posts: 126
Joined: 07 Oct 2004, 11:12
Location: Denmark

Re: A question about sending commands from engines to winboa

Postby Uri Blass » 01 Nov 2004, 11:23

Writing a gui is exactly what I did not want to do.
I know nothing about graphic and I thought that existing free tools can help me.

I thought that basically a program is able to do everything that humans can do with the keyboards and the mouse(I even do not need the mouse and alt shift+V after copy the right position to clipboard is enough) and I thought that it should be easy at least to tell winboard to show specific positions.

What commands do I tell the computers when I press alt shift+V?

I think that there should be a function in the library that does the commands and winboard should display the relevant position if I tell the computer.

copyto_clipboard(rnbqkbnr/ppp1pppp/8/3p4/3P4/8/PPP1PPPP/RNBQKBNR w KQkq d6 0 2);
human_input(alt+shift+V);

copyto_clipbopard and human_input should be library functions.

This is important not only for winboard and for chess.
It can save work of humans who need to do the same job again and again by entering the same human input to the computer in some programs.

There are many programs that when you start them you need to choose between some options.

If you always choose the same option then it is better to have a program that choose the same option for you.

Is it so hard to write the relevant library functions that I talk about?

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A question about sending commands from engines to winboa

Postby Michael Yee » 01 Nov 2004, 16:26

Uri,

I don't know exactly what you're trying to do, but if you know how to start a process (and have access to its standard in/out), maybe you could try the following:

(1) Write a script for windows script host (WSH) in javascript that programmatically controls a currently running winboard instance. For example, you can send wb keyboard commands like alt-shift-v

(2) Write a WSH script that pops up a message box to get input from the person

(3) From your engine, call script 1 to load a position in wb

(4) From your engine, call script 2 to get human input

However, I think Sune is right--if you need a lot of control over the interaction with the user, it might be easist to write your own GUI or at least use an existing GUI component (e.g., I think they exists for visual basic).

Michael
Michael Yee
 
Posts: 51
Joined: 26 Sep 2004, 19:49

Re: A question about sending commands from engines to winboa

Postby Pallav Nawani » 01 Nov 2004, 18:51

Hello,

FICS has a lecturebot which does these kind of things. But it may not be possible to conduct an exam using that. There are also Freeware GUIs which can do the same thing that FICS lecturebot does. Visit
http://www.freechess.org/

For FICS GUIS which play lecture bot's lectures. One simple GUI which can do this is winbot.

http://webplaza.pt.lu/public/ckaber/Chess.htm


Hope this is what you're looking for.
Best regards,
Pallav
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: A question about sending commands from engines to winboa

Postby Uri Blass » 01 Nov 2004, 22:23

Michael Yee wrote:Uri,

I don't know exactly what you're trying to do, but if you know how to start a process (and have access to its standard in/out), maybe you could try the following:

(1) Write a script for windows script host (WSH) in javascript that programmatically controls a currently running winboard instance. For example, you can send wb keyboard commands like alt-shift-v

(2) Write a WSH script that pops up a message box to get input from the person

(3) From your engine, call script 1 to load a position in wb

(4) From your engine, call script 2 to get human input

However, I think Sune is right--if you need a lot of control over the interaction with the user, it might be easist to write your own GUI or at least use an existing GUI component (e.g., I think they exists for visual basic).

Michael


I do not know how to start a process and I have no idea how to write my own GUI.

I do not agree that the easiest thing is to write my own GUI.
It seems to me very hard to work on my own GUI because I have no idea how to start.
I also thing that writing a gui is a deterministic task so I see no reason that every programmer has to reinvent the wheel.

I thought to write some program that maybe can help humans to learn to play chess better but I even cannot test it on players that I know if I cannot write a program to show them diagrams and ask them questions
and respond based on their reply.

I have no program to ask questions at this moment and without the possibility to show diagrams to the user, I have no motivation to think about the relevant diagrams and the relevant questions .


Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A question about sending commands from engines to winboa

Postby Michael Yee » 03 Nov 2004, 14:10

Uri Blass wrote:I do not know how to start a process and I have no idea how to write my own GUI.

I do not agree that the easiest thing is to write my own GUI.

I agree writing a GUI isn't necessarily easy (especially the first time). But if no existing tools can easily do what you want them to do (show a position and gather input from users), it might be the only way.

I think the best option for you (assuming you don't want to learn GUI stuff right now) is to find someone willing to make one for you. I wouldn't mind coding one up myself (in java-- assuming I could start a process for your engine and communicate with it through standard I/O), since I'm also interested in tutorial kind of chess software (e.g., visualization).

Michael
Michael Yee
 
Posts: 51
Joined: 26 Sep 2004, 19:49


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 26 guests