Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Should I test for hash move legality?

Author: Bruce Moreland

Date: 00:25:46 12/30/00

Go up one level in this thread


On December 29, 2000 at 06:52:51, Steve Maughan wrote:

>Currently in my program I generate all of the moves then loop through looking
>for the hash move, giving it a 'high' move order score went found.  This works
>well and is simple to implement.  It would be (much) better to not generate all
>of the other maoves and simply take the hash move and play it first, generating
>all the other moves if a cutoff is not forthcoming.
>
>This give rise to a problem - how can I be sure that the hash move is legal?
>
>It could be the case that I have a hash collision - yes I use a 64 bit key but
>it's still possible - and no doubt it would happen in the final round of the
>World Championships just as I was about to slaughter Shredder 8 (;-)) yes in my
>dreams I know!!).
>
>I guess I have a series of options:
>
>1) Ignore the possibility and realise that I'll never get to the last round of
>the WMCCC.
>2) Perform a full legal move check (expensive!)
>3) Check that the piece to move is on the expected square
>4) Do (3) and check that the destination square is reasonable for the piece to
>move but don't bother about checking for sliding peices being blocked.
>
>At the moment I'm favouring (4) as this could be accomplished with a simple
>lookup table.
>
>What do others do?  Any advice appreciated!
>
>Regards,
>
>Steve Maughan
>
>PS I use a x88 structure.

Mine uses a move table, so I just store a pointer to the move table element for
the best move in the hash table.  When I generate moves I will notice if that
move is generated, and I will search it first.

bruce





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.