UCI2WB "replacement" project news

Archive of the old Parsimony forum. Some messages couldn't be restored. Limitations: Search for authors does not work, Parsimony specific formats do not work, threaded view does not work properly. Posting is disabled.

UCI2WB "replacement" project news

Postby Fabien Letouzey » 23 Mar 2004, 11:57

Geschrieben von:/Posted by: Fabien Letouzey at 23 March 2004 11:57:46:


Hello,
A bit of news about my UCI adapter, PolyGlot. Please note that
PolyGlot does not run on Windows yet!
Functionally, it is similar to UCI2WB. It "connects" an UCI engine to
xboard (Winboard for non-Windows platforms). It is more complex
though; for instance, it detects and reports draws by rule. UCI2WB
does not know the rules of chess and cannot do this.
I have mainly two pieces of bad news already, sorry for that :(
1)
The Windows port is going to be even more of a problem than I first
thought. I had planned to "simply" compile it using Windows GCC as a
first step. This had the advantage (for me) of not requiring
Windows-specific code. Dann told me though that the CYGWIN.DLL,
necessary in this case, implements multitasking in a very naive way.
As of now, it is hard to tell what the consequences are really going
to be. My guess is that more memory will be used, and launching the
engine at startup will be slower than necessary. I will make sure the
PolyGlot uses little memory though, and I can't believe it ever
requires more than 1 MB.
The only way to find out is to try it! If you know a Windows GCC
guru, please ask him to contact me (or post here). Otherwise I will
ask Dann some tonight or later this week.
2)
I have just noticed a *big* problem with implementing pondering. I
don't want to explain the details here, but xboard and UCI pondering
are "incompatible". To work around this problem, PolyGlot would need
to maintain its own game clocks, which are lacking at the moment.
That would be a lot of work, and I don't want to add any major
features now.
So, no pondering for some time ... I still think many Winboard users
would benefit from analysing and ponder-off matches ...
---
OK, I felt it was fairer to talk about the bad news first. I now have
some good news.
I am making good progress. PolyGlot handles all time controls, and
does not have the UCI2WB "move-number" bug. It can also read "engine
INI files" similar to UCI2WB.
IMO PolyGlot is nearly "usable" now except that pondering should never
been used. I intend to cleanup the code and test it in the next few
days.
I would be interested in knowing what Winboard users would do with it,
if it were successfully ported to Windows. Is it mainly to be able to
use commercial programs with Winboard, or to add UCI-only engines in
Winboard tournaments?
Leo, maybe you can tell me more about your tournament software?
Bye for now,
Fabien.
Fabien Letouzey
 

Re: UCI2WB "replacement" project news

Postby Igor Gorelikov » 23 Mar 2004, 12:41

Geschrieben von:/Posted by: Igor Gorelikov at 23 March 2004 12:41:33:
Als Antwort auf:/In reply to: UCI2WB "replacement" project news geschrieben von:/posted by: Fabien Letouzey at 23 March 2004 11:57:46:

I would be interested in knowing what Winboard users would do with it,
if it were successfully ported to Windows. Is it mainly to be able to
use commercial programs with Winboard, or to add UCI-only engines in
Winboard tournaments?
I'm interested in UCI2WB adapter to add UCI-only engines in Winboard tournaments.
regards,
Igor
http://www.digichess.gr/infiniteloop/home.php
Igor Gorelikov
 

Re: UCI2WB "replacement" project news

Postby Fabien Letouzey » 23 Mar 2004, 13:03

Geschrieben von:/Posted by: Fabien Letouzey at 23 March 2004 13:03:40:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Igor Gorelikov at 23 March 2004 12:41:33:

I'm interested in UCI2WB adapter to add UCI-only engines in Winboard tournaments.
regards,
Igor
Are you using UCI2WB at the moment, or is it causing you too much grief?
Details could help me knowing of potential problems before they occur.
I can't resolve the address "www.digichess.gr" at all.
Is it correct?
Fabien.
Fabien Letouzey
 

Re: UCI2WB "replacement" project news

Postby Igor Gorelikov » 23 Mar 2004, 13:23

Geschrieben von:/Posted by: Igor Gorelikov at 23 March 2004 13:23:32:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Fabien Letouzey at 23 March 2004 13:03:40:

Are you using UCI2WB at the moment, or is it causing you too much grief?
Details could help me knowing of potential problems before they occur.
I can't resolve the address "www.digichess.gr" at all.
Is it correct?
Fabien.
I have used Pfister's adapter for games with SOS 3/4 untill I encounter a big problem: while two UCI engines play vs each other theyr can repeate position million times. So that breaks my automated tournaments.
Currently I use Arena for events with UCI engines but I would be glad to use more "light" utility which eat less memory.
Yes, it is correct.
Igor
Igor Gorelikov
 

