7b76b10175
`dojo sim` plays seeded games over a scenario matrix (variant, players, Kiai bonus, start position, bot lineup) in parallel, prints a summary per scenario and optionally writes one CSV row per game. Metrics are replayed from the event log. Plan updated with the Phase 5 baseline. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
60 lines
2.2 KiB
Markdown
60 lines
2.2 KiB
Markdown
# Il Labirinto del Dojo
|
||
|
||
A small tabletop game (1–2 h, 3–8 players, best at 4), plus the tooling used to design and
|
||
balance it.
|
||
|
||
| Document | What it is |
|
||
|---|---|
|
||
| [`RULES.md`](RULES.md) | The rulebook (English working draft). |
|
||
| [`board/FORMAT.md`](board/FORMAT.md) | How the board is written as text. |
|
||
| [`agents/plans/`](agents/plans/) | Active work plan: decisions, phases, open questions. |
|
||
|
||
## Setup
|
||
|
||
Requires [uv](https://docs.astral.sh/uv/). It installs the pinned Python and all tools:
|
||
|
||
```sh
|
||
uv sync
|
||
```
|
||
|
||
## Board
|
||
|
||
The board is authored as one 8x8 quadrant in `board/quadrant.txt` (tunnel links in
|
||
`board/legend.toml`) and rotated into the full 16x16 board.
|
||
|
||
```sh
|
||
uv run dojo board validate # check the board against the rules, print stats
|
||
uv run dojo board render # print the full 16x16 board
|
||
uv run dojo board render -o board/board.txt # regenerate the full board file (never edit it by hand)
|
||
uv run dojo board validate --quadrant other.txt --legend other.toml # check another draft
|
||
```
|
||
|
||
`validate` exits with `0` when the board is fine (warnings allowed), `1` on rule violations,
|
||
`2` when the file is malformed or missing.
|
||
|
||
## Simulation
|
||
|
||
Plays many seeded games with bots and prints metrics per scenario. Every combination of the
|
||
listed values is a scenario; game `i` of each scenario uses seed `--seed + i`, and the lineup
|
||
rotates one seat per game. Bots: `random`, `balanced`, `farmer`, `aggressive`.
|
||
|
||
```sh
|
||
uv run dojo sim # variants A and B, 4 players, 200 games each
|
||
uv run dojo sim --games 1000 --csv games.csv # more games; one CSV row per game
|
||
uv run dojo sim --variant B --players 3 4 6 8 --start 0 3 # player counts x start position
|
||
uv run dojo sim --kiai 2 1 # Kiai +2 vs +1
|
||
uv run dojo sim --lineup balanced,random balanced # several lineups (comma-separated seats)
|
||
uv run dojo sim --seed 42 --jobs 1 # other dice; single process
|
||
```
|
||
|
||
Minutes are estimated as 45 s per turn plus 30 s per Kumite.
|
||
|
||
## Development
|
||
|
||
```sh
|
||
uv run pytest # tests
|
||
uv run ruff check . # lint
|
||
uv run ruff format . # format
|
||
uvx pyright src tests # type check
|
||
```
|