Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fritz 5 can mate with KQ vs KR (boy was I wrong here)

Author: Robert Hyatt

Date: 19:05:56 10/14/98

Go up one level in this thread


On October 14, 1998 at 21:13:07, Roberto Waldteufel wrote:

>
>On October 14, 1998 at 12:45:08, Robert Hyatt wrote:
>
>>On October 14, 1998 at 12:18:37, John Coffey wrote:
>>
>>>On October 13, 1998 at 20:37:43, Robert Hyatt wrote:
>>>
>>>>On October 13, 1998 at 18:41:22, Mark Young wrote:
>>>>
>>>>>On October 13, 1998 at 17:35:34, Robert Hyatt wrote:
>>>>>
>>>>>>
>>>>>>After reading this thread, I decided to run a test myself.  I started
>>>>>>off with 20 games of crafty vs crafty, white having KQ and no tablebases,
>>>>>>black having tablebases.  At 20 seconds per move, this ended in 20 wins
>>>>>>for white which surprised me.  I took several different positions (20 in
>>>>>>total) most of which were mate in 30 or greater and gave crafty 20 secs/move
>>>>>>using 1 cpu on my ALR.  All wins.  I didn't expect this.
>>>>>>
>>>>>>I then repeated this at 10 secs/move.  All wins.
>>>>>>
>>>>>>I then repeated it at 5 secs/move.  All wins.  I was going to try 1 sec
>>>>>>but decided that to the computer, this is far easier than I thought.  It
>>>>>>seems that the simple heuristic drive king to the edge, then to the
>>>>>>corner, is enough.  It didn't play it perfectly, but it never slipped more
>>>>>>than 2 moves from optimal at any single move.  And when it started off at
>>>>>>mate in 34, the "game" never went past 40 moves.
>>>>>>
>>>>>>So, I retract my original feeling, that KQ vs KR is hard with the KR
>>>>>>side having a database.  It seems it is a "trivial" ending regardless of
>>>>>>having them or not.
>>>>>>
>>>>>>Most surprising...
>>>>>
>>>>>It happens to the best of us. I wonder if this simple idea of driving the king
>>>>>to the edge, then to the corner is what the Grandmaster's caught onto so quickly
>>>>>after only drawing the first few times, or did they find some other idea that
>>>>>also works.
>>>>
>>>>
>>>>No.. there's more to it than that... the main problem is the rook on the
>>>>opposite board, checking the king at the right time, also preventing the
>>>>king and queen from getting on the same rank or file for a skewer... and
>>>>the check lets the king "out" to the other side where it has to be done
>>>>again, and once it it out, the 50 move counter usually ends the game.
>>>>
>>>>I am utterly amazed that a 5 second search can solve this.  Had you told
>>>>me this a year ago I'd have laughed.  As it was I was skeptical.  And when
>>>>I saw it I was *still* skeptical and was looking for a setup error in my
>>>>experiment.
>>>>
>>>>I still want to try at 1 sec / move however...
>>>>
>>>>but this is definitely easier than KBN K now...  to the computer, because
>>>>it takes a special piece/square table to win, since you have to drive to
>>>>the right corner as well...
>>>
>>>Although i doubt that any program can see the solution all the way through in
>>>such short time, I am sure that they can find a position that
>>>brings them closer to a solution (such as getting the king to the side of the
>>>board or corner, as you have said.)
>>>
>>>John Coffey
>>
>>
>>this is the point...  a few moves by crafty (non-tablebase) looked pointless and
>>I would peek at the other program's log file only to discover the mate distance
>>went down by 1.  After studying a minute or two, the pointless move covered a
>>square so that the "great flying rook" couldn't check from the rear and let
>>the king out of the box.
>>
>>Another thing that is interesting is that it is really not difficult to play
>>this ending perfectly.  One thing I noticed, in studying the games, is that at
>>any given position, there are always a couple of bummers that let the king back
>>out to the center and start things over.  But there are also *lots* of moves
>>that are either optimal or within 1 of optimal.  Which means that this is a
>>pain for people, to avoid missing those 1/2 moves that break the king back
>>out, while for a computer, only interested in squeezing the king to the corner
>>with no idea it can be mated, these odd moves are obvious and are avoided with
>>ease.
>>
>>I just would never have believed this is easier than KBN vs K for a computer.
>>KBN can be a problem in worst-case positions, because a very short search
>>doesn't shed much light on forcing the opponent to the edge... you have to first
>>get yourself off the edge and into the center, so it takes a weak centralization
>>score for the winning side, and a stronger de-centralization score for the
>>losing side, to make this ending happen without tablebases and using a very
>>shallow search...
>
>I use this technique for mating a lone king with major pieces or pair of bishops
>(except I now use self generated tablebase for straight KQK or KRK with no other
>pieces), but surely for KBNK you need two evaluations, depending on the bishop
>you have, since the king needs to be forced into the right corner. This could
>easily be handled by a preprocessor, and would be well suited to piece-square
>value tables. There are also a small number of positions in KBNK which are drawn
>even with the stronger side to move, due to the knight being trapped, which can
>never happen in KQK, KRK or KBBK mates, so the evaluation function becomes more
>complex if this is to be taken into account as well. Has anyone succesfully done
>KBNK with an evaluation like this and a shallow search? My attempts were not
>terribly encouraging. Of all the lone king mates, I think KBNK is the one best
>suited to solution by tablebase, since the search and evaluation based on
>centrality works so well for the others.
>
>Best wishes,
>Roberto


the last time I tried this, on a P5/133, crafty at 1 minute per move could beat
a tablebase program from the worst case (mate in 34) within 50 moves.  When I
tried it at real fast time controls, it could win, from this position, but not
within 50 moves.  For more normal positions, which are mate-in-15 or so, it
could win those quite easily...  It only needs enough search to see the mate
at the end, something like a mate in 4 or so, which takes a fraction of a
second.

I have two "mate boards" and use the "right" one depending on the bishop I
have.  I assume it still works, but will run the test in a few minutes on my
notebook to see...  just like KQ vs KR tests...



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.