Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Did Uri write movei? (yes)

Author: Uri Blass

Date: 14:24:04 06/13/02

Go up one level in this thread


On June 13, 2002 at 16:36:44, Robert Hyatt wrote:

>On June 13, 2002 at 15:07:25, Dann Corbit wrote:
>
>>On June 13, 2002 at 14:45:06, stuart taylor wrote:
>>[snip]
>>>That's great! I didn't realize it was you.
>>>I wish you great success, and I'm sure you might eventually  become no.1 on
>>>ssdf! (but don't waste too much time over it).]
>>
>>I think Uri has taken a very wise approach.  He spent a great deal of time
>>optimizing a move generator.  This is the heart of a chess program.  A program
>>that has everything else excellent, but an average move generator can become
>>strong but not a superstar, because it will become a bottleneck at some point.
>>
>
>
>From experience, his approach is backward.
>
>Why?
>
>Because as the total program evolves, the data structures will necessarily
>change several times.  If you spend months on one particular part, only to find
>later that it has to be basically re-written because of other parts of the
>engine, then that is time wasted.
>
>My approach was to first get everything working.  Settle on specific data
>structures where feasible and design around them.  Then, as it became obvious
>that certain parts of the program had become "static" then those parts could
>be studied and optimized carefully.  The "dynamic" parts of the program (notably
>the search itself and the evaluation) are tough to optimize because they change
>significantly over a developmental cycle.
>
>For example, imagine that I had spend months on only my move generator:
>
>  4.28     54.78     3.82  1306347     0.00     0.00  GenerateCaptures
>
>  2.62     72.19     2.34   433594     0.01     0.01  GenerateMoves
>
>
>GenerateCaptures is 4.2% of the _total_ search time.  GenerateMoves() adds
>another 2.62%.  Total is 6.8% of the total time.  Optimizing that is not
>really very productive.

I agree that in this case optimizing it is not very productive but when I
generates only legal moves and when I think to use the number of legal moves for
the evaluation function things are different.

<snipped>
>That is one reason I always recommend "get the whole thing working first"
>so that you will have to get the data structures right before you start doing
>the fine-tuning/speed optimizations...
>
>Were GenerateMoves() 75% of the total time, working on it extensively might
>be the right thing to do, early in the development cycle.


I knew that it is going to be the case before developing my program because of
my choice to generate only legal moves and use this information in the
evaluation function.

I believe that I did most of the things that can be done about the algorithm but
the project is written in C and I will not be surprised if it is still possible
to do the move generator twice faster by assembler tricks.

Uri



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.