Documentation
¶
Index ¶
- Constants
- type ExhaustiveLeaveStrategy
- func (els ExhaustiveLeaveStrategy) Equity(play *move.Move, board *board.GameBoard, bag *alphabet.Bag, ...) float64
- func (els *ExhaustiveLeaveStrategy) Init(lexiconName string, alph *alphabet.Alphabet, strategyDir, leavefile string) error
- func (els ExhaustiveLeaveStrategy) LeaveValue(leave alphabet.MachineWord) float64
- type NoLeaveStrategy
- type Strategizer
Constants ¶
View Source
const (
LeaveFilename = "leaves.idx.gz"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExhaustiveLeaveStrategy ¶
type ExhaustiveLeaveStrategy struct {
// contains filtered or unexported fields
}
ExhaustiveLeaveStrategy should apply an equity calculation for all leaves exhaustively.
func NewExhaustiveLeaveStrategy ¶ added in v0.2.11
func (ExhaustiveLeaveStrategy) LeaveValue ¶ added in v0.4.0
func (els ExhaustiveLeaveStrategy) LeaveValue(leave alphabet.MachineWord) float64
type NoLeaveStrategy ¶
type NoLeaveStrategy struct{}
NoLeaveStrategy does not take leave into account at all.
func NewNoLeaveStrategy ¶ added in v0.4.2
func NewNoLeaveStrategy() *NoLeaveStrategy
func (*NoLeaveStrategy) LeaveValue ¶ added in v0.4.0
func (nls *NoLeaveStrategy) LeaveValue(leave alphabet.MachineWord) float64
type Strategizer ¶
type Strategizer interface { // Equity is a catch-all term for most post-score adjustments that // need to be made. It includes first-turn placement heuristic, // leave calculations, any pre-endgame timing heuristics, and more. Equity(play *move.Move, board *board.GameBoard, bag *alphabet.Bag, oppRack *alphabet.Rack) float64 LeaveValue(leave alphabet.MachineWord) float64 }
Strategizer is in charge of picking plays using strategy.
Click to show internal directories.
Click to hide internal directories.