Tinkering with Winboard

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Tinkering with Winboard

Postby Alessandro Scotti » 12 Mar 2005, 17:40

Hi all,
following a couple of recent threads in CCC, and because I need some extra features (see an old thread re: a match playing utility), I downloaded Winboard sources and played with them for a couple of hours, as that seemed easier than rewriting a lot of code from scratch.
As an experiment, I added a couple of features to it:
1) you can tell Winboard when an engine is using absolute scores, and if so it will negate the score when the engine plays black;
2) you can have score and depth saved in a comment after each move.
I was about to add something I miss a lot, i.e. the ability of just pasting from the clipboard and have the program autodetect whether it's a game or a position but then my wife commanded to stop!
Anyway, you can find the modified sources (30/40 lines total) and a compiled version (from my development environment, so that may work or not) at this address:

http://www.ascotti.org/programming/ches ... oard_x.zip

I think I'll continue to play with Winboard for a while, please let me know what you think and if there are some features you would like to see.

P.S. You can use a diff program to see the source differences (there is one on my site) or look for the "[AS]" string.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Different time controls?

Postby Greg Simpson » 15 Mar 2005, 10:22

The feature I've missed the most from Winboard is the ability to use different time limits for black and white. This would be useful as a handicap in human vs. computer games, and would make it easier to see how the strength of an engine scales with computing power.

It would also be a partial solution to what Dan_the_K was asking for in another thread in this forum.

This probably isn't as easy as it sounds, though.
Greg Simpson
 
Posts: 29
Joined: 05 Oct 2004, 06:07
Location: Irvine, CA, USA

Re: Tinkering with Winboard

Postby Alessandro Scotti » 16 Mar 2005, 23:59

As I managed to polish the thing a little, we're getting close to having good support of chess fonts in Winboard. This last version is as fast as the standard Winboard and I'm now using the white color from the board options (black for the piece outline and the character set are still hardcoded).
This allows for some refreshingly different looks, I bet few would tell this is Winboard by looking at the board only:

http://www.ascotti.org/programming/chess/zip/xboard4.jpg

(FYI this is made with font Chess Marroquin, a green stone turned white for the light squares and a white marble turned green for the dark squares).
As usual the sources (only those changed from version 4.2.7) and a test build can be downloaded from:

http://www.ascotti.org/programming/chess/zip/winboard_x.zip

(zip size is 818K now).

P.S: For Winboard fans, did you know Tim Mann's business card is hidden into the program? If not and you are now curious then do as follows: 1) run Winboard; 2) edit the game tags; 3) enter "Easter Egg Hunt" in the Event tag; 4) close the window and bring out the about box...
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Naum » 17 Mar 2005, 22:54

Hey Alessandro,

I like the score/eval in the move comments change.
I don't care much about cosmetics since I don't use Winboard to play games myself, but there is something that would be very usefull to me and other developers.

I use Winboard to run test games. It would be a great time saver if Winboard could have auto-adjudicate option. I am not using the latest Winboard, but my version doesn't have it.

I would like to say something like: if absolute score is < X for at least Y moves then adjudicate as draw. X and Y should be configurable in winboard.ini
Something similar also for win/loss adjudication.

Thanks,
Alex
Naum
 
Posts: 87
Joined: 10 Oct 2004, 04:23
Location: Toronto

Re: Tinkering with Winboard

Postby Daniel Mehrmann » 17 Mar 2005, 23:13

Hello Alessandro,

your winboard addons looks like nice :)
If you're agree i wanna distribute some parts of your addons to the offical winboard source.

daniel
greetings
Daniel
User avatar
Daniel Mehrmann
 
Posts: 127
Joined: 02 Oct 2004, 06:10
Location: Germany

Re: Tinkering with Winboard

Postby Alessandro Scotti » 17 Mar 2005, 23:19

Naum wrote:I would like to say something like: if absolute score is < X for at least Y moves then adjudicate as draw. X and Y should be configurable in winboard.ini
Something similar also for win/loss adjudication.


Hi Alex, that's a nice feature and at first glance seems doable. I'll try to add it after asymmetric time controls.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Alessandro Scotti » 17 Mar 2005, 23:25

Daniel Mehrmann wrote:your winboard addons looks like nice :)
If you're agree i wanna distribute some parts of your addons to the offical winboard source.


Hi Daniel,
glad you like it! :D Of course I would be happy to contribute to the official source, if there are some parts you find more interesting it's probably a good idea to spend some additional time for reviewing and cleaning them up a little though.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Guenther Simon » 18 Mar 2005, 08:10

