Documentation
¶
Overview ¶
Package triplets is a generated protocol buffer package.
It is generated from these files:
triplets.proto
It has these top-level messages:
ChessBotTriplets ChessBotTriplet BoardBits
Index ¶
- Constants
- Variables
- func CopyGame(game *chess.Game) (*chess.Game, error)
- func YieldSourceURLs(done <-chan struct{}) <-chan string
- func YieldTriplets()
- type BoardBits
- type BoardInput
- type ChessBotTriplet
- func (*ChessBotTriplet) Descriptor() ([]byte, []int)
- func (m *ChessBotTriplet) GetObserved() *BoardBits
- func (m *ChessBotTriplet) GetParent() *BoardBits
- func (m *ChessBotTriplet) GetRandom() *BoardBits
- func (*ChessBotTriplet) ProtoMessage()
- func (m *ChessBotTriplet) Reset()
- func (m *ChessBotTriplet) String() string
- type ChessBotTriplets
Constants ¶
View Source
const DIMENSION = 8 * 8 * 12
Variables ¶
View Source
var PIECES = [12]pgn.Piece{
pgn.BlackPawn,
pgn.BlackRook,
pgn.BlackKnight,
pgn.BlackBishop,
pgn.BlackQueen,
pgn.BlackKing,
pgn.WhitePawn,
pgn.WhiteRook,
pgn.WhiteKnight,
pgn.WhiteBishop,
pgn.WhiteQueen,
pgn.WhiteKing,
}
View Source
var PIECES_CHESS = [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]pgn.Position{
pgn.A1,
pgn.B1,
pgn.C1,
pgn.D1,
pgn.E1,
pgn.F1,
pgn.G1,
pgn.H1,
pgn.A2,
pgn.B2,
pgn.C2,
pgn.D2,
pgn.E2,
pgn.F2,
pgn.G2,
pgn.H2,
pgn.A3,
pgn.B3,
pgn.C3,
pgn.D3,
pgn.E3,
pgn.F3,
pgn.G3,
pgn.H3,
pgn.A4,
pgn.B4,
pgn.C4,
pgn.D4,
pgn.E4,
pgn.F4,
pgn.G4,
pgn.H4,
pgn.A5,
pgn.B5,
pgn.C5,
pgn.D5,
pgn.E5,
pgn.F5,
pgn.G5,
pgn.H5,
pgn.A6,
pgn.B6,
pgn.C6,
pgn.D6,
pgn.E6,
pgn.F6,
pgn.G6,
pgn.H6,
pgn.A7,
pgn.B7,
pgn.C7,
pgn.D7,
pgn.E7,
pgn.F7,
pgn.G7,
pgn.H7,
pgn.A8,
pgn.B8,
pgn.C8,
pgn.D8,
pgn.E8,
pgn.F8,
pgn.G8,
pgn.H8,
}
View Source
var POSITIONS_CHESS = [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, }
View Source
var SOURCES = []string{
"http://www.ficsgames.org/dl/ficsgamesdb_2016_chess_nomovetimes_1502841.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2015_chess_nomovetimes_1502842.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2014_chess_nomovetimes_1502844.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2013_chess_nomovetimes_1502845.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2012_chess_nomovetimes_1502846.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2011_chess_nomovetimes_1502847.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2010_chess_nomovetimes_1502848.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2009_chess_nomovetimes_1502849.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2008_chess_nomovetimes_1502850.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2007_chess_nomovetimes_1502851.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2006_chess_nomovetimes_1502852.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2005_chess_nomovetimes_1502853.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2004_chess_nomovetimes_1502854.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2003_chess_nomovetimes_1502855.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2002_chess_nomovetimes_1502856.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2001_chess_nomovetimes_1502857.pgn.bz2",
"http://www.ficsgames.org/dl/ficsgamesdb_2000_chess_nomovetimes_1502858.pgn.bz2",
}
http://www.ficsgames.org/download.html These URLS expire quickly so they need to be updated often.
Functions ¶
func YieldSourceURLs ¶
func YieldSourceURLs(done <-chan struct{}) <-chan string
func YieldTriplets ¶
func YieldTriplets()
Types ¶
type BoardBits ¶
type BoardBits struct {
Pieces []uint32 `protobuf:"varint,1,rep,packed,name=pieces" json:"pieces,omitempty"`
}
func (*BoardBits) Descriptor ¶
func (*BoardBits) ProtoMessage ¶
func (*BoardBits) ProtoMessage()
type BoardInput ¶
func ParseBoard ¶
func ParseBoard(board *chess.Board) BoardInput
type ChessBotTriplet ¶
type ChessBotTriplet struct { Parent *BoardBits `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` Observed *BoardBits `protobuf:"bytes,2,opt,name=observed" json:"observed,omitempty"` Random *BoardBits `protobuf:"bytes,3,opt,name=random" json:"random,omitempty"` }
func (*ChessBotTriplet) Descriptor ¶
func (*ChessBotTriplet) Descriptor() ([]byte, []int)
func (*ChessBotTriplet) GetObserved ¶
func (m *ChessBotTriplet) GetObserved() *BoardBits
func (*ChessBotTriplet) GetParent ¶
func (m *ChessBotTriplet) GetParent() *BoardBits
func (*ChessBotTriplet) GetRandom ¶
func (m *ChessBotTriplet) GetRandom() *BoardBits
func (*ChessBotTriplet) ProtoMessage ¶
func (*ChessBotTriplet) ProtoMessage()
func (*ChessBotTriplet) Reset ¶
func (m *ChessBotTriplet) Reset()
func (*ChessBotTriplet) String ¶
func (m *ChessBotTriplet) String() string
type ChessBotTriplets ¶
type ChessBotTriplets struct {
Triplets []*ChessBotTriplet `protobuf:"bytes,1,rep,name=triplets" json:"triplets,omitempty"`
}
func (*ChessBotTriplets) Descriptor ¶
func (*ChessBotTriplets) Descriptor() ([]byte, []int)
func (*ChessBotTriplets) GetTriplets ¶
func (m *ChessBotTriplets) GetTriplets() []*ChessBotTriplet
func (*ChessBotTriplets) ProtoMessage ¶
func (*ChessBotTriplets) ProtoMessage()
func (*ChessBotTriplets) Reset ¶
func (m *ChessBotTriplets) Reset()
func (*ChessBotTriplets) String ¶
func (m *ChessBotTriplets) String() string
Click to show internal directories.
Click to hide internal directories.