Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: What do programmers think about a chess algorithm??

Author: Heiner Marxen

Date: 11:03:36 12/13/02

Go up one level in this thread


On December 13, 2002 at 10:59:33, Uri Blass wrote:

>On December 13, 2002 at 10:23:12, Heiner Marxen wrote:
>
>>On December 13, 2002 at 06:03:36, Sune Fischer wrote:
>>
>>>On December 12, 2002 at 23:49:59, Uri Blass wrote:
>>>
>>>>On December 12, 2002 at 17:17:04, Dann Corbit wrote:
>>>>
>>>><snipped>
>>>>>>[D]k7/P2ppp2/K7/8/8/8/7P/8 w - - 0 1
>>>>>>
>>>>>>I can see mate in 5 without calculating all the tree
>>>>>>
>>>>>>1.h4,2.h5 3.h6,4.h7,5.h8R#
>>>>>>
>>>>>>a stupid computer program(and I believe that all of the available programs are)
>>>>>>need to calculate a lot of lines(1.h4 f5,1.h4 f6,....)
>>>>>
>>>>>You have to calculate the square root of the nodes of the tree.  Not the full
>>>>>tree.
>>>>
>>>>No
>>>>
>>>>In this case there is a simple plan 1.h4 2.h5 3.h6 4.h7 5.h8Q#
>>>>
>>>>It is easy to see that black can do nothing against it without calculating.
>>>>
>>>>I need only to look at class of positions and not on specific positions.
>>>>
>>>>Here is the proof of the mate in 5.
>>>>
>>>>1.h4 black has 3 pawns at f,g,h files but the pawns did not go after f5,g5,h5
>>>>2.h5 black has 3 pawns at f,g,h files but the pawns did not go after f4,g4,h4
>>>>3.h6 black has 3 pawns at f,g,h files but the pawns did not go after f3,g3,h3
>>>>4.h7 black has 3 pawns at f,g,h files but the pawns did not go after f2,g2,h2
>>>>5.h8R#
>>>>
>>>>I do not know of computers that calculates in that way but it is theoretically
>>>>possible to do it.
>>>
>>>I think you are using some knowledge here, that white is not mated in steps
>>>1.-4. If I'm not mistaken you have to prove that 1.h4 f5 does not end the game.
>>>
>>>Thus you have to examine that none of black's moves will mate white or stall
>>>mate black. This requires explicit search of each move and would give you a
>>>square root tree search.
>>>
>>>>If chest can do it then it can be faster but I have not simple idea how to
>>>>detect patterns like this pattern.
>>>
>>>They do simple algebra on pawn races. But that is because the programmer assumes
>>>the knowledge that we need to promote to win. It is not always true, you can
>>>mate with a pawn.
>>
>>I can assure you, that the programmer of Chest is well aware of the fact
>>that a pawn may deliver direct checks without a prior promotion ;-)
>>
>>Chest has a special "theory" for the case that the attacker has left just
>>pawns and the king.  It calculates a minimum number of moves the attacker
>>has to perform in order to deliver a check.  Trying to find an even
>>shorter mate is guaranteed to fail.
>>
>>For the defender side Chest assumes a very simple strategy: the king will
>>move between two squares.  As long as we can show that that will remain
>>to be a legal move, the defender cannot possibly be mated.
>
>In this case the defender(black) has no legal moves with the king but only with
>the pawns.

Yes.  Therefore Chest's simple trick does not work in this position.
Sorry, I should have said that.

In the following example Chest's trick works better:
[D]1k6/2p5/2P3p1/p1P1p1P1/2PpPp2/3p1p2/3P1P2/5K2 w - -
Chest calculates that at least 7 white moves are necessary, so that
giving this as "mate in 6" terminates without any search.

>>No moves are executed, no trees are examined, Chest just examines where
>>the remaining pawns may be pushed to, and whether that may disturb the
>>primitive strategy of the defender, by calculating distances between
>>the pawns possible target  squares and the defender king.
>>
>>In some positions this helps Chest to reach much larger depths.
>>
>>Cheers,
>>Heiner
>
>I do not understand the strategy of chest here
>
>1)Does chest generates a tree to prove no mate in 4 here?
>(the black king has no moves unless white moves with the king)

No.  No tree.

>2)Does chest generates a tree with all the possible alternatives for the
>defender to prove mate in 5(again it is not needed because all alternatives are
>eqvivalent because black cannot promote a pawn or threat check and there is no
>stalemate)?

No.  For black (defender) Chest assumes a very simple strategy:
the black king will move forth and back.  If even that is not possible,
the trick fails to prove anything, and normal search is continued.

If we can show for even this simple strategy, that black can avoid being
mated for 6 further white moves, then we know, that white will need at least
7 of these moves... i.e. "no mate in 6" is known already.

After fixing the position of the black king, Chest scans the white resources
that may interrupt black's king moves.
Either the white king approaches (we get a distance = #moves),
or a pawn approaches, maybe after some blocking black material has been
captured, or a pawn promotes.

For all of the possible reasons Chest calculates a minimum #moves necessary
(sometimes this minimum is crude (too small), but it is never too large).
From this we get an overall minimum depth required for a forced mate.

Of course, the details are a bit more complicated.
Also, one can do all this with varying degrees of sophistication.
Chest is not very clever, here.  Still, it helps sometimes.

Cheers,
Heiner



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.