Re: UCI2WB "replacement" project news

Postby Fabien Letouzey » 23 Mar 2004, 13:33

Geschrieben von:/Posted by: Fabien Letouzey at 23 March 2004 13:33:17:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Igor Gorelikov at 23 March 2004 13:23:32:

I have used Pfister's adapter for games with SOS 3/4 untill I encounter a big problem: while two UCI engines play vs each other theyr can repeate position million times. So that breaks my automated tournaments.
Currently I use Arena for events with UCI engines but I would be glad to use more "light" utility which eat less memory.
OK, this is a known problem :)
I am already taking care of this.
How much memory does Arena use for itself in a typical match?
Do opening books have something to do with it?
Fabien.
Fabien Letouzey
 

Re: UCI2WB "replacement" project news

Postby Igor Gorelikov » 23 Mar 2004, 13:39

Geschrieben von:/Posted by: Igor Gorelikov at 23 March 2004 13:39:30:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Fabien Letouzey at 23 March 2004 13:33:17:
How much memory does Arena use for itself in a typical match?
Do opening books have something to do with it?
Arena uses 23 Mb of RAM and 1 per cent of CPU.
They don't.
Igor
Igor Gorelikov
 

Re: UCI2WB "replacement" project news

Postby Fabien Letouzey » 23 Mar 2004, 13:44

Geschrieben von:/Posted by: Fabien Letouzey at 23 March 2004 13:44:59:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Igor Gorelikov at 23 March 2004 13:39:30:

How much memory does Arena use for itself in a typical match?
Arena uses 23 Mb of RAM and 1 per cent of CPU.
Can you deactivate search-info display?
I can't think of anything else eating CPU time.
Does 1% hold at slow time controls?
Fabien.
Fabien Letouzey
 

Re: UCI2WB "replacement" project news

Postby Fabien Letouzey » 23 Mar 2004, 13:46

Geschrieben von:/Posted by: Fabien Letouzey at 23 March 2004 13:46:11:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Fabien Letouzey at 23 March 2004 13:44:59:

I can't think of anything else eating CPU time.
On second thought log files can cost a bit as well.
Fabien.
Fabien Letouzey
 

Re: UCI2WB "replacement" project news

Postby Igor Gorelikov » 23 Mar 2004, 14:02

Geschrieben von:/Posted by: Igor Gorelikov at 23 March 2004 14:02:02:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Fabien Letouzey at 23 March 2004 13:46:11:
I can't think of anything else eating CPU time.
On second thought log files can cost a bit as well.
Fabien.
To be more precise:
Without engine matches Arena allocates 23Mb of RAM and uses 6Mb of them. Also it uses about 1 per cent of CPU.
With engine matches Arean allocates 24MB of RAM and uses 8Mb of them. Also it uses about 3 through 12 per cent of CPU.
Igor
Igor Gorelikov
 

Re: UCI2WB "replacement" project news

Postby Gábor Szõts » 23 Mar 2004, 14:24

Geschrieben von:/Posted by: Gábor Szõts at 23 March 2004 14:24:59:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Igor Gorelikov at 23 March 2004 14:02:02:
I can't think of anything else eating CPU time.
On second thought log files can cost a bit as well.
Fabien.
To be more precise:
Without engine matches Arena allocates 23Mb of RAM and uses 6Mb of them. Also it uses about 1 per cent of CPU.
With engine matches Arean allocates 24MB of RAM and uses 8Mb of them. Also it uses about 3 through 12 per cent of CPU.
Igor
Hi,
While I agree as far as memory allocation is concerned, I can't confirm the CPU usage observations. According to the task manager (Windows 2000) Arena 1.05 does not use CPU time at all (At least not while an engine is thinking. It does use CPU time when switching sides. But that is negligible.).
Gábor
Gábor Szõts
 

Re: UCI2WB "replacement" project news

Postby Igor Gorelikov » 23 Mar 2004, 14:32

Geschrieben von:/Posted by: Igor Gorelikov at 23 March 2004 14:32:55:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Gábor Szõts at 23 March 2004 14:24:59:
While I agree as far as memory allocation is concerned, I can't confirm the CPU usage observations. According to the task manager (Windows 2000) Arena 1.05 does not use CPU time at all (At least not while an engine is thinking. It does use CPU time when switching sides. But that is negligible.).
Gábor
Hi Gábor,
Here is Windows 98 SE. But it cannot be due to different Windows.
What version of Arena do you use? Mine is Arena 1.02.
Maybe it's the cause?
Igor
Igor Gorelikov
 

Re: UCI2WB "replacement" project news

Postby Fabien Letouzey » 23 Mar 2004, 14:35

