Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about fixing the time management of movei

Author: Robert Hyatt

Date: 10:26:54 07/27/04

Go up one level in this thread


On July 27, 2004 at 12:42:42, Uri Blass wrote:

>On July 27, 2004 at 11:11:10, Robert Hyatt wrote:
>
>>On July 27, 2004 at 03:18:50, Sune Fischer wrote:
>>
>>>On July 25, 2004 at 22:01:31, Robert Hyatt wrote:
>>>
>>>>Bad idea.  Start the next iteration even if you don't think you will have time
>>>>to finish it.  You might fail low.  Wouldn't that be nice to know?  :)
>>>
>>>This may or may not be a good idea.
>>>
>>>I think if it is a good idea, then you should always try and search the next
>>>iteration for a short time to see if you get a quick fail-low.
>>>
>>>On the other hand, if it is a bad idea it is better to save the time that will
>>>probably be wasted anyway.
>>>
>>>From what I can tell you propose to do a mixture, i.e. to use extra time if the
>>>time manager tells you to?
>>>
>>>I really doubt this is the best way, because it will be extremely random when
>>>you get to begin the next ply.
>>
>>No idea what that means.  I set a target time.  If I have not used that much
>>time, I keep searching.  Whether that means starting a new iteration or
>>continuing on the current iteration.
>>
>>When the target time is reached, I set a flag that says "do not search another
>>root move, but don't stop until either the current root move has been searched
>>or 2x the time limit has been used."  This does not apply if the root move being
>>searched is the first one in the list...
>
>Basically there are 2 cases to consider.
>case 1:you did not expect the opponent move correctly.
>case 2:You expected the opponent move correctly.

I completely ignore this.  My only purpose for "pondering" is to save time so
that I have more later when I need it.  IE my time logic doesn't know whether we
are dealing with case 1 or case 2 as you define them.  I consider them one
equivalent case..


>
>Case 1 has 2 subcases
>Case 1.1:you did not have fail low
>Case 1.2:You had fail low
>Let discuss case 1.1 first.
>
>I understand that in case 1.1 you stop to search in one of the following cases:
>case 1.1.1:You searched more than twice the target time(It is safe only when the
>target time is less than half of the remaining time).
>
>case 1.1.2:You searched more than the target time and you finished to search a
>root move
>case 1.1.3:You searched the target time(maybe slightly more than it because you
>do not check for time every node) and you are during searching the first root
>move.
>
>The problem that I see is that in case 1.1.3 there may be a chance that you fail
>low if you did not search the first root move for enough time.


Of course that can happen.  But there is no reliable way to estimate how long it
will take to search the first move, particularly if I have been pondering a long
time and am into a very deep search here.


>
>I will give an example:
>
>Suppose that you used 1048575 nodes to finish the iteration and after 1048576
>nodes you discover that you already searched the target time.
>
>Does not it make sense to give Crafty to search more nodes for the chance that
>it is going to fail low?
>


I assume that fail lows happen quickly.  On those rare occasions where this is
wrong, I just live with it.  If you consistently over-step your time allowance
then one of two things is going to happen.  You have to reduce your time limit
enough to make this not a problem, or you have to stop over-stepping so
frequently.  Your idea will likely over-step on _every_ move, which would hurt
more than help.




>I do not suggest to finish searching the first root move but only to increase
>slightly the target time because I understand that fail low are often discovered
>with relatively small number of nodes when finishing to search the first move
>may take clearly more time.


Fine.  But now you have to define "slightly".  Because you have to make a
decision on when to stop, exactly.



>
>Uri



This page took 0.02 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.