Documentation
¶
Index ¶
- Constants
- func LeaveCacheLoadFunc(cfg *config.Config, key string) (interface{}, error)
- func PEGCacheLoadFunc(cfg *config.Config, key string) (interface{}, error)
- func WinPCTLoadFunc(cfg *config.Config, key string) (interface{}, error)
- type BlankLeaves
- type ExhaustiveLeaveStrategy
- type Leaves
- type NoLeaveStrategy
- type OldLeaves
- type Strategizer
Constants ¶
View Source
const ( LeaveFilename = "leaves.olv" PEGAdjustmentFilename = "preendgame.json" )
View Source
const MaxRepresentedWinSpread = 300
Variables ¶
This section is empty.
Functions ¶
func LeaveCacheLoadFunc ¶ added in v0.4.5
func PEGCacheLoadFunc ¶ added in v0.4.5
Types ¶
type BlankLeaves ¶ added in v0.4.5
type BlankLeaves struct{}
func (*BlankLeaves) LeaveValue ¶ added in v0.4.5
func (b *BlankLeaves) LeaveValue(leave alphabet.MachineWord) float64
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 Leaves ¶ added in v0.4.5
type Leaves interface {
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 OldLeaves ¶ added in v0.4.5
type OldLeaves struct {
// contains filtered or unexported fields
}
func (*OldLeaves) LeaveValue ¶ added in v0.4.5
func (olv *OldLeaves) 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.