Documentation ¶
Index ¶
- type EndingCache
- func (s *EndingCache) ClearCache(depth uint)
- func (s *EndingCache) DepthCaches() []map[uint64]common.Player
- func (s *EndingCache) DepthSize(depth uint) int
- func (s *EndingCache) Get(board *common.Board, depth uint) (ending common.Player, ok bool)
- func (s *EndingCache) MaxCachedDepth() uint
- func (s *EndingCache) Put(board *common.Board, depth uint, ending common.Player) common.Player
- func (s *EndingCache) SetEntry(depth int, key uint64, value common.Player)
- func (s *EndingCache) Size() uint64
- type MoveSolver
- func (s *MoveSolver) Cache() common.ICache
- func (s *MoveSolver) HasPlayerWon(board *common.Board, move int, y int, player common.Player) bool
- func (s *MoveSolver) Interrupt()
- func (s *MoveSolver) MovesEndings(board *common.Board) (endings []common.Player)
- func (s *MoveSolver) ReportStatus(board *common.Board, progress float64)
- func (s *MoveSolver) Retrain(board *common.Board, maxDepth uint)
- func (s *MoveSolver) SummaryVars() log.Ctx
- type Referee
- func (s *Referee) HasPlayerWon(board *common.Board, move int, y int, player common.Player) bool
- func (s *Referee) HasPlayerWonDiagonal(board *common.Board, x int, y int, player common.Player) bool
- func (s *Referee) HasPlayerWonHorizontal(board *common.Board, y int, player common.Player) bool
- func (s *Referee) HasPlayerWonVertical(board *common.Board, move int, player common.Player) bool
- func (s *Referee) HasWinner(board *common.Board) common.Player
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndingCache ¶
type EndingCache struct {
// contains filtered or unexported fields
}
func NewEndingCache ¶
func NewEndingCache(boardW int, boardH int) *EndingCache
func (*EndingCache) ClearCache ¶
func (s *EndingCache) ClearCache(depth uint)
func (*EndingCache) DepthCaches ¶
func (s *EndingCache) DepthCaches() []map[uint64]common.Player
func (*EndingCache) DepthSize ¶
func (s *EndingCache) DepthSize(depth uint) int
func (*EndingCache) MaxCachedDepth ¶
func (s *EndingCache) MaxCachedDepth() uint
func (*EndingCache) SetEntry ¶
func (s *EndingCache) SetEntry(depth int, key uint64, value common.Player)
func (*EndingCache) Size ¶
func (s *EndingCache) Size() uint64
type MoveSolver ¶
func NewMoveSolver ¶
func NewMoveSolver(board *common.Board) *MoveSolver
func (*MoveSolver) Cache ¶
func (s *MoveSolver) Cache() common.ICache
func (*MoveSolver) HasPlayerWon ¶
func (*MoveSolver) Interrupt ¶
func (s *MoveSolver) Interrupt()
func (*MoveSolver) MovesEndings ¶
func (s *MoveSolver) MovesEndings(board *common.Board) (endings []common.Player)
func (*MoveSolver) ReportStatus ¶
func (s *MoveSolver) ReportStatus( board *common.Board, progress float64, )
func (*MoveSolver) SummaryVars ¶
func (s *MoveSolver) SummaryVars() log.Ctx
type Referee ¶
type Referee struct {
// contains filtered or unexported fields
}
func NewReferee ¶
func (*Referee) HasPlayerWon ¶
func (*Referee) HasPlayerWonDiagonal ¶
func (*Referee) HasPlayerWonHorizontal ¶
func (*Referee) HasPlayerWonVertical ¶
Click to show internal directories.
Click to hide internal directories.