How nianzu/scylla works
Project Type & Purpose
• Scylla is an open-source, Rust-based command-line chess engine that uses a multi-agent neural network architecture.
• In “inference mode” it loads seven pre-trained models (one piece-selector + six piece-specific move selectors) to pick and execute chess moves.
• In “training mode” it ingests pre-processed game data (the MNIST-style datasets generated by the companion Scylla_preprocessor tool), trains or retrains any subset of the seven networks, and writes updated binaries to the trained_network directory.
File Structure Analysis
• Cargo.toml / Cargo.lock – Rust project manifest and locked dependency versions.
• src/
– main.rs: CLI entry point, argument parsing (play vs train), game loop, I/O.
– neural_network.rs: abstraction for loading, invoking, and (re)training a single network.
• datasets/mnist/ – input feature/label files for training (generated externally).
• trained_network/ – output .bin model files, one per network agent.
• readme.md – high-level overview, usage, training instructions, methodology.
Key Insights from README
• Seven independent neural agents collaborate each turn:
• Piece Selector: chooses which piece to move.
• Six Move Selectors: one for pawn, knight, bishop, rook, queen, king.
• Composition rule: piece selector’s probabilities combine with the relevant move selector’s outputs to form the final move choice.
• Two modes of operation:
• Inference: load .bin models → run game loop.
• Training: load datasets → train specified networks → overwrite .bin files.