Computer Chess Club Archives




Subject: Re: Move ordering - How do I know if I have played this move already?

Author: Christophe Theron

Date: 17:56:39 04/09/99

Go up one level in this thread

On April 09, 1999 at 17:05:28, Peter McKenzie wrote:

>On April 09, 1999 at 13:00:28, Christophe Theron wrote:
>>On April 09, 1999 at 00:48:35, Bruce Moreland wrote:
>>>On April 08, 1999 at 23:06:11, Christophe Theron wrote:
>>>>This reminds me of a friend of mine (french he has now moved to Canada), who
>>>>wanted to write a chess program. He began with move generation, and wrote a
>>>>program that generated a (huge) source assembly code. In this generated code,
>>>>for each piece on every possible square there was a routine you could call. This
>>>>routine would generate in a blink all the possible moves of that piece!
>>>>May be the fastest move generator you can dream of on a PC...
>>>>But maybe not very useful because of the frequent cutoffs you get with simple
>>>>hash move, captures and killers.
>>>>The guy has stopped working on his chess program unfortunately...
>>>This is the thing about move generators.  It's the first thing that everyone
>>>does, and they go nuts on them.
>>>I think that it's most important that they don't have bugs, don't go too
>>>incredibly godawful slow, and fits in well with the rest of the program.
>>>By the way, I wonder how fast your friend's thing really was?  It may have been
>>>so big it blew cache.  The 0x88 system is a tiny bit of code with a few little
>>>data tables, it might actually go faster, I don't know.
>>I was actually thinking of this cache blowout problem when I wrote my message.
>>At that time (1993 IIRC), we were not aware about the cache problem. I remember
>>that his move generator was times faster than mine, without remembering more
>>details, on 386 and 486 computers. Anyway it was impressive.
>>It may be not so fast on Pentium processors.
>>Anyway, the real speed of the move list generator is not the key point in a
>>chess program. Recently I rewrote a part of my move generator. It was a totally
>>incremental move generator, rather slow as I had to call a procedure to get a
>>move, and I turned it into a fast list generator (all the moves are spit into a
>>list as fast as possible). I do that only when I know I'm going to need all the
>>moves (the probability of a cutoff is low). I thought the new technique would be
>>much faster.
>>Well, overall my program is now 1% faster!
>And maybe the probability of there being a bug in your program has increased by
>more than 1% ?!

Hard to say...

I have a lot of #if in my sources to activate sanity check code. After any
important change like that I activate the code and let the program run
overnight, eating positions and at the same time autochecking itself.

The tests have found nothing wrong, so I guess its not more buggy than the
previous version... And anyway the new code is simpler than the previous one.


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.