ChessTransformer class

A Transformer model adapted for Chess board state encoding and move prediction.

This model takes a flattened representation of the chess board (piece IDs on each square) and predicts logits for possible moves.

Inheritance

Constructors

ChessTransformer({required int embedSize, int numLayers = 2, int numHeads = 4})

Properties

embedSize int
final
hashCode int
The hash code for this object.
no setterinherited
moveHead Layer
final
numHeads int
final
numLayers int
final
pieceEmbeddings List<ValueVector>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
squarePositionalEmbeddings List<ValueVector>
final
transformerEncoder TransformerEncoder
final

Methods

forward(List<int> boardState) List<Value>
The forward pass for the Chess Transformer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parameters() List<Value>
override
toString() String
A string representation of this object.
inherited
zeroGrad() → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited