|
io-chess
UCI chess engine
|
Classes | |
| class | ChessMoEFactorizedDataset |
| class | ChessExpertFactorizedDataset |
Functions | |
| decode_feature_row (row, feature_layout, planes_per_type, packed_offsets, packed_branch_planes, num_bypass_planes) | |
Variables | |
| list | PLANES_PER_GROUP_CONST = [4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 4] |
| list | PACKED_OFFSETS_CONST |
| parser = argparse.ArgumentParser() | |
| help | |
| type | |
| int | |
| default | |
| args = parser.parse_args() | |
| ds = ChessMoEFactorizedDataset(args.data_dir, max_samples=args.max, n_globals=args.n_globals) | |
| sample = ds[0] | |
@file dataset.py
@brief Dataset utilities for training model.py on packed factorized features.
Loads packed factorized records produced by preprocessing in --factorized mode:
- features.bin: PackedFactorizedInput
- labels.bin: WDLOutput (3 floats: win, draw, loss)
- expert_weights.bin: 6 floats [base0-3, survivor, killer]
PackedFactorizedInput C++ layout (alignas(64)):
uint8_t branches[54][64] # only used branch planes (4/5 per group)
uint8_t bypass[12][64]
float global[32]
| decode_feature_row | ( | row, | |
| feature_layout, | |||
| planes_per_type, | |||
| packed_offsets, | |||
| packed_branch_planes, | |||
| num_bypass_planes ) |

| dataset.args = parser.parse_args() |
| dataset.default |
| dataset.ds = ChessMoEFactorizedDataset(args.data_dir, max_samples=args.max, n_globals=args.n_globals) |
| dataset.help |
| dataset.int |
| list dataset.PACKED_OFFSETS_CONST |
| dataset.parser = argparse.ArgumentParser() |
| list dataset.PLANES_PER_GROUP_CONST = [4, 4, 5, 5, 5, 4, 4, 4, 5, 5, 5, 4] |
| dataset.sample = ds[0] |
| dataset.type |