Author: Robert Hyatt
Date: 18:11:55 06/23/00
Go up one level in this thread
On June 23, 2000 at 20:15:08, Adrien Regimbald wrote: >Hi, > >>It sounds like you have a bug, because my hashing apparently works just like >>yours does, yet I don't see this often enough to give it any thought. IE in >>the last couple of years, I can't remember a single game crafty drew because >>of missing a repetition due to hashing... >> >>You might give your hash code a thorough look-see to see if anything seems >>wrong. > > >The problem seems to be entirely that I don't really handle cases where the >score drops a lot on the PV at a new depth and Faile runs out of time to search. > The way I deal with this case is rather crude - if Faile finished searching the >PV branch before running out of time, it will return its result, otherwise it >will say the search failed due to time and the result won't be trusted. If the >score dropped significantly against the last depth's result, I just gamble and >go with the move from the last depth. > This is not a good way to implement the search. Think about it. You have searched the PV move and it failed low. Doesn't that suggest that (a) you use more time and (b) not only do you use more time, you use enough to either get the new bad score for the PV _and_ search to find a new PV with a better score? >I imagine that the big difference here is that (if I recall correctly), Crafty >does do something a bit less braindead here, and will try to search for a better >move if its score drops. 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. > >The problem is purely a result of running out of time after searching the PV but >before having a chance to finish another branch. If I modify Faile to ensure >that it finishes examining all root moves after it has begun a search at a >particular depth, this problem does not occur. 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. > >I suppose that the prudent thing to do would be to write a function to >re-allocate some extra time when the score drops too much.. ;) I will certainly >look into it! > > >Adrien. That's exactly how a "human" plays chess. :)
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.