aboutsummaryrefslogtreecommitdiff
path: root/docs/README.md
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2026-11-09 23:32:43 +1300
committerDylan <boss@tehbox.org>2026-11-09 23:32:43 +1300
commitf17308e3c132ee18cc4cbd458329958c99a712ed (patch)
tree098800a2f4efd37fd3ffd0c639b732fdc8227a65 /docs/README.md
parent4eea7f726b5a7e0a55716a5c87e398dfb65fceb7 (diff)
downloadtigers-and-sheep-master.tar.gz
tigers-and-sheep-master.zip
docs: Add a docs folder on building, the code's structure, the search and trainingHEADv0.1.0master
Covers building and dependencies, the architecture and game loop, the board representation, the Player and MinimaxPlayer traits, the minimax search, the network and self-play training, benchmarking, and how to add a player. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/README.md')
-rw-r--r--docs/README.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..9d5a60c
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,27 @@
+# Tigers and Sheep documentation
+
+These pages explain how the game is built and how its computer players think. The top-level
+[README](../README.md) covers the rules and how to play; start here when you want to change the code.
+
+| Page | What it covers |
+|------|----------------|
+| [Building](building.md) | Toolchain, dependencies and what each is for, Cargo profiles and features, the Nix flake, CI |
+| [Architecture](architecture.md) | The modules, how a game runs from `main` to the TUI loop, and how the pieces talk to each other |
+| [The board](board.md) | The bitboard representation, move generation, the rules as implemented, symmetries and repetitions |
+| [Players](players.md) | The `Player` and `MinimaxPlayer` traits, and the players that implement them |
+| [The minimax search](search.md) | Alpha-beta, iterative deepening, the transposition table, move ordering, repetitions |
+| [The neural network and training](training.md) | The network, backprop and Adam, and the self-play training loop with TD(λ) targets |
+| [Benchmarking and profiling](benchmarking.md) | The `bench` command, search counters, `perf`/`samply`, and pitfalls when timing |
+| [Adding a player](adding-a-player.md) | Step by step: a simple player, a minimax player, and wiring either into the command line |
+
+## Conventions used throughout
+
+- **Scores favour tigers.** Every score in the code, from `evaluate` to the network's output, is
+ positive when it's good for the tigers and negative when it's good for the sheep. Tigers maximise,
+ sheep minimise.
+- **Coordinates.** A point is `Pos = (x, y)`, with `x` and `y` in `0..5`. `y = 0` is drawn at the
+ top. In notation, files `a`–`e` are `x` 0–4 and ranks are `5 - y`, so `(0, 0)` is `a5`.
+- **Move notation.** `sc3` places a sheep on c3, `sc3c2` moves a sheep, `ta5b4` is a tiger step and
+ `ta5xc3` a tiger jump (which kills the sheep on b4).
+- **Turns.** Sheep move first. `Turn` is the side *about to move*, and most functions take it
+ alongside the board, since the same board can come up with either side to move.