Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: My weird board representation leads to limit on pieces.

Author: Robert Hyatt

Date: 07:28:49 07/10/99

Go up one level in this thread


On July 10, 1999 at 01:36:27, KarinsDad wrote:

>On July 09, 1999 at 20:56:10, Robert Hyatt wrote:
>
>[snip]
>>
>>
>>None of that goes with "alpha/beta minimax depth-first".  I _must_ search to
>>tip positions before looking at any score...  And I'm not willing to bet that
>>searching 30+ plies deeply along selected lines will not find some way to make
>>this happen.
>
>Hhhmmmm. 30 plies (only 15 moves per side) would require that the pawns be
>relatively far advanced already or promoted to queens already. Still, it seems
>unlikely that if most of the pawns are already promoted to queens that the
>program would not have found a mate 2 ply earlier in the game when it was
>searching 30 ply then (or 4 ply earlier or 12 ply earlier or whatever). But, the
>only way to know for sure is to record it if it occurs within a given program
>(at least you would know that it hasn't yet occurred until it actually does).
>


You are still overlooking the point...  finding a mate does _not_ mean that
no other branches in that area of the tree are searched.  When I try a move
that leads to mate, I still try the other moves at that ply as well, as they
might lead to a _shorter_ mate.  And that lets me run the search way on.
I have, on occasion, tested 'maxply' in crafty to see how deep it goes, and I
have hit 60 plies on several occasions...  60 plies meaning that from the root
(ply=0) I tried 30 full moves, 30 by white, 30 by black, which is a _long_ way
from that original position.

As I said, 9 queens is certainly unlikely... but I would either allow them, or
make sure they can never happen by kludging the promotion code to prevent it.  I
would not take a chance that in some important game, I will blow up because it
does happen.  And since I can't prove it won't happen, I assume it can...




>  Remember minimax doesn't search "logical" lines.  It searches
>>+all+ lines.  The position I reached with 5 white queens was done instantly in
>>a blitz game.  At the starting position both sides had _one_ queen.  By the
>>time I did an instant 8 ply search + extensions, etc, and got to the first
>>call to Evaluate() I had 5 white queens, which produced a score way > +infinity
>>and blew me up.
>
>Hopefully, I've already taken that into account within my evaluation (the simple
>one, not the detailed one, see below), but I haven't tested it yet.
>
>>
>>I agree that it is very unlikely.  But full-width searches often act like
>>"help-mate" searches...  one side does everything right,  the other side does
>>everything wrong, leading to very bizarre positions.  I'd at least cover the
>>case so that it wouldn't blow up.  Either by allowing 64 queens as I do now,
>>or by making sure no promotion is allowed if it takes me over my max limit.
>
>Always better to be safe than sorry.
>
>I have a square control mechanism which if I remember correctly, only takes into
>account up to 5 queens, 4 rooks, 4 bishops, 4 knights, and 2 pawns per side (the
>kings are considered separately). Now, since I use this for square control,
>obviously it is a little safer for any given square to assume this lower number
>of pieces (as opposed to on the entire board), but you have now gotten me
>thinking that maybe within a search, it is really not that safe at all.


I have been burned too many times.  Searching deeper than I thought physically
possible, reaching a position with more than N legal moves, where my move list
was of length N, having more than N of a single piece where N is the max due to
the way I coded something.  With Crafty you can fill all 64 squares with what-
ever you want, and it won't cause me a bit of grief...





>
>This was the square control for the non-battery square attack table, so 4 rooks
>max is fine, 4 bishops max is fine, and 2 pawns max is fine, but you could have
>upwards of 8 queens or 8 knights. I figured that this would be tough to
>accomplish in the search (especially the knights since not only would the
>program have to consider promoting to a knight, but it is real hard to maneuver
>a lot of knights to the proper squares so that they can all attack the same
>square). But, because of your example, I may have to reconsider. Thanks Robert!
>
>KarinsDad :)



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.