Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about Gerbil

Author: Robert Hyatt

Date: 05:37:02 07/12/01

Go up one level in this thread


On July 12, 2001 at 01:45:32, Bruce Moreland wrote:

>On July 12, 2001 at 00:00:20, Robert Hyatt wrote:
>
>>On July 11, 2001 at 19:14:57, Bruce Moreland wrote:
>>
>>>On July 11, 2001 at 18:57:02, Dann Corbit wrote:
>>>
>>>>On July 11, 2001 at 18:52:10, Bruce Moreland wrote:
>>>>
>>>>>On July 11, 2001 at 16:56:49, Artem Pyatakov wrote:
>>>>>
>>>>>>Thanks for the reply. Wow, that does sound like a really good solution to the
>>>>>>problem... One last question, even with your explanation of what Gerbil is
>>>>>>doing, I am still not good enough to find where he is actually hashing the
>>>>>>"useful" en passant squares.
>>>>>>
>>>>>>Could you or Bruce point me to where this hashing of EP squares is actually
>>>>>>done?
>>>>>>
>>>>>>Artem Pyatakov
>>>>>
>>>>>It's not.  I completely ignored the problem.
>>>>>
>>>>>The next version hashes in en-passant and castling for purposes of detecting 3x
>>>>>repetition, but other than that it doesn't do anything with castling or
>>>>>en-passant yet.
>>>>
>>>>I must misunderstand your code then, because in makemove, I can see you dealing
>>>>with the e.p. status flag.
>>>
>>>There are two things I have to deal with.  One is executing the en-passant
>>>capture, and the other is setting up the next ply if someone just played e2-e4.
>>>
>>>The current code just checks to see if there is a black pawn on d4 or f4 before
>>>setting the en-passant square to e3.
>>>
>>>The reason I do it like that is that's what I do in Ferret.
>>>
>>>Actually it's probably okay to dummy-check it in makemove (like I do).  If I
>>>dummy check it in hash table probe/store, that's twice I have to deal with it.
>>>
>>>But perhaps that's the right place to XOR in the en-passant and castling hash
>>>crap.
>>>
>>>Maybe I'm on drugs.
>>>
>>>But Gerbil doesn't change the hash key based upon en-passant square or castling
>>>flags now (and neither does Ferret).
>>>
>>>Ferret handles it when it's doing opening book stuff (which uses the hash key)
>>>and 3x repetition checking, and Gerbil will in the next release.
>>>
>>>bruce
>>
>>I update this in MakeMove().  When I enter MakeMove() I copy EPTarget to ply+1.
>>If it is non-zero, this means that at this ply I could have made an EP capture,
>>and no matter whether I did or not, I need to clear this EP target, _and_ update
>>the hash signature by removing the EP[target] random number.
>>
>>This keeps my hash signature right for all cases, so that I can use it to hash,
>>to recognize repetitions, etc...
>>
>>And it costs essentially nothing in terms of performance...
>>.
>
>I decided that it's not worth messing with.  The only time I check this is when
>I'm trying to determine if there has been a 3x repetition.  So I actually took
>some code out -- I no longer bother with checking for a potential capturing pawn
>on either side.
>
>So not only am I not doing what Dann praises me for doing, I've removed the part
>that someone else praised me for.  Now people can curse me for ignoring the
>entire problem.
>
>bruce


Consider yourself cursed.

:)



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.