play

package
v0.0.0-...-599284e Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_SCORE int64 = 1e6

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

func LoadModel

func LoadModel(modelPath string) (*Model, error)

func (*Model) Close

func (m *Model) Close() error

func (*Model) Evaluate

func (m *Model) Evaluate(input common.BoardInput) (int64, error)

type MoveNode

type MoveNode struct {
	Move     *chess.Move
	Children []*MoveNode
	Score    int64
}

func Negamax

func Negamax(model *Model, game *chess.Game, depth uint8, alpha, beta int64, player int64) ([]*MoveNode, int64)

func PickRandomMove

func PickRandomMove(moveNodes []*MoveNode) *MoveNode

type MoveResult

type MoveResult struct {
	Move  *chess.Move
	Score int64
}

Jump to

Keyboard shortcuts

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