Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Integer or Floating Point for Scoring?

Author: Dann Corbit

Date: 00:12:13 02/09/99

Go up one level in this thread


On February 09, 1999 at 03:04:44, Frank Schneider wrote:

>On February 09, 1999 at 02:43:52, Larry Griffiths wrote:
>
>>I have been using Floating point (double) for my evaluation (scoring)
>>function.  I set some variables to 0.0 when starting the Alpha-Beta search.
>>I add values to these variables when a move is made and then subtract them
>>back out when restoreing the piece.  I have found that the result is not
>>always returned back to 0.0.  I get something like 3.56234567343534-18.
>>
>>Should I be using integers for scoring instead?
>>
>>Thanks in advance!   :->
>>
>>Larry
>I think most programs use integers or longs for the scoring. I see two
>advantages:
>1. faster code
That is the conventional wisdom, but I would benchmark to be sure.  For some
newer chips, floating point is actually faster than integer math.

>2. (probably) more stable search and more cutoffs
Again, I would want to see evidence.  Truncation is more likely to be a problem
in integer math than floating point.

Quite likely, you are correct on both counts.  Yet to be sure, it is a good idea
to check on your intended architecture.



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.