Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Too Large Positional Contributions to Score

Author: David Blackman

Date: 23:53:58 03/07/99

Go up one level in this thread


On March 08, 1999 at 01:36:56, Peter McKenzie wrote:

>On March 07, 1999 at 23:37:39, Peter McKenzie wrote:
>
>>On March 07, 1999 at 23:29:31, Stuart Cracraft wrote:
>>
>>>Crafty seems to have a Scale_Up/Scale_Down factor and I'm curious
>>>if Bob would talk a little about this. Seems costly to add a memory
>>>reference and a division (?).
>>
>>I'm guess his divisions are usually by a constant that is a multiple of 2, in
>
>oops, I meant power of 2 ...
>
>>which case the compiler will just do a bit shift.

Not if you're using signed integers. The way the IEEE recommends to do signed
integer division and the way most chips and compilers do it is to round towards
0. Right shift rounds towards -infinity. Because of the difference, most
compilers don't do this optimisation for signed numbers.

Of course Bob might use unsigned integers here. I haven't looked at his code.



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.