Documentation
¶
Index ¶
- Constants
- Variables
- type Inference
- type LogIteration
- type RangeFinder
- func (r *RangeFinder) AnalyzeInferences(detailed bool) string
- func (r *RangeFinder) Infer(ctx context.Context) error
- func (r *RangeFinder) Inferences() *Inference
- func (r *RangeFinder) Init(game *game.Game, eqCalcs []equity.EquityCalculator, cfg *config.Config)
- func (r *RangeFinder) IsBusy() bool
- func (r *RangeFinder) PrepareFinder(myRack []tilemapping.MachineLetter) error
- func (r *RangeFinder) Reset()
- func (r *RangeFinder) SetLogStream(l io.Writer)
- func (r *RangeFinder) SetThreads(t int)
Constants ¶
View Source
const ( // If the player found a play within this limit, then count the rack // for inferences. Multiply by 100 to visualize as percentage. InferenceWinProbLimit = 0.035 // NextTurnScoreBoostLimit - if the player scores more than this many // points on average next turn, boost those inferred racks. // XXX: We may want this to be per-lexicon / per-variant / etc. NextTurnScoreBoostLimit = 45 )
Variables ¶
View Source
var ErrBagEmpty = errors.New("bag is empty")
View Source
var ErrMoveTypeNotSupported = errors.New("opponent move type not suitable for inference")
View Source
var ErrNoEvents = errors.New("no events")
View Source
var ErrNoInformation = errors.New("not enough information to infer")
Functions ¶
This section is empty.
Types ¶
type Inference ¶ added in v0.10.2
type Inference struct { RackLength int InferredRacks weightedRacks }
func NewInference ¶ added in v0.10.2
func NewInference() *Inference
type LogIteration ¶
type LogIteration struct { Iteration int `json:"iteration" yaml:"iteration"` Thread int `json:"thread" yaml:"thread"` Rack string `json:"rack" yaml:"rack"` TopMoveWinProb float64 `json:"topMoveWinProb" yaml:"topMoveWinProb"` TopMove string `json:"topMove" yaml:"topMove"` // InferredMoveWinProb is the win prob of the move we are inferring, given // that they drew "Rack" InferredMoveWinProb float64 `json:"inferredMoveWinProb" yaml:"inferredMoveWinProb"` PossibleRack bool `json:"possibleRack" yaml:"possibleRack"` NormalizedWinProb float64 `json:"normalizedWinProb" yaml:"normalizedWinProb"` SimLogFile string `json:"simLogFile,omitempty" yaml:"simLogFile,omitempty"` }
type RangeFinder ¶
type RangeFinder struct {
// contains filtered or unexported fields
}
func (*RangeFinder) AnalyzeInferences ¶
func (r *RangeFinder) AnalyzeInferences(detailed bool) string
func (*RangeFinder) Inferences ¶
func (r *RangeFinder) Inferences() *Inference
func (*RangeFinder) Init ¶
func (r *RangeFinder) Init(game *game.Game, eqCalcs []equity.EquityCalculator, cfg *config.Config)
func (*RangeFinder) IsBusy ¶ added in v0.8.6
func (r *RangeFinder) IsBusy() bool
func (*RangeFinder) PrepareFinder ¶
func (r *RangeFinder) PrepareFinder(myRack []tilemapping.MachineLetter) error
func (*RangeFinder) Reset ¶
func (r *RangeFinder) Reset()
func (*RangeFinder) SetLogStream ¶
func (r *RangeFinder) SetLogStream(l io.Writer)
func (*RangeFinder) SetThreads ¶
func (r *RangeFinder) SetThreads(t int)
Click to show internal directories.
Click to hide internal directories.