Polyglot 1.4w Released

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot 1.4w11 Released

Post by Michel »

# new EngineNice option (windows) to control the engine's priority (Eric Mullins)
I have used "UseNice" in Linux for this option. It is only necessary if you compile PG as a Cygwin binary (i.e. if you compile without using -mno-cygwin). Is it really necessary on Windows? I any case it probably best to use the same name in Windows and Linux.
# ScoreWhite show scores from white's point of view (Eric Mullins)
I thought this was against the xboard protocol specification but I cannot find it now.
# PostDelay surpress the engine's pv lines for #n seconds
Isn't that something the GUI should do?
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: Polyglot 1.4w11 Released

Post by F. Bluemers »

Michel wrote:
# new EngineNice option (windows) to control the engine's priority (Eric Mullins)
I have used "UseNice" in Linux for this option. It is only necessary if you compile PG as a Cygwin binary (i.e. if you compile without using -mno-cygwin). Is it really necessary on Windows?
Not yet for me,with wb2uci one can change the engine priority too.
I any case it probably best to use the same name in Windows and Linux.
Yes,I agree
# ScoreWhite show scores from white's point of view (Eric Mullins)
I thought this was against the xboard protocol specification but I cannot find it now.
Even it it would,does that matter? is Crafty illegal now? ;-) I guess some people like this while analysing
# PostDelay surpress the engine's pv lines for #n seconds
Isn't that something the GUI should do?
I added this option so that engines would not flood the tlcs server i use.
It would indeed be nice if winboard would handle it.
Best
Fonzy
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: Polyglot 1.4w11 Released

Post by bnemias »

Michel wrote:
# new EngineNice option (windows) to control the engine's priority (Eric Mullins)
I have used "UseNice" in Linux for this option. It is only necessary if you compile PG as a Cygwin binary (i.e. if you compile without using -mno-cygwin). Is it really necessary on Windows? I any case it probably best to use the same name in Windows and Linux.
It is necessary in windows, at least I won't run w/out it. The thing is, in linux, it isn't such a big deal-- you can always make a script for running the engine which nices it too. You can't do that in windows, so unless the GUI allows lowering engine priority, you are stuck with doing it manually.

I should add that my implementation isn't strictly windows-- it does use the same name for the option, though, regardless of environment. I know it works fine in cygwin compiled binaries, because that's the way I run in windows when I do.
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: Polyglot 1.4w11 Released

Post by bnemias »

bnemias wrote:I should add that my implementation isn't strictly windows-- it does use the same name for the option, though, regardless of environment. I know it works fine in cygwin compiled binaries, because that's the way I run in windows when I do.
Well, it DID compile w/out error. It seems in my communications, I didn't make it clear that AdjustEnginePriority() needs to be _WIN32 only, eg:

Code: Select all

#ifdef _WIN32
			AdjustEnginePriority();
#endif
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot 1.4w11 Released

Post by Michel »

For uniformity it is good there should be a "Nice" option in windows as well.

Still I don't see the logic. Polyglot uses no cpu-time so it is not competing with the engine
for cpu cycles. Why should the engine run at lower priority? For an OS with a decent scheduler like Linux and Windows (these days) there is absolutely no point in running the engine at lower priority.

Cygwin binaries (compiled without -mno-cygwin) have a problem but this is because
Cygwin has do to very complicated things (look at the source of the select call).
The point of the native windows version by Fonzy was precisely I think to get around this problem with Cygwin.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot 1.4w11 Released

Post by Michel »

# PostDelay surpress the engine's pv lines for #n seconds

Isn't that something the GUI should do?

I added this option so that engines would not flood the tlcs server i use.
It would indeed be nice if winboard would handle it.
Polyglot already has KibitzDelay. Does "UseDelay" cover some other situation?
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: Polyglot 1.4w11 Released

Post by bnemias »

Michel wrote:Still I don't see the logic. Polyglot uses no cpu-time so it is not competing with the engine for cpu cycles. Why should the engine run at lower priority? For an OS with a decent scheduler like Linux and Windows (these days) there is absolutely no point in running the engine at lower priority.
It's not competition with polyglot that's the issue. It's competition with the other processes on your computer. Just selecting menu items is sluggish when the engine runs at normal priority, to say nothing of trying to watch a video, or any of a zillion other things one does on his computer whilst analyzing a game.

If you haven't experienced this behavior before, then I suggest you have been running a cygwin binary that has been niceing it for you all along and you simply didn't notice. If you grab polyglot from one of the repositories, then it's going to nice the engine at +6 because that's what the source does. It's what a cygwin build will do too, unless the source has been altered.

In short, the scheduler in either environment isn't perfect. Reducing the engine priority is quite necessary in either OS to prevent normal tasks from becoming sluggish.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot 1.4w11 Released

Post by Michel »

If you grab polyglot from one of the repositories, then it's going to nice the engine at +6 because that's what the source does. It's what a cygwin build will do too, unless the source has been altered.
It was actually niceing at +20!!! I have thrown this out in the version I have been maintaining (with Fonzy's permission) which is here

http://alpha.uhasselt.be/Research/Algebra/Toga/

and have added the UseNice option instead (to deal with Cygwin).

If it is competition with other processes you are worried about then it not the task of Polyglot but of the GUI to lower the priority. What about engines
that do not run through PG?
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: Polyglot 1.4w11 Released

Post by bnemias »

Michel wrote:If it is competition with other processes you are worried about then it not the task of Polyglot but of the GUI to lower the priority. What about engines that do not run through PG?
Oh I agree it's a problem. It's one of the reasons I don't play around with crafty anymore on windows-- winboard doesn't have a way to lower the engine priority, and I go nuts!

Actually, I once modified winboard to do just that, but it wasn't anything I could release, and I've managed to lose the source too. I'm sure I could do it again if there was demand, but IIRC, it was a hack job rather than something that would extend to any WB engine.

I can't remember if I tried that solution for when fcp was polyglot, but I suspect I did, and it didn't work as expected and I likely just implemented my personal EngineNice option into polyglot 1.4 at that time.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Polyglot 1.4w11 Released

Post by Michel »

winboard doesn't have a way to lower the engine priority, and I go nuts!
Ok let's ask H.G. Muller politely. He occasionally reads this forum :-)