Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Move ¶
type Move interface{}
Move must be implemented for different games
func ComputeMove ¶
ComputeMove start multi goroutines to compute best move
type Option ¶
type Option func(*Options)
func Goroutines ¶
Goroutines number of goroutines, default is runtime.NumCPU()
func MaxIterations ¶
MaxIterations maximum number of iterations, default is 10000
iter < 0: not limit
type State ¶
type State interface { // PlayerToMove is who next to play PlayerToMove() int // HasMoves return whether the game is over HasMoves() bool // GetMoves get all legal moves GetMoves() []Move // DoMove modify state with the given move DoMove(move Move) // DoRandomMove do random move with the given random engine DoRandomMove(rd *rand.Rand) // GetResult return game result GetResult(currentPlayerToMove int) float64 // Clone is deep copy Clone() State }
State must be implemented for different games
Click to show internal directories.
Click to hide internal directories.