Naum wrote:
I would like to say something like: if absolute score is < X for at least Y moves then adjudicate as draw. X and Y should be configurable in winboard.ini
Something similar also for win/loss adjudication.


Hi Alex, that's a nice feature and at first glance seems doable. I'll try to add it after asymmetric time controls.


Oh yes and please the same for manual adjudication :)
I see there is already something for 'Adjourn' (F7) implemented,
but AFAIK it has no functionality so far?
My wish would be that a tournament manager can press the already
given 'Adjourn' and an box with desired result would pop up, or similar.

Best wishes,
Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: Tinkering with Winboard

Postby Alessandro Scotti » 18 Mar 2005, 10:07

Guenther Simon wrote:I see there is already something for 'Adjourn' (F7) implemented,
but AFAIK it has no functionality so far?


Hi Guenther, it seems that command just sends the string "adjourn" to an ICS server.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Daniel Mehrmann » 18 Mar 2005, 22:50

Alessandro Scotti wrote:
Daniel Mehrmann wrote:your winboard addons looks like nice :)
If you're agree i wanna distribute some parts of your addons to the offical winboard source.


Hi Daniel,
glad you like it! :D Of course I would be happy to contribute to the official source, if there are some parts you find more interesting it's probably a good idea to spend some additional time for reviewing and cleaning them up a little though.


Well, you're right of course. That the source looks really bad is history based.
At the beginning it was not planed that xboard would be a interface for chess programs. Chessprograms ? What are chessprograms ? There were only big mainframes and mephisto at the beginning of xboard ;)

So, the authors only add line by line over the years.
If you're reading the source you're may do a journey to roots of computerchess.

Well, its not so easy to cleanup x/winboard. At our developer group we are talking about to writing this software from sratch.

daniel
greetings
Daniel
User avatar
Daniel Mehrmann
 
Posts: 127
Joined: 02 Oct 2004, 06:10
Location: Germany

Re: Tinkering with Winboard

Postby Alessandro Scotti » 19 Mar 2005, 01:29

Daniel Mehrmann wrote:So, the authors only add line by line over the years. If you're reading the source you're may do a journey to roots of computerchess.

Well, its not so easy to cleanup x/winboard. At our developer group we are talking about to writing this software from scratch.


Hi Daniel,
it is a fascinating journey indeed! :D I've seen parts dedicated at fixing incorrect behavior of Arasan 4 or Crafty 9 for example! :shock:
My comment re: polishing the source code was towards my own code, with the purpose of integrating it better with the rest. IMHO the code is still in pretty good shape, which is making my work easier than I was expecting. For small changes the biggest problem is using bare C: I've had to write a lot of code that would have taken only few lines of Delphi for example.
Actually, I'm seriously considering to rewrite some parts of the GUI in Delphi (or maybe Java for non Windows systems) and put it in a DLL or even a separate process. This would prove very useful when adding, for instance, support for options provided by engines, where you need to build the corresponding GUI on the fly.

Anyway, there is a new version ready at the usual address. Support for textures and fonts is 99% complete, and there are now so many parameters that a GUI for this part would be really helpful. I've tried to provide good defaults for all settings though, so the thing should work without too many problems. For example, the program knows some of the most common fonts and is able to provide the proper character map automatically. I think the board looks really good now, fonts are slighly shaded and the gap between the squares can be reduced if needed, which can improve the look with some textures.

Next on the todo list are:
- asymmetric time control;
- automatic adjudication.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Tinkering with Winboard

Postby Dan-the-K » 20 Mar 2005, 01:25

Allesandro:

I just expanded and installed your routine and find it very easy to use. For me, the most important feature is evaluating positions and giving a score (maximum one per move).

As you noted in a message, it doesn't do this for every move. When does it evaluate and when doesn't it? For the one game I've analyzed, I would guess that it doesn't evaluate when its in book, but does evaluate after.

Dan
Dan-the-K
 

Re: Tinkering with Winboard

Postby Alex Guerrero » 20 Mar 2005, 08:33

Hi Alessandro:

Great job! Winboard will not be recognize.

I have problems with the fonts;
here an link:
http://usuarios.lycos.es/alexwbtm/Test/

Excuse me If i am wrong.
omvrwl are fonts without contours.
pnbrqk are only contours.
they might be mixed as caps, or where is my error?

Regards.
Alex Guerrero
 
Posts: 53
Joined: 02 Oct 2004, 06:38
Location: Sinaloa Mexico

Re: Tinkering with Winboard

Postby Alessandro Scotti » 20 Mar 2005, 21:58

