Author: Roberto Waldteufel
Date: 19:21:36 11/05/98
Go up one level in this thread
On November 05, 1998 at 21:35:14, Robert Hyatt wrote: >On November 05, 1998 at 18:31:21, Roberto Waldteufel wrote: > >> >>On November 05, 1998 at 09:47:34, Andrew Dados wrote: >> >>> Suppose somewhere deep in the search I get reduction to B vs 2P ending... >>>what value >>>should I assign to it? Side with Bishop can't win - so draw for side with 2P at >>>minimum... >> >> >>Be careful with this. In the vast majority of cases this is true: a lone minor >>piece cannot deliver mate to a bare king on an open board even with the >>opponent's cooperation, but give the opponent even as much as a single pawn and >>a mate becomes possible because the pawn can block the king's last escape >>square, eg BK h8, BP h7, WK g6 and now either a White knight on f7 or a White >>bishop on any of a1,b2.....g7 would be mate. If you prematurely categorise the >>position as "at least a draw for the pawn" you could miss such a mate in the >>search. Since a full width search can throw up some weird positions, you never >>know when one of these odd exceptions might occur. It's probably too rare to >>matter very much, but you should be aware of the fallability of the underlying >>logic. It's the exceptions to the rules that can cause problems, and >>unfortunately most "chess knowledge rules" have exceptions which are sometimes >>not easily predicted. It might be safer to only apply the "minimum draw" rule at >>the tips, so you can still outsearch the exceptions. Otherwise, if you want to >>use the draw score for a cutoff in the main search, you could try to extend the >>rule to cover the exceptional cases, eg if the king of the side with the pawns >>is not on the edge of the board, or not, or if the two kings are widely >>separated, then I think it is safe to say it's at least a draw even in the main >>search. >> >>Best wishes, Roberto >> >>>If I assign 2 *P value then my program will sac Knight for Pawn in >>>B+P vs N+2P...rarely sensible . What should my eval return in B vs P and B vs >>>2P ? >>> >>> Andrew .....(I better get those tablebases working :) > > > >this doesn't cause a problem *if* you do it in the Evaluate() procedure, because >that is done at endpoints after you have already found any possible mates. If >you try to do this at interior nodes you had *better* be right... because you >will screw up. I did this in crafty until we got the KNNKP database done, and >I missed mates here and there. I moved the test to the evaluate() procedure, >out of the interior nodes, and the problem went away... Yes, delaying the test to the leaves certainly solves the problem of rare exceptions, but it would be nice to be able to stop the search and give a return value in the main search, although to do that, as you say, you have to be very sure your logic is sound in all cases. For example, if the side NOT on move has a bare king, and the opposing side has mating material, it is sometimes safe to stop the search in the full-width part. I do this if the side to move has a major piece, an unstoppable passed pawn, or two bishops. But I don't do it for bishop and knight v bare king, because the knight could be about to get trapped at the corner of the board, resulting in a draw, so in this case I delay to the leaf nodes before evaluating as a win. And if it is the side to move that has the bare king, I never return a loss score in the main search, since the side to move may be about to capture something. I suppose with some more sophisticated tests it would be possible to take care of the exceptions and still stop the search early, but it is very difficult to be sure you have *really* thought of every possible situation that could occur. For example, take the simplest of endings, KPvK. Would you expect that there are any positions where the pawn wins, but can only do so by an underpromotion? If so how many? Well, it is not an obvious question, but it turns out that there are 6 such positions (side with pawn to move), but only really 3 distinct ones after symmetry is taken into account. Can you construct them? I bet that you will find this difficult to do metally, although a search of the tablebase would give a quick answer. The point I am making is that these sort of things are only obvious once we have seen them, and it would be easy to overlook such an exception in formulating a logic test for resolving KPK positions, and even more so as the complexity of the positions under consideration increases. And of course, KNNKP is one of the most interesting and difficult of theoretical endings. Troitsky's analysis in the 30's produced a set of logical rules to determine the result of many of these positions, but it was not until it could be checked with a computer tablebase that we could finally tell with certainty that all of Troitsky's findings were indeed correct. It would be an interesting project to try and develop a large set of flawless evaluation rules for some of these relatively simple endgames, but you realy need a tablebase to verify the rules, and if you have the tablebase then you don't need the rules! Best wishes, Roberto
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.