Polyglot1.4.30b

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

Polyglot1.4.30b

Postby Michel » 02 Aug 2009, 20:05

This a new release of my polyglot tree.

The main change is that the difference between I/O handling in
WIN32 and POSIX has been completely abstracted.

Most of the polyglot source is now #if(n)def _WIN32 free. The
only files that still contain platform dependent code are

utils.h utils.c (small utilities)
pipex.h pipex_posix.c pipex_win32.c (the I/O abstraction layer)
io.h io.c (Fabien Letouzey's I/O code for posix)

The PG source has been ported to C. This was suggested by Eric Mullins
(who did it first in fact). This makes it somewhat easier to use PG on
embedded systems (E.M.'s hobby). Since PG doesn't use virtual
functions or any other high level C++ stuff the C port consists mostly
of trivial mechanical changes.

Other changes

I have added a lot more error checking. So PG will give meaningful error
messages instead of simply quitting. I have also added some more checks
for buffer overflows. More needs to be done here.

I have also tried to make PG robust against various bad things such as
the engine or the GUI crashing. PG and the engine should now exit
cleanly on such an event. I have also tried to eliminate all
situations where PG would end up in a busy wait state comsuming 100%
CPU time doing nothing.

E.M. has made various portability fixes to make this version of PG compile
cleanly on MSVC++ and on WIN9X. He has also suggested some new
options. The makefile for MSVC++ in the source is out of date
as E.M. is currently out of town. The makefile for mingw works fine.
On linux you would of course do simply

./configure
make
make install

Sources and binaries (.exe .deb and .rpm) are at the usual place.

http://alpha.uhasselt.be/Research/Algeb ... ot-release
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby H.G.Muller » 02 Aug 2009, 20:34

This seems a major step forward, and the switc of lnguage is a break with the past.

Wouldn't it be a good idea to call this Polyglot 2.0 ?

(Or 2.2.0: after all, it would be the UCI "half" of WinBoard 4.4.0... :wink: )
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Polyglot1.4.30b

Postby Michel » 03 Aug 2009, 07:19

Code: Select all
This seems a major step forward, and the switc of lnguage is a break with the past.

Wouldn't it be a good idea to call this Polyglot 2.0 ?

(Or 2.2.0: after all, it would be the UCI "half" of WinBoard 4.4.0... :wink: )


I assume one could. I wrote Fabien Letouzey once about bumping the version
number to 1.5 but he didn't reply which I guess really means he does not care,
since otherwise he would have asked to rename the project.

I also think it is not a problem for Debian legal since there are precedents.
toga2 1.4.1SE is in Debian even though Thomas Gaksch (who started
the Toga fork of Fruit) was not involved in it.

The change in language is not a big deal. The PG source was always
very C-ish (like the fruit/toga source). Changing it to genuine C mainly meant replacing some
consts by defines and

struct some_type_t {
}

by

typedef struct {
} some_type_t;
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby Volker Pittlik » 03 Aug 2009, 07:39

Michel wrote:...
On linux you would of course do simply

./configure
make
make install
...


I'm getting a compilation error here:

engine.c: In Funktion »engine_send_queue«:
engine.c:49: Fehler: Typkonvertierung gibt Feldtyp an
engine.c: In Funktion »engine_send«:
engine.c:61: Fehler: Typkonvertierung gibt Feldtyp an
make[1]: *** [engine.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/volker/schach/polyglot/polyglot-1.4.30b'
make: *** [all] Fehler 2

I hope you can decipher German. Or know how to change the make's output to English.

vp
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Polyglot1.4.30b

Postby Michel » 03 Aug 2009, 08:02

engine.c: In Funktion »engine_send_queue«:
engine.c:49: Fehler: Typkonvertierung gibt Feldtyp an
engine.c: In Funktion »engine_send«:
engine.c:61: Fehler: Typkonvertierung gibt Feldtyp an
make[1]: *** [engine.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/volker/schach/polyglot/polyglot-1.4.30b'
make: *** [all] Fehler 2

I hope you can decipher German. Or know how to change the make's output to English.


Sigh. I thought I had squashed all bugs.... :wink:

This clever one liner I inherited from the windows version. I always thought it looked suspicious but
it compiles and runs perfectly on my linux computers (and -Wall does not complain).
I will rewrite it but for the record what version of gcc are you using (gcc --version)?
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby Volker Pittlik » 03 Aug 2009, 08:27

Michel wrote:...for the record what version of gcc are you using (gcc --version)?


gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)


BTW: uname -a:

Linux vpittlik 2.6.24-24-generic #1 SMP Fri Jul 24 22:15:50 UTC 2009 x86_64 GNU/Linux


regards

vp
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Polyglot1.4.30b

Postby H.G.Muller » 03 Aug 2009, 09:00

Michel wrote:I also think it is not a problem for Debian legal since there are precedents.
toga2 1.4.1SE is in Debian even though Thomas Gaksch (who started
the Toga fork of Fruit) was not involved in it.

Getting it into Debian is a different issue, and I don't think the numbering would have much effect on that. 1.4.30b is also a different number from 1.4. I uess it is mainly a matter of convincing the Debian maintainer that this is a natural continuation of the line he is maintaining, and that it is better than the verion he is running now. And even if it would be considered a fork, giving it a wildly different number would only improve the chances for getting its own Debian line which will live next to the old one, e.g. polyglot2.

Of course we would prefer it to be merely "polyglot", so that people that apt-get install polyglot on their system will get this version by default. I think the fact that the old Polyglot does not support the new XBoard commands will lead to a very strong incentive to succeed it by this one.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Polyglot1.4.30b

Postby Charles Browne » 03 Aug 2009, 09:17

Tried running Piranha 0.5 here in the updated Polyglot 1.4.30b and the engine did load but wouldn't move on its own (had use own book set to true). May just be an isolated occurrence on this end though (unless others report the same) so didn't bother posting the polyglot log details.

Windows Me OS.
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Polyglot1.4.30b

Postby Michel » 03 Aug 2009, 09:57

gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)


BTW: uname -a:

Linux vpittlik 2.6.24-24-generic #1 SMP Fri Jul 24 22:15:50 UTC 2009 x86_64 GNU/Linux


Ok this was a 64bit problem. I could reproduce it. It turns out the clever windows code was not portable after all.
I have now written it the proper way. See here

http://alpha.uhasselt.be/Research/Algeb ... t-release/

for 1.4.31b.

Getting it into Debian is a different issue, and I don't think the numbering would have much effect on that. 1.4.30b is also a different number from 1.4. I uess it is mainly a matter of convincing the Debian maintainer that this is a natural continuation of the line he is maintaining, and that it is better than the verion he is running now. And even if it would be considered a fork, giving it a wildly different number would only improve the chances for getting its own Debian line which will live next to the old one, e.g. polyglot2.


I have worked with the PG maintainer of Debian in the past (Oliver Korff) to get Toga 1.4.1SE in. I assume there would be no fundamental problems of getting an upgrade of
PG into Debian. But perhaps it should be polyglot2 in that case.

Tried running Piranha 0.5 here in the updated Polyglot 1.4.30b and the engine did load but wouldn't move on its own (had use own book set to true). May just be an isolated occurrence on this end though (unless others report the same) so didn't bother posting the polyglot log details.


I know what the problem is with Piranha. In some cases it takes ^J as end of line instead of ^M^J (which is the standard on Windows). I have written to the author to ask him to fix this but he has not replied.

I could provide an option for PG to use ^J as EOL on Windows. But I am not sure it is worth it since Fonzy has already discovered a hack to make Piranha work (use inbetween.exe).
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby Charles Browne » 03 Aug 2009, 10:08

Michel wrote:
Tried running Piranha 0.5 here in the updated Polyglot 1.4.30b and the engine did load but wouldn't move on its own (had use own book set to true). May just be an isolated occurrence on this end though (unless others report the same) so didn't bother posting the polyglot log details.


I know what the problem is with Piranha. In some cases it takes ^J as end of line instead of ^M^J (which is the standard on Windows). I have written to the author to ask him to fix this but he has not replied.

I could provide an option for PG to use ^J as EOL on Windows. But I am not sure it is worth it since Fonzy has already discovered a hack to make Piranha work (use inbetween.exe).



If the problem with the Piranha chess engine is a Piranha problem and doesn't signify a problem with the non-cygwin1.dll Polyglots then I'm for just using the inbetween utility with the engine. (Speaking, of course, just for me.)


A quick question about your debug version of Polyglot. Is it to be used in place of the regular version when there is some sort of problem that requires more details to be written to the Polyglot log? Sorry for the probably obvious question.

Thanks
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Polyglot1.4.30b

Postby H.G.Muller » 03 Aug 2009, 12:04

Michel wrote:I have worked with the PG maintainer of Debian in the past (Oliver Korff) to get Toga 1.4.1SE in. I assume there would be no fundamental problems of getting an upgrade of
PG into Debian. But perhaps it should be polyglot2 in that case.

I had e-mailed Oliver Korff some time ago to try to interest him to maintain Fairy-Max, but I received no response so far. I hope we can convince him to add this to the main line. If it is upward compatible, and as at least stable as the old one, I don't see why not.

I know what the problem is with Piranha. In some cases it takes ^J as end of line instead of ^M^J (which is the standard on Windows). I have written to the author to ask him to fix this but he has not replied.

I could provide an option for PG to use ^J as EOL on Windows. But I am not sure it is worth it since Fonzy has already discovered a hack to make Piranha work (use inbetween.exe).

It is indeed better to do as little as possible of this. It will only add to the Babylonian confusion. As soon as a work-around option exists, authors will think it is a legitimate way to do things...
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Polyglot1.4.30b

Postby Michel » 03 Aug 2009, 12:51

I had e-mailed Oliver Korff some time ago to try to interest him to maintain Fairy-Max,


Sometimes Oliver Korff goes MIA :D But he has recently been quite active.

It would perhaps be easiest if you maintained Fairy-Max yourself. The process of becoming a maintainer seems
quite bureaucratic but I suspect it looks worse than it is.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby Michel » 03 Aug 2009, 12:56

A quick question about your debug version of Polyglot. Is it to be used in place of the regular version when there is some sort of problem that requires more details to be written to the Polyglot log? Sorry for the probably obvious question.


It is a build with ASSERT's turned on. So yes it might give more information if there is a problem.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby Volker Pittlik » 03 Aug 2009, 13:30

Michel wrote:...
Ok this was a 64bit problem. I could reproduce it. It turns out the clever windows code was not portable after all.
I have now written it the proper way. See here

http://alpha.uhasselt.be/Research/Algeb ... t-release/
...


OK it comopiles now and seems to work.

A stupid question: what are the differences between yours and Fonzy's version?

vp
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Polyglot1.4.30b

Postby F. Bluemers » 03 Aug 2009, 13:57

H.G.Muller wrote:
Michel wrote:I have worked with the PG maintainer of Debian in the past (Oliver Korff) to get Toga 1.4.1SE in. I assume there would be no fundamental problems of getting an upgrade of
PG into Debian. But perhaps it should be polyglot2 in that case.

I had e-mailed Oliver Korff some time ago to try to interest him to maintain Fairy-Max, but I received no response so far. I hope we can convince him to add this to the main line. If it is upward compatible, and as at least stable as the old one, I don't see why not.

I know what the problem is with Piranha. In some cases it takes ^J as end of line instead of ^M^J (which is the standard on Windows). I have written to the author to ask him to fix this but he has not replied.

I could provide an option for PG to use ^J as EOL on Windows. But I am not sure it is worth it since Fonzy has already discovered a hack to make Piranha work (use inbetween.exe).

It is indeed better to do as little as possible of this. It will only add to the Babylonian confusion. As soon as a work-around option exists, authors will think it is a legitimate way to do things...


Agreed,especially as the inbetween hack works so nicely.

Best
Fonzy
F. Bluemers
 
Posts: 175
Joined: 04 Sep 2008, 16:56
Location: Netherlands

Re: Polyglot1.4.30b

Postby H.G.Muller » 03 Aug 2009, 15:31

Michel wrote:It would perhaps be easiest if you maintained Fairy-Max yourself. The process of becoming a maintainer seems
quite bureaucratic but I suspect it looks worse than it is.

Actually I discovered yesterday (by Googling on "fairymax") that Fairy-Max is already in the Debian new packages queue, with maintainer Victor Legout. So I guess that poblem is already solved.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Polyglot1.4.30b

Postby Charles Browne » 05 Aug 2009, 18:31

This is the strangest thing.

I was trying out a gauntlet tournament in PSWBTM and I cannot get Hiarcs Paderborn single-processor version and Bright 0.4a to play a game together using Polyglot 1.4.31b (also not Polyglot 1.4.30b). Fonzy Bluemers version does o.k.

Hiarcs against other UCI engines tried will play a game in PSWBTM using 1.4.31b.
Bright against other UCI engines tried will also play a game in PSWBTM using 1.4.31b.


Bright and Hiarcs will not play a game in PSWBTM. After the second chess engine loads the only thing that shows up at the top of Winboard where the engine moves are usually shown is - {draw} 1/2-1/2.


In a two engine match using just the Winboard GUI, Bright and Hiarcs will play a game.

One thing I noticed with Polyglot 1.4.31b is that whenever a UCI engine is used, whether it be in a UCI engine against another UCI engine match, or a UCI engine against a Winboard engine, just briefly for the flash of a millisecond I can see the phrase - {draw} 1/2-1/2 - flashed in the area where the moves are shown, just before the regular chess engine moves are beginning to be shown there.

The above happens with the downloaded executable or my compile of the source codes. The above also happened with Winboard_X and the more recent Winboard 4.4.0 beta version.

Mean anything? Or just a problem on my end?

Also, nothing showed up in the log files indicating that something amiss had taken place.
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Polyglot1.4.30b

Postby Michel » 05 Aug 2009, 19:00

Mean anything? Or just a problem on my end?


This looks definitely like some kind of bug although I cannot possibly fathom what might cause it. I hope you can help me track it down.

Is it possible to post the Polyglot log files for Hiarcs and Bright when the game ends in an immediate draw?


Best regards,
Michel
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: Polyglot1.4.30b

Postby Charles Browne » 05 Aug 2009, 19:27

Rather than post all of the logs in this thread I uploaded the files.

http://rapidshare.com/files/264092063/files.zip

In the zip file are the Bright and Hiarcs Polyglot logs and also the PSWBTM debug file.

I copied all three files to a different directory before I aborted the tournament in PSWBTM. So what you are seeing in all three files is what was recorded when the - {draw} 1/2-1/2 - was shown in the Winboard GUI.

Any problems downloading the zip file I can try to upload it to somewhere else.
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Re: Polyglot1.4.30b

Postby Charles Browne » 05 Aug 2009, 19:54

The Polyglot files the above zip file has in it are the logs when using your regular Polyglot version. I should have used your debug version but I didn't think of it.

So I just used your debug version of Polyglot, with PSWBTM, and the Hiarcs log to me looked to be about the same as the log in the zip file I uploaded.

But this is all that was recorded in the Bright Polyglot log. Everything that was recorded.

Code: Select all
151.759 PolyGlot 1.4.31b by Fabien Letouzey (debug build)
151.759 POLYGLOT *** START ***
151.759 POLYGLOT INI file "bright04a.ini"
151.799 Adapter->Engine: uci
file "pipex_win32.c", line 335, assertion "strchr(szLineStr,'\r')==NULL" failed
152.312 POLYGLOT *** QUIT ***
152.312 POLYGLOT Calling exit
Charles Browne
 
Posts: 209
Joined: 26 May 2008, 00:30

Next

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 22 guests