zobrist

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLetters = 35

Variables

This section is empty.

Functions

This section is empty.

Types

type Zobrist

type Zobrist struct {
	TheirTurn uint64

	PosTable       [][]uint64
	OurRackTable   [][]uint64
	TheirRackTable [][]uint64
	ScorelessTurns [3]uint64
	// contains filtered or unexported fields
}

generate a zobrist hash for a crossword game position. https://en.wikipedia.org/wiki/Zobrist_hashing

func (*Zobrist) AddMove

func (z *Zobrist) AddMove(key uint64, m *tinymove.SmallMove,
	moveRack *tilemapping.Rack, moveTiles *[board.MaxBoardDim]tilemapping.MachineLetter,
	wasOurMove bool, ScorelessTurns, lastScorelessTurns int) uint64

func (*Zobrist) BoardDim added in v0.8.4

func (z *Zobrist) BoardDim() int

func (*Zobrist) Dump added in v0.9.0

func (z *Zobrist) Dump(w io.Writer)

func (*Zobrist) Hash

func (z *Zobrist) Hash(squares tilemapping.MachineWord,
	ourRack, theirRack *tilemapping.Rack, theirTurn bool, scorelessTurns int) uint64

func (*Zobrist) Initialize

func (z *Zobrist) Initialize(boardDim int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL