syd-format
format used to store a whole chess tree, heavily inspired by viriformat
specifications
for each tree:
- 4B: store the size of tree as u32
- 32B: store the root as marlin format
- recursively :
- 2B: the bestmove
- 2B: the score of the position
- 1B: depth*3+bound
- 1B: the number of child
- for each child :
- 2B: store the move to go to that child
- store the child
so the root is 42B, and every other node is 8B
moves
a Move is stored into 2 bytes :
- 6-bit from square
- 6-bit to square
- 2-bit promotion type (normal piece number - 1)
- 2-bit flag, 1 for ep 2 for castling 3 for promotions and 0 for the rest
all integers are stored in little endian
all scores are stored stm-relative as i16