Author: martin fierz
Date: 04:03:08 11/28/03
Go up one level in this thread
On November 28, 2003 at 06:12:43, Odd Gunnar Malin wrote: >On November 28, 2003 at 05:00:49, martin fierz wrote: > >>just a short question: >> >>if i rip assembler stuff like popcount and firstone from the crafty source, but >>the rest of my program is entirely different, am i doing something wrong? >> >>if i use the kogge-stone floodfill algorithms posted here by steffan westcott, >>am i doing something wrong? >> > >As soon as you start copying code from another source I think it is cheating if >you want to participate in a competition with your program. > >>how much foreign code is allowed? > >None. that's why i asked - because i believe this is the wrong answer (i don't know what the official rules say). i guess everybody who uses bitboards has a popcount and firstone function. they are part of every bitboard program, and i bet lots of them are identical - simply because there are not too many ways to write such a function. or also because they all use the same well-known method to count bits with "while (x), x&=x-1;" for bitboard programs they are basic functions; you need & and | and shifts for your bitboard program, and you also need popcount and firstone. if these functions were implemented in C directly (like & and | and shifts), nobody would have a problem. on some processors, they are in fact implemented, and you need one assembler instruction to execute them. whether you use your own popcount or crafty's assembler popcount makes a negligible difference for your program (except if you have an incredibly stupid way of counting bits...). should small functions like these really be relevant to the question "is this a clone?" ? i don't think so! even stuff like EGTB code is allowed to be used in all programs, and that is *much* more sophisticated... 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.