rangefinder

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// If the player found a play within this limit, then count the rack
	// for inferences.
	InferenceEquityLimit = 3
)

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 LogIteration

type LogIteration struct {
	Iteration     int     `json:"iteration" yaml:"iteration"`
	Thread        int     `json:"thread" yaml:"thread"`
	Rack          string  `json:"rack" yaml:"rack"`
	TopMoveEquity float64 `json:"topMoveEquity" yaml:"topMoveEquity"`
	TopMove       string  `json:"topMove" yaml:"topMove"`
	// InferredMoveEquity is the equity of the move we are inferring, given
	// that they drew "Rack"
	InferredMoveEquity float64 `json:"inferredMoveEquity" yaml:"inferredMoveEquity"`
	PossibleRack       bool    `json:"possibleRack" yaml:"possibleRack"`
}

type RangeFinder

type RangeFinder struct {
	// contains filtered or unexported fields
}

func (*RangeFinder) AnalyzeInferences

func (r *RangeFinder) AnalyzeInferences(detailed bool) string

func (*RangeFinder) Infer

func (r *RangeFinder) Infer(ctx context.Context) error

func (*RangeFinder) Inferences

func (r *RangeFinder) Inferences() [][]tilemapping.MachineLetter

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)

Jump to

Keyboard shortcuts

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