We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 81054ba + 57ecb70 commit c5c5f0bCopy full SHA for c5c5f0b
src/lib/engine/tensor.ts
@@ -83,8 +83,7 @@ function boardToTensor(fen: string): Float32Array {
83
if (enPassantTarget !== '-') {
84
const file = enPassantTarget.charCodeAt(0) - 'a'.charCodeAt(0)
85
const rank = parseInt(enPassantTarget[1], 10) - 1 // Adjust rank indexing
86
- const row = 7 - rank // Invert rank to match tensor indexing
87
- const index = epChannel + row * 8 + file
+ const index = epChannel + rank * 8 + file
88
tensor[index] = 1.0
89
}
90
0 commit comments