Documentation ¶
Overview ¶
Package strategy encapsulates all strategic concerns for crossword game. This includes for example equity calculations, first-turn placement heuristics, and more. It shouldn't be placed in the movegen package as that package is solely for generating moves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DataDir = os.Getenv("DATA_DIR")
Functions ¶
This section is empty.
Types ¶
type ExhaustiveLeaveStrategy ¶
type ExhaustiveLeaveStrategy struct{}
ExhaustiveLeaveStrategy should apply an equity calculation for all leaves exhaustively.
type NoLeaveStrategy ¶
type NoLeaveStrategy struct{}
NoLeaveStrategy does not take leave into account at all.
type SimpleSynergyStrategy ¶
type SimpleSynergyStrategy struct {
// contains filtered or unexported fields
}
SimpleSynergyStrategy uses a strategy borne of a simple synergy calculation, based on a few million computer vs computer games. The details of this calculation are in the /notebooks directory in this repo.
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 }
Strategizer is an interface used by the movegen (and possibly other places) to apply strategical calculations.
type SynergyAndEV ¶
type SynergyAndEV struct {
// contains filtered or unexported fields
}
SynergyAndEV encapsulates synergy, and, well, EV.
type SynergyLeaveMap ¶
type SynergyLeaveMap map[string]SynergyAndEV
SynergyLeaveMap gets created from a csv file of leaves. See the notebooks directory for generation code.