Computer Chess Club Archives


Search

Terms

Messages

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

Author: KarinsDad

Date: 03:33:40 07/09/99

Go up one level in this thread


On July 08, 1999 at 21:59:17, Jonathan Goldstein wrote:

>After experimenting with board representaions for a few months,
>I found a representaion in which the move generator is slightly
>slower than rotated bitboards in the middlegame, but factors
>of 2 to 5 faster in the endgame (on a 32-bit processor).  I
>decided to go with this representation, but it does have one
>drawback: Each side cannot have more than 8 of any piece.
>
>Is this a problem for normal (not wild) chess?  At first I
>thought it couldn't possibly be, but then I considered if the
>engine ever gets fast enough to search 15 ply, and one of the
>extensions has the eighth pawn promoted, it could happen.  Am I
>just being rediculous? :)
>
>-Jon

The chances of it happening within your program are zero UNLESS someone sets up
a position where it could happen. So, the only thing you have to do is have your
program realize that a position was set up and make the 8th promotion illegal in
that case.

The reason:

In order to promote all 8 pawns of one side, you must clear the file in front of
the pawns so that they can move forward and promote. The easiest way to do this
is to sacrifice all of your pawns to the program. If the program plays pawn
takes pawn, you do not take back. However, while you are attempting to allow the
program to get all 8 of his pawns promoted, the program is still trying to mate
you. So, it may also be attempting to trade off pieces. If the piece taking is a
queen, you cannot take back or you may prevent the condition that you are
attempting to create (since the program will most likely promote to a queen in
most cases, this is the only piece that there even a chance of it being promoted
in a real game, so this is the piece that you cannot take back if you are
attempting to create this condition in a real game).

Hence, the program will be taking your pawns and pieces at will and you cannot
respond if it is a pawn or queen making the capture. The program will mate you
LONG before you can ever find a way to allow the program to get 9 queens.

So, even from a theoretical standpoint and not just a practical standpoint, it
is TOTALLY safe to do when playing against the program in a real game (i.e. not
in a setup position).

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.