[gambit-list] Hashing of types
Marc Feeley
feeley at iro.umontreal.ca
Mon Aug 10 15:59:58 EDT 2009
On 10-Aug-09, at 3:31 PM, Alex Queiroz wrote:
> Hallo,
>
> Is there a way to tell the table hashing function to ignore a
> field of a define-type'd value? I am writing a function for alpha-beta
> searching, and I'd like to use a cache to avoid re-searching
> previously calculated positions. So I have defined the type:
>
> (define-type node
> id: d7aba792-963c-41c9-b1fd-e5e26590ab34
>
> seq
> ply
> move
> value ; cached value of evaluation function,
> ; not full search value
> (board unprintable:))
>
> I need that the field 'move' be ignored by the hash function for
> equal?. Is that possible?
Use:
(define-type node
id: d7aba792-963c-41c9-b1fd-e5e26590ab34
seq
ply
move
value ; cached value of evaluation function,
; not full search value
(board unprintable: equality-skip:))
Marc
More information about the Gambit-list
mailing list