Documentation ¶
Index ¶
- Constants
- func Choose(s *State, player Player, depth int) (canMove bool, move position, desirability float64)
- func Desirability(s *State, player Player) float64
- func Eval(s *State) (green float64, red float64)
- type Content
- type Player
- type State
- func (s *State) CanCapture(player Player, pos position, dir direction) bool
- func (s *State) CanPlay(player Player, pos position) bool
- func (s *State) Capture(player Player, pos position, dir direction) int
- func (s *State) Play(player Player, pos position) State
- func (s *State) PossibleMoves(player Player) (options []position)
- func (s *State) Score() (green int, red int)
- func (s *State) String() string
Constants ¶
View Source
const W = 8
The grid is 8x8 == 64 cells
Variables ¶
This section is empty.
Functions ¶
func Choose ¶
Choose returns the best move *for this player*, the desirability of the outcome *for this player*, and whether a move *by this player* is possible at all. The desirability is computed even if this player can't move
func Desirability ¶
Types ¶
type State ¶
func InitialState ¶
func InitialState() State
func (*State) CanCapture ¶
func (*State) PossibleMoves ¶
Click to show internal directories.
Click to hide internal directories.