ai

package
v0.0.0-...-3fc78ee Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 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 MoveEval

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

func CalculateAllMoves

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

CalculateAllMoves calculates all legal moves for this turn and evaluates them. Doesn't just find the best move, it checks all the moves/

func SmartAiDepthLimited

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

SmartAiDepthLimited calculates the best move for the AI with a depth-search limit.

func SmartAiTimeBound

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

SmartAiTimeBound calculates the best move for the AI within a time limit.

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