Author: Uri Blass
Date: 08:50:18 11/28/03
Go up one level in this thread
On November 28, 2003 at 11:47:15, Tom Likens wrote:
>On November 28, 2003 at 11:05:12, Uri Blass wrote:
>
>>On November 28, 2003 at 10:45:54, Grzegorz Sidorowicz wrote:
>>
>>>I agree with you.
>>>But on other hand for me Crafty source code is trash :-)
>>>I don't understand it :-) and it can't help me :)))
>>>...and it is not only my opinion....it is too big, too complicated.
>>
>>
>>It could help me inspite of the fact that I did not understand most of it.
>>
>>I remember that when I implemented killer moves I look at crafty's code and
>>copied phase[ply] from it.
>>
>>I also have constants for the different phases like goodcapture and
>>firstkillermove that I probably copied from crafty(I guess that for some people
>>the fact that I copied some single words means that I have a crafty clone).
>>
>>I also looked at its evaluation and implemented smaller bonus for blocked passed
>>pawns(of course in that case I could not copy and paste but I used the same
>>idea).
>>
>>If you need another proof that movei is a crafty clone by the standard of some
>>guys then the following line is copied from crafty if I remember correctly
>>(Movei is not based on bitboards but I use bitboards for pawn structure).
>>
>>typedef unsigned __int64 BitBoard;
>>
>>The most significant proof that movei is a crafty clone is that I have the
>>following functions for bitboards(the last 2 are not copied directly from crafty
>>but are basically based on Crafty's code when I believe that the first one is
>>copied from Crafty)
>>
>>I cannot find more convincing evidence that movei is a crafty clone but I guess
>>that for some guys the evidence that I give in this post is convincing enough.
>>
>>int PopCount(register BitBoard a) {
>> register int c=0;
>>
>> while(a) {
>> c++;
>> a &= a - 1;
>> }
>> return(c);
>>}
>>
>>
>>int smallest_pow(BitBoard arg1)
>>{
>> if (arg1&65535)
>> return (smallest_power[arg1&65535]);
>>
>> if ((arg1>>16)&65535)
>> return (smallest_power[(arg1>>16)&65535]+16);
>>
>> if ((arg1>>32)&65535)
>> return (smallest_power[(arg1>>32)&65535]+32);
>> return (smallest_power[(arg1>>48)]+48);
>>}
>>
>>int biggest_pow(BitBoard arg1)
>>{
>> if (arg1>>48)
>> return biggest_power[(arg1>>48)]+48;
>> if (arg1>>32)
>> return biggest_power[(arg1>>32)]+32;
>> if (arg1>>16)
>> return biggest_power[(arg1>>16)]+16;
>> return biggest_power[arg1];
>>}
>>
>>Uri
>
>Uri,
>
>I haven't looked at Crafty's code in a long time. What are these last two
>functions used for in your program (or Crafty for that matter)?
>
>regards,
>--tom
In Crafty it is firstone and lastone and they are used to find the first bit and
the last bit.
I wrote them slightly different and used different names of arrays because the
name firstone and lastone did not seem to me significant but the idea is the
same.
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.