Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hiarcs and pawns revisited

Author: Ricardo Gibert

Date: 12:47:54 08/31/99

Go up one level in this thread


On August 31, 1999 at 15:31:16, Robert Hyatt wrote:

>On August 31, 1999 at 14:50:21, Ricardo Gibert wrote:
>
>>On August 31, 1999 at 14:01:43, Robert Hyatt wrote:
>>
>>>On August 31, 1999 at 13:05:30, Ricardo Gibert wrote:
>>>
>>>>On August 31, 1999 at 12:12:54, Robert Hyatt wrote:
>>>>
>>>>>On August 31, 1999 at 10:46:21, Ricardo Gibert wrote:
>>>>>
>>>>>>On August 31, 1999 at 10:32:10, Robert Hyatt wrote:
>>>>>>
>>>>>>>On August 31, 1999 at 06:16:22, Ralf Elvsén wrote:
>>>>>>>
>>>>>>>>On August 31, 1999 at 04:51:18, Ricardo Gibert wrote:
>>>>>>>>
>>>>>>>>>On August 31, 1999 at 00:30:24, Howard Exner wrote:
>>>>>>>>>
>>>>>>>>>>On August 30, 1999 at 19:41:54, Ralf Elvsén wrote:
>>>>>>>>>>
>>>>>>>>>>>Some while ago I posted a position where I was
>>>>>>>>>>>impressed by Hiarcs accurate evaluation in a pawn ending:
>>>>>>>>>>>
>>>>>>>>>>>6k1/1p4p1/p7/2Ppp3/1P6/P4KP1/5P1P/8 b - - 0 49
>>>>>>>>>>>
>>>>>>>>>>>The fact that white can create passed pawns on
>>>>>>>>>>>both sides of the board makes the victory clear,
>>>>>>>>>>>and Hiarcs gave an evaluation of about +2. Note however
>>>>>>>>>>>that white is a pawn up.
>>>>>>>>>>>
>>>>>>>>>>>Not being entirely convinced about the
>>>>>>>>>>>impeccabilty of its evaluation, I decided to test
>>>>>>>>>>>some similar "clean" positions.
>>>>>>>>>>>
>>>>>>>>>>>First position:
>>>>>>>>>>>
>>>>>>>>>>>4k3/p6p/8/4p3/3p4/3K4/PP4PP/8 b - - 0 1
>>>>>>>>>>>
>>>>>>>>>>>This is (from a human point of view) an "identical" position but
>>>>>>>>>>>with material equality. A win for white. Here Hiarcs thinks black
>>>>>>>>>>>is slightly better!
>>>>>>>>>>>
>>>>>>>>>>>Second position:
>>>>>>>>>>>
>>>>>>>>>>>4k3/p6p/8/3p4/2p5/2K5/P4PPP/8 b - - 0 1
>>>>>>>>>>>
>>>>>>>>>>>Here one pawn is moved from one side of the board to the other
>>>>>>>>>>>(compared to the previous position) and that makes it a clear draw,
>>>>>>>>>>>but Hiarcs thinks white has an advantage, although not decisive.
>>>>>>>>>>>So Hiarcs thinks position 2 is better for white than position 1,
>>>>>>>>>>>when in fact it is worse.
>>>>>>>>>>>
>>>>>>>>>>>I am now inclined to believe (or rather convinced...)
>>>>>>>>>>>that Hiarcs correct score in the position from my
>>>>>>>>>>>original post was due to the fact that white was a pawn up in a pawn ending,
>>>>>>>>>>>(which is heavily weighted, understandably) and not from some accurate
>>>>>>>>>>>evaluation of the pawn structure...
>>>>>>>>>>>
>>>>>>>>>>>Don't investigate the chess "knowledge" of your favourite chess software,
>>>>>>>>>>>your illusions can be shattered :)
>>>>>>>>>>>
>>>>>>>>>>>Ralf
>>>>>>>>>>>
>>>>>>>>>>>PS: I always screw things up when I post positions and other stuff.
>>>>>>>>>>>Hope I got it right this time...
>>>>>>>>>>
>>>>>>>>>>6k1/1p4p1/p7/2Ppp3/1P6/P4KP1/7P/8 b
>>>>>>>>>>
>>>>>>>>>>Here is your original position minus the white pawn on f2,
>>>>>>>>>>so now material is equal. Like Hiarcs' eval of the original
>>>>>>>>>>Rebel 10 also gives a big plus for white. But now in this equal material
>>>>>>>>>>position which remains a very simple win for white, Rebel 10 thinks black is
>>>>>>>>>>much better. It seems that only deep calculation will aid computers here
>>>>>>>>>>while humans see this at a glance.
>>>>>>>>>
>>>>>>>>>Yes. Computers cannot calculate far enough to "understand" these positions.
>>>>>>>>>Their evals are not much better than "random noise". They can do tactics & in
>>>>>>>>>many respects positional play, but stategy (i.e. planning) is neglected, which
>>>>>>>>>is what is needed here. To do stategy, they need to be able to generalize and
>>>>>>>>>they don't do that.
>>>>>>>>
>>>>>>>>I don't know if strategy is needed. As a naive non-programmer
>>>>>>>>I imagine that you could add something like this in the evaluation:
>>>>>>>>
>>>>>>>>local pawn majority (plus check for non-block e.g.
>>>>>>>>white pawns g2, h4, black pawn h5) -> future passed pawn
>>>>>>>>
>>>>>>>>if (the above) on both sides of the board -> big plus in score
>>>>>>>>
>>>>>>>>Of course it depends on the position of the kings etc.
>>>>>>>>Might get messy... I think Bob indicated a scheme similar to this
>>>>>>>>in a previous post (or maybe I misunderstood him).
>>>>>>>>
>>>>>>>>Note that in the last positions I posted, if you let
>>>>>>>>black have pawns on e.g. e4 and d4 and alter the location
>>>>>>>>of the kings slightly, then black can win in some situations...
>>>>>>>>
>>>>>>>>Ralf
>>>>>>>
>>>>>>>
>>>>>>>Note also that there is a special case crafty already handles.  IE white
>>>>>>>has pawns at g4/h5 and black has a pawn at h6.  White has a 'hidden' passed
>>>>>>>pawn because if he plays g5, he gets a passer immediately that out-runs the
>>>>>>>opponent's passer...
>>>>>>
>>>>>>Writing code for each special cases does not seem practical to me. You may get
>>>>>>some of the more common cases this way, but a more general method is needed to
>>>>>>cope with all of them.
>>>>>
>>>>>
>>>>>I didn't mean to imply I only handle that pawn configuration.  A couple of years
>>>>>ago I was watching Roman play Crafty, and he reached a position with pawns on
>>>>>g5/h5 and crafty having a pawn on h7.  Crafty was expecting him to play towards
>>>>>pushing g6 to make a passer, which would have been fairly easy to stop.  Instead
>>>>>Roman played h6 and crafty's score went _up_ because of the backward pawn now
>>>>>at g5.  I later talked to Roman and he mentioned he had seen this many times,
>>>>>and he wanted to know why.  I pointed out that crafty thought that g5 was
>>>>>weak.  He pointed out that he had a protected passed pawn at h6.
>>>>>
>>>>>Crafty now evaluates "hidden" passed pawns like this anywhere on the board.
>>>>>However, chess is full of exceptions, and this is an exception to backward pawns
>>>>>are bad type rules...
>>>>
>>>>It's fine that crafty now "sees" that h6 is a hidden passed pawn. It is not
>>>>difficult to find all the positive/negative "positional" features. The problem
>>>>is (and humans have this problem too) is WHEN is an advantage significant or not
>>>>not significant and if significant, how much. These are strategic issues that
>>>>can be answered for the short term by a search, but not for the long term. This
>>>>is a blind spot for computer programs. They may slant their eval up or down, but
>>>>this is non-sense. The fact there may be a hidden passed pawn may be completely
>>>>irrelevant or absolutely decisive. How does crafty "know" when pushing the g5
>>>>pawn to g6 is right and when pushing the pawn at h5 to h6 is right. If the
>>>>decision can not be determined over the short term, it's choice is essentially
>>>>random.
>>>>
>>>>I watched a senior master roll up a master at a tournament once. After the game,
>>>>I pointed out an unexpected defense. By a series of forced exchanges, his
>>>>opponent could arrive at an endgame where the senior master (playing black)
>>>>would have a closed position with a N vs B where the N would be an "eternal N"
>>>>at e4 and white would have a backward pawn at e3 and his B would be "bad". Seems
>>>>decisive, but the e3 pawn was the only weakness and the N at e4 had nowhere to
>>>>penetrate. Attempts to win opened up the position and made the "bad" bishop
>>>>active. I applied the principle of 2 weaknesses to get the idea for the defence
>>>>and the senior master conceeded this was the basic problem in attempting to
>>>>exploit his "advantage" there. The advantages turned out to not be real.
>>>
>>>I think the point is this (in this example). White can play g6 and make a passed
>>>pawn at g6 after hg hg.  Or white can play h6 and make a passed pawn at h6 after
>>>g6 hg.  Either one is a passed pawn.  Crafty is going to choose between them
>>>based on a couple of things.  (1) in the second case it gave up a pawn.  There
>>>had better be something to offset this (most commonly the king is on the off-
>>>side of the board and can't stop the passer so it is a good idea.)  (2) in the
>>>first case, the pawn has to be 'holdable'.  IE if the search discovers that it
>>>can't hold the pawn, then it won't produce it.  If it finds that the pawn
>>>can be blockaded and it can't find a way to dislodge the blockader, it would
>>>prefer the h6 "hidden passer'.
>>>
>>>IE it uses a good bit of qualitative judgement balanced with a pretty deep
>>>search, in order to figure out which (if either) is the better choice.
>>>Otherwise it would do just like a human and 'wait' to see what unfolds...
>>>since either course of action commits it..
>>>
>>>Pawn majorities are something I don't see programs handling well, if at all, at
>>>present.  In fact, when I did the outside passed pawn code in Crafty a couple of
>>>years ago I burned a lot of programs until they responded because crafty would
>>>create one, then trade down to a trivially won ending, knowing what it was
>>>doing.  While the opponent might say "hey, I am a pawn up, I want to trade"
>>>and end up getting its king decoyed away and losing.  Majorities are the same.
>>>
>>>The problem I have is that I evaluate so many things, it is very difficult to
>>>coordinate all of them and not have gross imbalances in some positions.  If you
>>>have to choose from several positional advantages/disadvantages, you had
>>>_better_ choose the right one(s).  And with so many, it is very difficult to
>>>do this reliably as you add more and more such cases...
>>>
>>>But it is doable...
>>
>>Lets take a trivial example, W: Ke1, Bf1, Ph2; B: Kh8\\
>
>
>Here is actual output, no databases being used for clarity:
>
>          s   depth   time  score   variation (1)
>                1     0.00   0.00   1. Ba6
>                1->   0.00   0.00   1. Ba6
>                2     0.00   0.00   1. Ba6 Kg7
>                2->   0.01   0.00   1. Ba6 Kg7
>                3     0.01   0.00   1. Ba6 Kg7 2. Bc8
>                3->   0.01   0.00   1. Ba6 Kg7 2. Bc8
>                4     0.01   0.00   1. Ba6 Kg7 2. Bc8 Kg6
>                4->   0.01   0.00   1. Ba6 Kg7 2. Bc8 Kg6
>                5     0.01   0.00   1. Ba6 Kg7 2. Bc8 Kg6 3. Bd7
>                5->   0.02   0.00   1. Ba6 Kg7 2. Bc8 Kg6 3. Bd7
>                6     0.02   0.00   1. Ba6 Kg7 2. Bc8 Kg6 3. Bd7 Kg5
>                6->   0.03   0.00   1. Ba6 Kg7 2. Bc8 Kg6 3. Bd7 Kg5
>                7     0.04   0.00   1. Ba6 Kg7 2. Bc8 Kg6 3. Bd7 Kg5 4.
>                                    Be8
>
>So it 'knows'...
>
>>
>>A draw. Easy enough, but if we add any number of additional white squared
>>Bishops plus any number of additional h-pawns to white's position, does your
>>program "see" it makes no difference or do you have special code so it will
>>return the correct eval of zero?
>
>
>You can add any number of pawns.  If you start adding bishops, then no I
>don't call those draws...  but only because they _never_ come up in real
>games.  rook pawn endings happen...  two same-colored bishops have never
>happened in any game crafty has played and isn't worth the effort to check
>for them.
>
You've missed the point. You're focusing to much on the specific examples and
missing the generalization. Everybody realizes more than one bishop of the same
color is rare. That is a feature the is incidental to my point. I used these
examples to save myself work of producing less trivial examples. Do you really
believe there do not exist analogous examples that are more practical bent? You
focus on the tree and overlook the forest!

>
>
>>
>>This contrasts sharply with, W: Ke1, Bc1, Ph6; Kh8, Ph7
>>
>>A very similar position and if you add any number of h-pawns, still a draw, but
>>add a 2nd black squared B and white has a trivial win.
>>
>>How does a chess program generalize this? Or special code for each? A human has
>>little trouble evaluating these as leaf nodes, but for a computer program this
>>is a problem. Yes?
>
>yes... but again it will never come up in a real game.  While RP+wrong bishop
>happens often enough to be worth catching.  This was a lot of what the DB guys
>did the last couple of years they worked on the thing... handling the special
>cases that Joel pointed out as important as he played against the thing.
>
>In the case of DB they can detect _anything_ without time penalty.  For the
>rest of us, we try to detect those things that are important...



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.