Crates.io | viriformat |
lib.rs | viriformat |
version | |
source | src |
created_at | 2025-03-23 20:18:03.773946+00 |
updated_at | 2025-05-04 11:51:43.988114+00 |
description | A library for the data-representation used by the viridithas chess engine. |
homepage | |
repository | |
max_upload_size | |
id | 1603008 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
viriformat is a crate for the game data representation used by the viridithas chess engine.
All integers in viriformat are little-endian.
The square indexing used represents A1=0, H1=7, A8=56, H8=63.
A viriformat file consists of one or more Game
s concatenated together.
A Game
consists of a marlinformat PackedBoard
followed by zero or more Move
and Score
pairs, terminated by four zero bytes.
A PackedBoard
is a structure of:
i
th entry corresponds to the i
th least-significant set bit in the occupied-piece bitboard.
Score
for the position.
A Move
is a structure packed into a 16-bit integer:
A Score
is a signed 16-bit integer representing a white-relative score for said Move
.
00000000: ffff 0000 0000 ffff ; occupancy: startpos layout
00000008: 6124 5216 0000 0000 8888 8888 e9ac da9e ; pieces: startpos layout
00000018: 40 ; side to move: white
; en-passant: none
00000019: 00 ; halfmove clock: 0
0000001a: 0100 ; fullmove counter: 1
0000001c: 0000 ; position score: 0 cp
0000001e: 02 ; game result: white win
0000001f: 00 ; extra byte
00000020: 0c07 0a00 ; 1. e4 +10cp
00000024: 3409 1400 ; 1. ... e5 +20cp
00000028: c309 e2ff ; 2. Qh5 -30cp
0000002c: 3c0d ff7f ; 2. ... Ke7 +32767cp
00000030: 2709 ff7f ; 3. Qxe5# +32767cp
00000034: 0000 0000 ; terminator