Go chess engine focused on:
- legal move generation
make/unmake- attack detection
- perft correctness and performance work
The project is not a full playing engine yet. Search, evaluation, self-play orchestration, and Lichess integration are planned but not implemented.
internal/boardMutable board state, move representation, make/unmake, Zobrist hashing.internal/movegenPseudo-legal move generation, legal filtering, checks, pins, and attack analysis.internal/engineEngine orchestration and perft recursion.cmd/perft.goSimple perft entrypoint.cmd/benchperft/main.goBenchmark entrypoint used byscripts/bench-perft.sh.cmd/uci/main.goUCI entrypoint for GUI integration and external engine tooling.docs/Architecture notes, benchmark history, and optimization notes.
Run tests:
go test ./...Run the reference perft benchmark:
BENCH_DEPTH=7 BENCH_MODE=hot BENCH_WARMUP=1 BENCH_NO_PERFT_TRICKS=1 ./scripts/bench-perft.shRun a direct perft divide:
go run ./cmd/perft.go '8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1' 7Build the UCI binary:
mkdir -p ./bin
go build -o ./bin/gochess-uci ./cmd/uci