Captures the full librarian design (two-layer architecture, three-stage pipeline, vendor-agnostic via LIBRARIAN_LLM env, propose-only / no auto-apply) in docs/plans/librarian.md. Lands the first concrete Stage 1 piece: scripts/librarian_check_links.py, a lychee --offline wrapper ported from ~/dev/coolrl/src/coolrl/dev/check_doc_links.py. Also moves the librarian prompt from .claude/agents/ (Claude Code only) to scripts/librarian-prompt.md so any CLI can load it as a system prompt later. Fixes one stale README link the new checker caught: docs/classic-port-notes.md → docs/archive/classic-port-notes.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
52 lines
1.2 KiB
Markdown
52 lines
1.2 KiB
Markdown
# coolrl-lost-cities
|
|
|
|
Focused Lost Cities extraction from the legacy `coolrl` repository.
|
|
|
|
The current implementation starts with the classic two-player card game:
|
|
|
|
- classic 5-expedition rules by default
|
|
- Python/Cython game engine
|
|
- env wrapper
|
|
- random, passive-discard, and safe-heuristic bots
|
|
- core rule, scoring, mask, env, canonical-state, bot, and GUI smoke tests
|
|
|
|
Training code, Deep CFR, learned-policy evaluation, GUI, and web client are
|
|
intentionally outside the first port.
|
|
|
|
## Development
|
|
|
|
```bash
|
|
uv run pytest tests/games/classic
|
|
uv run lost-cities-classic
|
|
```
|
|
|
|
For future GUI work, install the optional GUI dependencies:
|
|
|
|
```bash
|
|
uv sync --extra gui
|
|
```
|
|
|
|
Run the classic pygame GUI:
|
|
|
|
```bash
|
|
uv run lost-cities-classic-gui --mode pvc --bot safe-heuristic
|
|
```
|
|
|
|
The GUI uses the in-process Cython game engine.
|
|
|
|
## Basic Usage
|
|
|
|
```python
|
|
from coolrl_lost_cities.games.classic import GameState, build_bot, classic_config
|
|
|
|
state = GameState.new_game(classic_config(seed=1))
|
|
bot = build_bot("random", seed=1)
|
|
|
|
while not state.terminal:
|
|
state.apply_action(bot.act(state))
|
|
|
|
print(state.total_score(0), state.total_score(1))
|
|
```
|
|
|
|
See [classic port notes](docs/archive/classic-port-notes.md) for the current direction.
|