Documentation ¶
Index ¶
Constants ¶
View Source
const DIMENSION = 8 * 8 * 12
View Source
const MAX_SCORE float32 = 1e6
Variables ¶
View Source
var PIECES = [12]chess.Piece{ chess.BlackPawn, chess.BlackRook, chess.BlackKnight, chess.BlackBishop, chess.BlackQueen, chess.BlackKing, chess.WhitePawn, chess.WhiteRook, chess.WhiteKnight, chess.WhiteBishop, chess.WhiteQueen, chess.WhiteKing, }
View Source
var POSITIONS = [8 * 8]chess.Square{ chess.A1, chess.B1, chess.C1, chess.D1, chess.E1, chess.F1, chess.G1, chess.H1, chess.A2, chess.B2, chess.C2, chess.D2, chess.E2, chess.F2, chess.G2, chess.H2, chess.A3, chess.B3, chess.C3, chess.D3, chess.E3, chess.F3, chess.G3, chess.H3, chess.A4, chess.B4, chess.C4, chess.D4, chess.E4, chess.F4, chess.G4, chess.H4, chess.A5, chess.B5, chess.C5, chess.D5, chess.E5, chess.F5, chess.G5, chess.H5, chess.A6, chess.B6, chess.C6, chess.D6, chess.E6, chess.F6, chess.G6, chess.H6, chess.A7, chess.B7, chess.C7, chess.D7, chess.E7, chess.F7, chess.G7, chess.H7, chess.A8, chess.B8, chess.C8, chess.D8, chess.E8, chess.F8, chess.G8, chess.H8, }
Functions ¶
func NegamaxSync ¶
func ParseBoard ¶
Types ¶
type BoardInput ¶
type ChessBotModel ¶
type ChessBotModel struct {
// contains filtered or unexported fields
}
func LoadModel ¶
func LoadModel(modelPath string) (*ChessBotModel, error)
func (*ChessBotModel) Close ¶
func (m *ChessBotModel) Close() error
type MoveResult ¶
func Negamax ¶
func Negamax( model *ChessBotModel, game *chess.Game, depth uint8, alpha, beta, player float32, ) *MoveResult
Click to show internal directories.
Click to hide internal directories.