Update README.md
Browse files123---license: mit---12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788---license: mitlibrary_name: pytorchpipeline_tag: reinforcement-learningtags:- reinforcement-learning- multi-agent- self-play- alphazero- mcts- pomdp- board-game---# RAVEN: self-play agent for a moving-maze board gameRAVEN plays a 4-player moving-maze board game **inspired by** *Labyrinth*. It is an AlphaZero-style policy/value/belief network, used together with information-set MCTS.Code, environment and paper: https://github.com/<user>/labyrinth-rl> Independent research project. Not affiliated with, endorsed by or sponsored by Ravensburger. *Labyrinth* and *Ravensburger* are trademarks of Ravensburger AG.## Files| File | What it is ||---|---|| `raven-az2.pt` | Network weights and the architecture arguments. There is no optimizer state, so this file is not meant for resuming training. |## Usage```bashpip install "labyrinth-rl[rl] @ git+https://github.com/<user>/labyrinth-rl"hf download <user>/raven raven-az2.pt --local-dir .python -m labyrinth.hub --agent mcts:raven-az2.pt:128 # play against it at http://127.0.0.1:8000``````pythonfrom train.model import load_checkpointnet = load_checkpoint("raven-az2.pt")```The file is a PyTorch pickle, so load it only from a source you trust.## Model- **Input:** an ego-centric encoding of the 7×7 board, with planes for the board plus a vector of extra features. Observability is partial, following the official rules: the agent sees only its own target card.- **Network:** a residual convolutional tower with four heads:- shift head: 48 logits;- move head: 49 logits;- value head: one value per seat;- belief head: predicts each opponent's target treasure.- **Search:** single-observer IS-MCTS with max^n backups, where opponents' targets are sampled from the belief head. Root selection uses PUCT or Gumbel.## Training1. Behaviour cloning from a greedy expert.2. AlphaZero self-play, with greedy opponents in a share of the seats.3. Fine-tuning with a per-turn win discount, then gated against the previous network.<!-- fill in: hardware, iterations, simulations per move, wall-clock time -->## EvaluationEach evaluation is one agent in a rotating seat against 3 opponents. In a 4-player game the parity win rate is 25%.| Agent | Opponents | Games | Win rate (±95% CI) ||---|---|---|---|| `mcts:raven-az2.pt:128` | greedy ×3 | 200 | <!-- --> || `net:raven-az2.pt` | greedy ×3 | 200 | <!-- --> |Reproduce with `python -m train.evaluate --agent mcts:raven-az2.pt:128 --opponent greedy --games 200`.## Limitations- The game has a lot of luck, so small differences in win rate need many games to measure.- The agent was trained and tested only in the 4-player setting.- Where the rules differ from the boxed game, `RULES.md` in the code repository lists the differences.## Citation```bibtex@misc{raven2026,title = {RAVEN: <paper title>},author = {Gabriele},year = {2026},url = {https://github.com/<user>/labyrinth-rl}}```
README.md+85