Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Promotion frequency

Author: Bo Persson

Date: 01:33:24 07/23/02

Go up one level in this thread


On July 23, 2002 at 00:49:51, Peter Kappler wrote:

>>
>>Why all the is() functions?  The promotions are just another possible move.
>>Do you say:
>>if (move.isKnightMove()..)
>>else if move.isPawnPush()...
>>...
>
>I agree.  You're going way overboard if you have per-piece versions of all those
>functions.  Keep it simple.
>

No, I disagree totally. This *is* simple!

My complaint would have been that it is not OO enough :-), and would have
preferred somewthing like:

if (move.MovedPiece().isKing())

So you are asking the *piece* what kind it is, not the move.

>
>You could also ignore rook and bishop underpromotions.  This might cost you a
>half point once every 500,000 games or so, but I think the speedup is worth it.
>:)

Except that it will of course happen just once, but during the playoff for the
WCCC title.


Bo Persson
bop2@telia.com



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.