Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty null move question

Author: Steffen Jakob

Date: 09:08:11 07/18/02

Go up one level in this thread


Hi Bob!

On July 18, 2002 at 11:52:39, Robert Hyatt wrote:

>>Calculating <421 is faster than calculating 7*INCPLY again and again.
>
>
>Speed is not an issue for the calculation.  if INCPLY is a constant, then
>the compiler realizes 7*INCPLY is _also_ a constant and will produce the code
>using the constant 420 rather than doing the calculation.
>
>The reason it is a constant (magic number as Steffen said) is that as I tested
>this, I played with a _lot_ of different values, and I found things like
>6*INCPLY+30 to be tedius to type.  Once I settled on 7*INCPLY I should have
>used that to make it more readable of course, and I will fix this (and others)
>as I notice them.

Because I had a look at SwapXray yesterday I remember that the direction numbers
are "magic" too :-)

Same for the usage of 'a&7', 'a>>3' or 'outside&192'.

Another thing I remember is that the EXTENSIONS type from chess.h is unused.
Same for FAIL_LOW_POS.

Greetings,
Steffen.



This page took 0.01 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.