Author: Scott Gasch
Date: 09:57:53 05/30/02
Go up one level in this thread
Before I search I set two time limits, a soft limit and a hard limit. If
everything goes well I move after the soft limit. But if:
1. The root position is "critical"
2. We've seen many root fail lows
3. We're just out of book
4. We're resolving a root fail low / fail high
5. We're already done searching the first move at this depth (with the
assumption that the rest should come quickly or cause a FL/FH if
interesting, might as well search out the ply).
then the engine keeps searching until either the condition disappears (for
temporary conditions) or the hard timer is exceeded. The code also has some
provisions for moving before the soft timer has expired in situations like:
1. It thinks the root position / move is a simple recapture. Everyone
thinks this is a dumb idea but it has never bitten me. Simple recapture =
there is only one way to recapture a piece > knight and there are no
checks against the enemy king.
2. I have some code that makes it move faster when time is low in a blocked
position when the move it is considering doesn't unblock the position. I
added this as part of an attempt to "fix" anti-computer play. It also has
been programmed to hate totally blocked positions so hopefully avoids this
Hope this is helpful for you. Someday I may go back and add a second "harder"
timer... Usually the hard timer is about 2-3x the short timer and I think in
some cases it needs more.
Another thing, why are you not playing the tip of the PV at the time you run out
of time? If you think about when your PV changes (or, better yet, print out a
message) at the root you'll see that playing the first move on the PV when you
are halfway through ply X is the same as playing the move returned by ply X-1 as
long as the PV hasn't changed. If it has, I play the new move.
Scott
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.