[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU chess seems to always run at 100% CPU

From: George Pauly
Subject: Re: GNU chess seems to always run at 100% CPU
Date: Sat, 27 Jul 2013 18:48:54 -0400

Hi Antonio,

On Sat, 2013-07-27 at 21:16 +0200, Antonio Ceballos wrote:
> Hi George,
> A change was included in version 6.0.3 with respect to 6.0.2 so that
> the CPU should not be at 100% usage in easy mode. Could you tell me
> which version you are using? In case you are using v6.0.3, could you
> tell me if you are observing 100% CPU usage in easy mode?

I was using gnuchess 6.0.2.  The 6.0.3 release notes did not lead me to
suspect that this bug might have been fixed.  6.0.2 is currently
distributed by Debian.

Unfortunately the bug still exists in uci mode in 6.0.3, even if the
easy flag is given.  Cpu usage is always high.

The bug has been corrected in other modes.  For example, in the default
interactive mode the engine starts up without cpu racing.  The cpu usage
is as expected with easy or hard conditions, by which I mean the cpu is
low until an initial move is made, and is high afterwards unless the
computer's opponent is thinking with the easy flag on.  If a 'new'
command is given the cpu usage goes low.

To be clear, with 6.0.3:

gnuchess -eu 
gnuchess -ue
gnuchess -uq
gnuchess -u

all exhibit cpu racing.


gnuchess -e
gnuchess -x
gnuchess -m
gnuchess -p

do not exhibit cpu racing at startup.  They did in 6.0.2.

For my purposes uci mode is required and the engine should not use
significant cpu except when the 'go' command is executed or it is
pondering a game currently being played.

Additionally, an attempt to suppress pondering in uci mode using setoption:

setoption name Ponder value false

  had no effect.  Presumably pondering is off by default.

> There is no particular reason for not using readline, other than
> "legacy" reasons. I will add an entry in the todo list to consider
> using it in the future. 

If it helps fix this bug in uci mode ...

> I cannot exactly tell you why 'stop' is checked in the source line you
> mention. It is related to whether an active search is in progress or
> not. It should not be the case, for instance, if the program is
> running in easy mode and it is the opponent turn. Nevertheless, the
> main loop of the engine comes from line 105 in protocol.cpp.

Thanks for the information.

> Cheers,
> Antonio

... and thanks for the timely response.

Where should I look to patch this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]