Geschrieben von:/Posted by: Fabien Letouzey at 23 March 2004 14:35:41:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Igor Gorelikov at 23 March 2004 14:32:55:
While I agree as far as memory allocation is concerned, I can't confirm the CPU usage observations. According to the task manager (Windows 2000) Arena 1.05 does not use CPU time at all (At least not while an engine is thinking. It does use CPU time when switching sides. But that is negligible.).
G�bor
Hi G�bor,
Here is Windows 98 SE. But it cannot be due to different Windows.
What version of Arena do you use? Mine is Arena 1.02.
Maybe it's the cause?
Igor
Of course it could be due to Windows version. The Windows 95/98/ME family and the Windows NT/2000/XP one have very little to do with each other.
Fabien.
Fabien Letouzey
 

Re: UCI2WB "replacement" project news

Postby Gábor Szõts » 23 Mar 2004, 14:50

Geschrieben von:/Posted by: Gábor Szõts at 23 March 2004 14:50:01:
Als Antwort auf:/In reply to: Re: UCI2WB "replacement" project news geschrieben von:/posted by: Igor Gorelikov at 23 March 2004 14:32:55:
While I agree as far as memory allocation is concerned, I can't confirm the CPU usage observations. According to the task manager (Windows 2000) Arena 1.05 does not use CPU time at all (At least not while an engine is thinking. It does use CPU time when switching sides. But that is negligible.).
Gábor
Hi Gábor,
Here is Windows 98 SE. But it cannot be due to different Windows.
What version of Arena do you use? Mine is Arena 1.02.
Maybe it's the cause?
Igor
Well, 1.05... :-)
Gábor Szõts
 

Re: How about MinGW?

Postby Pallav Nawani » 24 Mar 2004, 19:53

Geschrieben von:/Posted by: Pallav Nawani at 24 March 2004 19:53:05:
Als Antwort auf:/In reply to: Re: How about MinGW? geschrieben von:/posted by: Fabien Letouzey at 24 March 2004 10:31:47:
Hello,
How about using MinGW instead?
I did not work with MinGW, but I read that it does not require cygwin.dll.
Dann mentionned it as well.
I don't know what it is.
But I need a compiler that emulates POSIX function (Unix system calls).
CYGWIN.DLL contains those functions.
If you want, it is a sort of Unix "emulator" for Windows ...
Fabien.
MinGW supports some, but not All of the POSIX functions, it supports some Linux-isms too. I compile windows version of my engine using Mingw. It is *much* faster than something compiled using Cygwin. It also uses gcc for its compilation.
Give it a try, I strongly recommend it.
Pallav.
Pallav Nawani
 

Re: How about MinGW?

Postby Marcus Prewarski » 24 Mar 2004, 20:29

Geschrieben von:/Posted by: Marcus Prewarski at 24 March 2004 20:29:33:
Als Antwort auf:/In reply to: Re: How about MinGW? geschrieben von:/posted by: Pallav Nawani at 24 March 2004 19:53:05:

MinGW supports some, but not All of the POSIX functions, it supports some Linux-isms too. I compile windows version of my engine using Mingw. It is *much* faster than something compiled using Cygwin. It also uses gcc for its compilation.
Give it a try, I strongly recommend it.
Pallav.
I have seen the opposite effect. I always see about a 5% or more improvement in speed when I compile my engine with Cgywin as opposed to MinGW. However I still distribute the MinGW compiled version just for ease of use.
The main thing I don't like about MinGW is I can't use the unix style select() calls for polling for input. I hate the windows peeknamepipe stuff but that is just personal preference. There were also some other oddities I encountered like the MinGW rand() calls returned 15 bit random numbers which can lead to some serious hash collisions if you aren't aware fo this.
However MinGW is free and allows me to use gcc to compile stuff for windows so I think it is pretty neat.
-Marcus
Marcus Prewarski
 

Re: How about MinGW?

Postby Dieter Bürßner » 24 Mar 2004, 22:08

