mmm

package
v0.0.0-...-4fb7718 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultiMMLimited

func MultiMMLimited(board *b.FastBoard, depth int, strat StrategyFn) (b.Move, float64)

func MultiMinmax

func MultiMinmax(ctx context.Context, cache *Cache, board *b.FastBoard, strategy StrategyFn, depth int, firstMove b.Move) (b.Move, float64, bool)

func MultiMinmaxID

func MultiMinmaxID(board *b.FastBoard, cache *Cache) b.Move

func MultiMinmaxThreaded

func MultiMinmaxThreaded(board *b.FastBoard, cache *Cache) b.Move

func StrategyGMO

func StrategyGMO(board *b.FastBoard, maxId, minId b.SnakeId, depth int, gmo GMOConfig) float64

func StrategyGMO2

func StrategyGMO2(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

func StrategyHungry

func StrategyHungry(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

func StrategyV1

func StrategyV1(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

func StrategyV2

func StrategyV2(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

func StrategyV3

func StrategyV3(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

func StrategyV4

func StrategyV4(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

func StrategyV5

func StrategyV5(board *b.FastBoard, maxId, minId b.SnakeId, depth int) float64

Types

type Cache

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

func CreateCache

func CreateCache(b *board.FastBoard, depthAdjuster int) *Cache

func (*Cache) SetCurTurn

func (c *Cache) SetCurTurn(t int)

type CacheEntry

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

type DepthIndex

type DepthIndex struct {
	Index uint16
	Depth int
}

type GMOConfig

type GMOConfig struct {
	FoodWeightA    float64
	FoodWeightB    float64
	VoronoiWeightA float64
	VoronoiWeightB float64
	LengthWeight   float64
}

type StrategyFn

type StrategyFn func(*b.FastBoard, b.SnakeId, b.SnakeId, int) float64

func CreateGMOStrategy

func CreateGMOStrategy(gmo GMOConfig) StrategyFn

Jump to

Keyboard shortcuts

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