search

package
v0.0.0-...-ec3717e Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxDepth is a limit of depth of goita
	MaxDepth = 50
)

Variables

This section is empty.

Functions

func OrderSimple

func OrderSimple(move *goita.Move, handCounter int, partnerAttack bool) (score int)

OrderSimple calculate score with simple conditions

func Solve

func Solve(board *goita.Board) chan *EvaluatedMove

Solve search the deal perfect

func StartNegamax

func StartNegamax(board *goita.Board, searchDepth int, eval evalFunc) chan *EvaluatedMove

StartNegamax manages negamax search goroutines

func StartNegamaxSimple

func StartNegamaxSimple(board *goita.Board, move *goita.Move, eval evalFunc, searchDepth int, ch chan *EvaluatedMove)

StartNegamaxSimple run negamax search

Types

type EvaluatedMove

type EvaluatedMove struct {
	Move    *goita.Move
	Score   int
	History goita.MoveHashArray
}

EvaluatedMove is Move data and score

func SolveSimple

func SolveSimple(board *goita.Board) []EvaluatedMove

SolveSimple search the deal perfect

func (EvaluatedMove) String

func (em EvaluatedMove) String() string

func (EvaluatedMove) StringHistory

func (em EvaluatedMove) StringHistory(startTurn int) string

StringHistory make move+score+history string

type LinkedMove

type LinkedMove struct {
	Move *goita.Move
	// contains filtered or unexported fields
}

LinkedMove is considerable as a solution for reducing memory allocation of EvaluatedMove

type Status

type Status struct {
	VisitedNode  uint64
	VisitedLeaf  uint64
	CutOffedNode uint64
	Routines     int32
	MaxRoutines  int32
}

Status holds search information

Jump to

Keyboard shortcuts

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