Documentation ¶
Overview ¶
Package transposition implements different transposition table strategies to memoize search results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { fmt.Stringer Init(size int) error // Init initializes the transposition hash table. Set(key *chess.Position, value Entry) // Set adds an entry to the cache for the given position. If an entry already exists for the position, it is replaced. The addition is not guaranteed. Get(key *chess.Position) (Entry, bool) // Get returns the entry (if any) and a boolean representing whether the value was found or not. Close() // Close initiates a graceful shutdown of the transposition table. }
Interface is the interface implemented by objects that can memoize search results.
type None ¶
type None struct{}
None is the strategy used when we want no transposition hash tables.
type Ristretto ¶
type Ristretto struct {
// contains filtered or unexported fields
}
Ristretto implements transposition hash tables using the Ristretto library. It is safe to use concurrently.
Click to show internal directories.
Click to hide internal directories.