Computer Chess Club Archives




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

Author: Christophe Theron

Date: 20:06:11 04/08/99

Go up one level in this thread

On April 08, 1999 at 13:49:49, Bruce Moreland wrote:

>On April 08, 1999 at 12:45:42, Steve Maughan wrote:
>>>>Nope, I've never done this.
>>>This is really surprising!
>>Yes indeed it is!  Bruce - I assume you have tried the "play the hash move
>>before generating other moves" idea and not found a benefit, yet I cann't see
>>any situation where this wouldn't be an easy win.
>>I'm puzzled!
>I use a move table.  A move is described as a pointer into the move table.  At
>the time I originally wrote the program, I didn't have enough space in the move
>table for a pointer back to the source square.
>So if I had a pointer to the move table, I knew I had something that described a
>unique move, but I didn't know which piece was doing the moving, I had to store
>that seperately.
>I put one of these pointers in my hash table when I failed high, to remember
>what the best move was, and when I encountered this node later, I could figure
>out if I was trying to execute the same move that was in the hash table, and if
>so, order it highly.
>But I couldn't reconstruct the whole move itself from the pointer.  All I knew
>was, for instance, that a white knight was coming from some unique place and
>going to e5.  I had no idea that the knight was coming from f3.
>So for me, incremental move generation of this sort was not an option.
>That was back in the 16-bit world.  I had to have that move table element as
>small as possible, since I jammed it into my code segment.
>My program is now a 32-bit program and that table is now about half a megabyte.
>But I still don't have the source square in the move table.
>If I put the source square in the move table and did incremental move
>generation, it might be a good thing, I could save quite a few move generations.
> But on the other hand, I would have to deal with the topic of this thread, and
>I would have to mess up a few loops and write some move verification code that
>would be a little icky given how rarely it is executed.
>That's the story.

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 page took 0.01 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.