Author: Uri Blass
Date: 15:30:40 08/21/05
Go up one level in this thread
On August 21, 2005 at 18:14:23, Bo Persson wrote:
>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!
I understand but copy and paste simply does not work even if I want to copy it
to my structure because the board is only of 64 squares.
I need to replace from-33,from-31,... by
knightmove[from][0],knightmove[from][1],...knightmove[from][knightnumber[from]-1]
>
>
>
>>
>>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!
Yes but evaluation terms are ideas and not code and they can be copied based on
what I understood from fabien.
>
>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?
There is no problem if you have only original evaluation and the problem is only
if you want to add fruit personality
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.