From d703ea6010773ee1debb7bea3c5b464f167c985e Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 31 Mar 2025 03:22:32 +0200 Subject: [PATCH] fixed marlinformat pieces --- source/datagen.h | 2 +- source/utils.cpp | 4 ++-- source/utils.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/datagen.h b/source/datagen.h index c9093bb..0e3568a 100644 --- a/source/datagen.h +++ b/source/datagen.h @@ -10,7 +10,7 @@ constexpr int RAND_MOVES = 8; struct MarlinFormat { uint64_t occupancy; // 8 bytes: Bitboard representing all occupied squares (includes all pieces) - std::array pieces; // 32 bytes: 64 squares stored in 4-bit format (2 squares per byte) + std::array pieces; // 16 bytes: 64 squares stored in 4-bit format (2 squares per byte) uint8_t stmEPSquare; // 1 byte: STM (side to move) in bit 7, EP square in bits 0-5 uint8_t halfmoveClock; // 1 byte: Halfmove counter for the 50-move rule (incremented after each move) uint16_t fullmoveNumber; // 2 bytes: Full move counter, starting at 1 (increments after Black's move) diff --git a/source/utils.cpp b/source/utils.cpp index 44e118b..0dc7d10 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -147,10 +147,10 @@ Move parseMove(Board &board, std::string_view str) { return Move(from, to, flag); } -std::array CompressPieces(Board &board) { +std::array CompressPieces(Board &board) { const uint8_t UNMOVED_ROOK = 0x10; // Special value for unmoved rooks - std::array compressed; + std::array compressed; for (int square = a1; square <= h8; square++) { int pieceCode = 0; diff --git a/source/utils.h b/source/utils.h index 3a8c575..fbd09b1 100644 --- a/source/utils.h +++ b/source/utils.h @@ -30,6 +30,6 @@ int parseSquare(std::string_view str); Move parseMove(Board &board, std::string_view str); -std::array CompressPieces(Board &board); +std::array CompressPieces(Board &board); }