You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-6Lines changed: 55 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,14 +39,30 @@ This project is **not** a top-tier competitive chess engine and does not current
39
39
- full game replay to final position
40
40
-**Per-game summaries and aggregate statistics**
41
41
- player/result/plies summary fields
42
-
- wins/draws/unresolved totals and average plies
42
+
- opening move frequencies (White and Black first moves)
43
+
- castling distribution (kingside, queenside, no castling)
44
+
- total/average captures, checks, and promotions
45
+
- average game length by result type
46
+
-**Perft support**
47
+
- reusable perft API for legal move generation validation
48
+
- CLI command for quick node-count checks
43
49
-**JSON export**
44
50
- structured JSON for aggregate stats and per-game summaries
45
51
-**CLI workflows**
46
52
- validate PGN files
47
53
- summarize reconstructed games
48
54
- print aggregate stats (text or JSON)
49
55
- inspect FEN positions and legal moves
56
+
- run perft against startpos or custom FEN
57
+
58
+
## Correctness and validation
59
+
60
+
`ply` treats correctness as a core requirement and validates behavior at multiple layers:
61
+
62
+
-**Move legality validation**: legal move generation is covered by integration tests for baseline positions and special rules like en passant.
63
+
-**Replay validation**: PGN reconstruction resolves SAN against generated legal moves and is exercised with fixture-based tests.
64
+
-**Perft regression checks**: known perft node counts (including start position and tricky reference positions) are tested to catch move-generation regressions.
65
+
-**CLI-level checks**: command integration tests verify that key workflows (`validate`, `stats --json`, `perft`) execute and emit expected output.
50
66
51
67
### Current implementation boundaries
52
68
@@ -68,6 +84,9 @@ ply stats games.pgn --json
68
84
69
85
# Parse a FEN and list legal moves in coordinate notation
70
86
ply fen "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" --legal-moves
87
+
88
+
# Run perft on start position (or pass --fen "<fen>")
89
+
ply perft --depth 3
71
90
```
72
91
73
92
You can also run the binary through Cargo during development:
0 commit comments