mcts

package
v0.0.0-...-7af1aca Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCTSConfig

type MCTSConfig struct {
	Debug int
	Limit time.Duration
	C     float64
	Seed  int64

	MMDepth       int
	MaxRollout    int
	EvalThreshold int64
	Policy        string
	ForceCorners  bool

	Size int

	DumpTree string
}

type MonteCarloAI

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

func NewMonteCarlo

func NewMonteCarlo(cfg MCTSConfig) *MonteCarloAI

func (*MonteCarloAI) GetMove

func (ai *MonteCarloAI) GetMove(ctx context.Context, p *tak.Position) tak.Move

type PlaceWins

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

func (*PlaceWins) Select

func (pw *PlaceWins) Select(ctx context.Context, m *MonteCarloAI, p *tak.Position) *tak.Position

type Policy

type Policy interface {
	Select(ctx context.Context, m *MonteCarloAI, p *tak.Position) *tak.Position
}

type UniformRandom

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

func (*UniformRandom) Select

Jump to

Keyboard shortcuts

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