44b8faba3d948a0bcbd35995fbd6a5932faa8be2
Summarizes the 13-cycle trap-exploration session: BC pretrain (heuristic clone) is the self-play ceiling under our compute budget (1 GPU + 50 sims + 768x4 MLP). All variants (naive finetune, KL anchor, mirror descent, mixed-opponent + opponent-aware search) either preserved BC (~17-21/100 vs heuristic-cautious) or regressed to catastrophic forgetting. The single largest improvement of the session — 4× win rate on the same checkpoint — came from PUCT Q-value normalization at search time, not from any learning change. Records the mechanism (negative training signal from BC-vs-heuristic games; search too shallow to find heuristic-beating moves), the hypotheses we negated, and the dials left in code for future runs with more compute.
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, discard-only, 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
uv run pytest tests/games/classic
uv run lost-cities-classic
For future GUI work, install the optional GUI dependencies:
uv sync --extra gui
Run the classic pygame GUI:
uv run lost-cities-classic-gui --mode pvc --bot safe-heuristic
The GUI uses the in-process Cython game engine.
Basic Usage
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 for the current direction.
Languages
Python
73.3%
Cython
21.7%
Julia
4.8%
Shell
0.2%