Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Difficulties with 3-fold repetition when using hashing.

Author: Robert Hyatt

Date: 06:22:55 06/24/00

Go up one level in this thread


On June 24, 2000 at 04:51:23, Adrien Regimbald wrote:

>Hi,
>
>>Yes.  Once it knows things are bad, it is willing to burn time to improve things
>>if possible.  I see at _least_ one move in every game where this happens, and
>>had it stopped with the bad move it would have lost, while searching longer
>>restored the game to equality or whatever...
>>
>>Once you _know_ things are bad, that is the time to use more time and try to
>>search for a solution.  Of course, once you finish the current iteration, it is
>>debatable whether you should go even deeper, since no moves led to a decent
>>score.
>
>
>Hmm.. I'm trying to think of a simple algorithm, that will hopefully improve
>things in the majority of cases.. how about something like this (variable names
>used to make everything as clear as possible):
>
>/* do we have a significant drop in our score? */
>if (root_score + 40 <= last_iteration_score) {
>  /* are we likely to run out of time on this search? */
>  if (time_used >= 0.5 * allocated_time && allow_more_time) {
>    /* can we afford to add extra time? */
>    if (time_left >= 4 * allocated_time) {
>      allocated_time *= 2; /* give some extra time */
>      allow_more_time = FALSE; /* only allow extra time once */
>    }
>  }
>}
>

I think your code is going into the wrong place.  Don't just adjust the target
time if you are in trouble at the 50% mark on your search.  Rather, use a piece
of code to test to see if you are out of time (call it maybe once every second,
based on how many nodes per second you search.  Then you won't make the decision
to use more time until you are ready to say you are "out" of time...





>
>I know that this isn't terribly sophisticated, but I think it will likely work
>in a large percentage of cases.  Does this seem reasonable?  Does anyone have a
>relatively simple scheme which handles this issue?
>
>
>>One 20-year-old trick:  When time runs out, _never_ stop searching until the
>>current move you are searching has been completed.  Most of the time, this
>>happens almost instantly.  But on occasion, you are ggoing to find a new best
>>move, if you have time.  Take the time to see.
>
>
>Hmm, I think I tried this once before, and it seemed very risky to me.  It ran
>into all sorts of trouble when there were say 2 or 3 moves which gave very
>similar scores, and the PV score is only say 5-10 centipawns better than the
>other choices..

It is worth the risk.  Believe me.




>
>
>>That's exactly how a "human" plays chess. :)
>
>
>Human.. what's that? :P
>
>
>
>Adrien.



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.