Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about definition of clones

Author: Bo Persson

Date: 15:14:23 08/21/05

Go up one level in this thread


On August 21, 2005 at 06:07:19, Uri Blass wrote:

>My thoughts:
>
>1)It means that if the programmer find that some data structure is better and
>understand the code he may later write equivalent structure by himself without
>copy and paste and it is ok.
>
>2)I think about evaluation weights that they are not code so there is no problem
>to copy them.

But a problem is that to be able to use the same weights, you also have to use
the same evaluation terms, and they are code.

In a well known program I find the weights:

   static const int KnightUnit = 4;
   static const int BishopUnit = 6;
   static const int RookUnit = 7;
   static const int QueenUnit = 13;

Fine.

Now if I want to have some use for KnightUnit, I also need this section:

         switch (PIECE_TYPE(piece)) {

         case Knight64:

            // mobility

            mob = -KnightUnit;

            mob += unit[board->square[from-33]];
            mob += unit[board->square[from-31]];
            mob += unit[board->square[from-18]];
            mob += unit[board->square[from-14]];
            mob += unit[board->square[from+14]];
            mob += unit[board->square[from+18]];
            mob += unit[board->square[from+31]];
            mob += unit[board->square[from+33]];

            op[me] += mob * KnightMobOpening;
            eg[me] += mob * KnightMobEndgame;

            break;


And now I am in deep trouble!



>
>Explanation:The programmer may let the user to change the numbers and not copy
>and paste nothing and basically there is no difference between program that use
>fruit's numbers and a program that allow the user to choose fruit's numbers.

Except that the program has to have exactly the same evaluation terms!

If my program doesn't compute bishop or rook mobility, how can I use the
weights? What if I have terms that fruit doesn't have any weights for?

>
>Uri



Bo Persson



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.