ai

package
v0.0.0-...-6ccc0c3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinMaxStatsMan = minMaxStats{}

Functions

func SortMoveEvalsHighToLow

func SortMoveEvalsHighToLow(s []MoveEval)

func SortMoveEvalsLowToHigh

func SortMoveEvalsLowToHigh(s []MoveEval)

Types

type AiDifficultySetting

type AiDifficultySetting struct {
	DepthLimit                             int
	WorstChance, ThirdChance, SecondChance float32
}

type MoveEval

type MoveEval struct {
	Depth int
	Move  checkers.Move
	Eval  int
}

func CalculateAllMoves

func CalculateAllMoves(g checkers.Game, depth int) []MoveEval

func DifficultySetAi

func DifficultySetAi(g checkers.Game, settings AiDifficultySetting) MoveEval

func SmartAiDepthLimited

func SmartAiDepthLimited(g checkers.Game, depthLimit int) (me MoveEval)

func SmartAiTimeBound

func SmartAiTimeBound(g checkers.Game, timeLimit time.Duration) (me MoveEval)

func (MoveEval) String

func (me MoveEval) String() string

Jump to

Keyboard shortcuts

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