Dan-the-K wrote:I just expanded and installed your routine and find it very easy to use. For me, the most important feature is evaluating positions and giving a score (maximum one per move).

As you noted in a message, it doesn't do this for every move. When does it evaluate and when doesn't it? For the one game I've analyzed, I would guess that it doesn't evaluate when its in book, but does evaluate after.


Hi Dan,
I use the last PV that comes with depth > 0. Moves that are often reported with depth = 0 (i.e. not searched) are book moves and forced moves (i.e. only one move possible). Maybe some engines do this for forced recaptures or other situations too.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Alessandro Scotti » 20 Mar 2005, 22:09

Alex Guerrero wrote:I have problems with the fonts;
here an link:
http://usuarios.lycos.es/alexwbtm/Test/

Excuse me If i am wrong.
omvrwl are fonts without contours.
pnbrqk are only contours.
they might be mixed as caps, or where is my error?


Hi Alex,
it seems that your problems are caused by incorrect font rendering at small sizes, which in turn breaks the algorithm I'm using to translate fonts into bitmaps. In particular, the white bishop and knight (and possibly other pieces) have small "holes" in their contour, so I cannot determine it exactly. There could be a workaround for these cases though, I'll try and if it works it will be in the next release.
The problem should disappear at larger sizes, and/or with different fonts, is this true for you?
As for the font letters, they depend entirely on the font. Those in your examples should all work ok, except for the caps in the last one, which are used to render pieces placed on dark squares (a feature that is only useful in text diagrams).
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Alessandro Scotti » 21 Mar 2005, 01:41

Hi folks,
there is yet another update at the usual location. This will probably be the last for a while, except for bug fixes and possible minor touches. I will now recompile the program on Linux and start using the new version, to give it some test.
I've tried to add automatic and user adjudication, and also asymmetric time control. The latter is tough, as there are many places in the program that assume a single value for the time control, and I don't know the program so well to fix them all. So I've put in just the bare minimum, which should be enough for an "handicap" game. To enable it, use the normal time control dialog but enter two times separated by "/". White takes the first value, black the second. So "2/3" means 2 minutes for white and 3 minutes for black.
Some features has been left out from this short development cycle, e.g. display of long PVs or two PVs. I think these and similar features are better handled in a different way, on which I'll probably post in a separate thread.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Re: Tinkering with Winboard

Postby Alex Guerrero » 21 Mar 2005, 04:53

Yes; The pieces are correct with fonts as Chess Usual, Chess Motif and Chess Mark with large sizes.

About new version. It does not function for me (windows xp).

Here some nice textures.
http://usuarios.lycos.es/alexwbtm/Test/

bye Fritz, bye chessmaster, bye Arena, only winboard...

Regards.
Alex Guerrero
 
Posts: 53
Joined: 02 Oct 2004, 06:38
Location: Sinaloa Mexico

Re: Tinkering with Winboard

Postby Alessandro Scotti » 21 Mar 2005, 09:54

Alex Guerrero wrote:
About new version. It does not function for me (windows xp).


Hi Alex,
do you refer to the font problem or the whole program? The font fix I was thinking of doesn't work, so that would be expected, but I'm worrying about the rest!

BTW thanks a lot for the textures, I was looking for some! :D I think now I won't be able to resist implementing a simple "theme" manager in the GUI...
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Minutes:seconds don't work

Postby Greg Simpson » 21 Mar 2005, 09:57

Alessandro, you seem to have disabled time controls like 3:00 for three minutes. Entering one causes an illegal instruction error. Since that is how I had my time control set up, I couldn't run the new Winboard at all until I re-installed it.

I don't have much chance of beating these engines if I have to give them a whole minute.:?

Running Windows 98 on AthlonXP
Greg Simpson
 
Posts: 29
Joined: 05 Oct 2004, 06:07
Location: Irvine, CA, USA

Re: Minutes:seconds don't work

Postby Alessandro Scotti » 21 Mar 2005, 11:28

Greg Simpson wrote:Alessandro, you seem to have disabled time controls like 3:00 for three minutes. Entering one causes an illegal instruction error. Since that is how I had my time control set up, I couldn't run the new Winboard at all until I re-installed it.

I don't have much chance of beating these engines if I have to give them a whole minute.:?

Running Windows 98 on AthlonXP


Hi Greg,
it's my fault as I've let a bug slip in after a change and forgot to test the parser again. I'll fix it when I go home this night.
User avatar
Alessandro Scotti
 
Posts: 306
Joined: 20 Nov 2004, 00:10
Location: Rome, Italy

Next

Return to Winboard and related Topics

Who is online

Users browsing this forum: Google [Bot] and 9 guests