Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: when is a clone a clone?

Author: martin fierz

Date: 04:16:00 11/28/03

Go up one level in this thread


On November 28, 2003 at 07:07:43, Tord Romstad wrote:

>On November 28, 2003 at 06:52:45, Odd Gunnar Malin wrote:
>
>>On November 28, 2003 at 06:44:48, Tord Romstad wrote:
>>>
>>>But still, my 64-bit random number generator is copied directly from
>>>Crafty's source code.  Does this make my engine a clone?  If you or
>>>somebody else thinks the answer is "yes", I will consider replacing
>>>the random number code in my next version, even though it will force
>>>my users to download the opening book again.
>>>
>>>Tord
>>
>>If you took it as it is without testing, yes I would think so.
>
>That's what I did.  I did not test the code, I have not read Knuth's
>book, and I have no idea how the random number code works (I haven't
>even tried to read it).
>
>In order to spare my users from having to download the opening book
>again:  Would it be acceptable to remove the random number generator
>from my engine, and instead use Crafty's random number generator to
>create a small binary file of random numbers for use in Zobrist hashing,
>and let my engine initialize its tables from this file at startup?  I
>would then no longer have any part of Crafty's code in my engine, but
>I could still continue to use my old opening book.
>
>Tord

your random number generator goes in the same direction as the functions i asked
about, popcount and firstone. like a decent random number generator, these are
functions that we just need to help us with our programs, they are not in any
way relevant once they work reasonably.

it's unfortunate that C does not provide us with a good implementation of all
these functions directly, then we would not have to discuss this.

i certainly don't see a problem with using such code snippets, although i don't
have any in my program. i have a modified version of firstone, but since i
modified it it's not the same as crafty's any more, and it's hard to prove that
i took it from crafty anyway - probably all assembler firstone functions for 64
bit numbers look *very* similar.

cheers
  martin



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.