Geschrieben von:/Posted by: Dieter Bürßner at 24 March 2004 22:08:51:
Als Antwort auf:/In reply to: Re: How about MinGW? geschrieben von:/posted by: Marcus Prewarski at 24 March 2004 20:29:33:
MinGW supports some, but not All of the POSIX functions, it supports some Linux-isms too. I compile windows version of my engine using Mingw. It is *much* faster than something compiled using Cygwin. It also uses gcc for its compilation.
Give it a try, I strongly recommend it.
Pallav.
I have seen the opposite effect. I always see about a 5% or more improvement in speed when I compile my engine with Cgywin as opposed to MinGW. However I still distribute the MinGW compiled version just for ease of use.
The main thing I don't like about MinGW is I can't use the unix style select() calls for polling for input. I hate the windows peeknamepipe stuff but that is just personal preference. There were also some other oddities I encountered like the MinGW rand() calls returned 15 bit random numbers which can lead to some serious hash collisions if you aren't aware fo this.
Interesting. How do you explain this? I tried both in the past (and DJGPP, and gcc on Linux). The same versions of gcc produce the same assembly, typically (besides some cosmetical stuff, like leading underscores for external names, some data lay out stuff, ...). For me, the code ran at almost exactly the same speed under each environment (I deleted Cygwin now, so I cannot test it anymore, but I still have the other environments). Of coruse I am speaking about code, that uses the compiler/OS libs rarely. For example using a time() like function at every node in a chess engine might make a big difference in the name environments.
Not, that classical Unix rand() also returned 15-bits (and at least under BSD used a really horrible pseudo random number generator (PRNG), where in successive calls, for example the last bit of the returned number predictably just switched - not very random ...). BSDish random() was a better quality PRNG (much like the one used in Crafty), but still not recommendable for serious simulations in general. Anyway, I think it is better to stay away from both, and use a "self written" (from the net) PRNG in the source. Will also have the advantage, that you can compare node counts under different environments.
Regards,
Dieter
Dieter Bürßner
 

Re: How about MinGW?

Postby Dann Corbit » 25 Mar 2004, 00:28

Geschrieben von:/Posted by: Dann Corbit at 25 March 2004 00:28:25:
Als Antwort auf:/In reply to: Re: How about MinGW? geschrieben von:/posted by: Dieter Bürßner at 24 March 2004 22:08:51:
MinGW supports some, but not All of the POSIX functions, it supports some Linux-isms too. I compile windows version of my engine using Mingw. It is *much* faster than something compiled using Cygwin. It also uses gcc for its compilation.
Interesting. How do you explain this? I tried both in the past (and DJGPP, and gcc on Linux). The same versions of gcc produce the same assembly, typically (besides some cosmetical stuff, like leading underscores for external names, some data lay out stuff, ...). For me, the code ran at almost exactly the same speed under each environment (I deleted Cygwin now, so I cannot test it anymore, but I still have the other environments). Of coruse I am speaking about code, that uses the compiler/OS libs rarely. For example using a time() like function at every node in a chess engine might make a big difference in the name environments.
The differenece is in the libraries. Cygwin GCC uses libc and Mingw GCC uses the MS VC libraries. So if both programs make heavy use of function calls, then the program that benefits the most will be the one that happens to reference the faster library function (it can go either way).
[snip]



my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

Re: How about MinGW?

Postby Dieter Bürßner » 25 Mar 2004, 01:08

Geschrieben von:/Posted by: Dieter Bürßner at 25 March 2004 01:08:10:
Als Antwort auf:/In reply to: Re: How about MinGW? geschrieben von:/posted by: Dann Corbit at 25 March 2004 00:28:25:
The differenece is in the libraries. Cygwin GCC uses libc and Mingw GCC uses the MS VC libraries. So if both programs make heavy use of function calls, then the program that benefits the most will be the one that happens to reference the faster library function (it can go either way).
Yes, of course (I alread mentioned it). But I can just not imagine, why a chess engine would need significant time in the library. I guess, it is much less than 1% for typical engines. If it is more, probably simple changes in the engine could solve the problem (for example, instead of calling the lib every node, call it every 1000 nodes).
Regards,
Dieter
Dieter Bürßner
 

Re: How about MinGW?

Postby Marcus Prewarski » 25 Mar 2004, 18:59

Geschrieben von:/Posted by: Marcus Prewarski at 25 March 2004 18:59:40:
Als Antwort auf:/In reply to: Re: How about MinGW? geschrieben von:/posted by: Dieter Bürßner at 25 March 2004 01:08:10:
The differenece is in the libraries. Cygwin GCC uses libc and Mingw GCC uses the MS VC libraries. So if both programs make heavy use of function calls, then the program that benefits the most will be the one that happens to reference the faster library function (it can go either way).
Yes, of course (I alread mentioned it). But I can just not imagine, why a chess engine would need significant time in the library. I guess, it is much less than 1% for typical engines. If it is more, probably simple changes in the engine could solve the problem (for example, instead of calling the lib every node, call it every 1000 nodes).
Regards,
Dieter
My engine checks time and polls for input every 4096 nodes so I doubt the difference can be explained by those system calls. I do make use of the c library memset() every node. The base compiler should be the same (maybe a different version) so the code should be the same and I don't think there should be alignment issues. I haven't lost any sleep over the difference in performance since 5% won't make a significant difference for an engine.
-Marcus
Marcus Prewarski
 


Return to Archive (Old Parsimony Forum)

Who is online

Users browsing this forum: No registered users and 1 guest