2016-03-19 22:14:29 +01:00
|
|
|
# Simulations of Hanabi strategies
|
|
|
|
|
2016-03-30 07:24:29 +02:00
|
|
|
Hanabi is a cooperative card game of incomplete information.
|
|
|
|
Despite relatively [simple rules](https://boardgamegeek.com/article/10670613#10670613),
|
|
|
|
the space of Hanabi strategies is quite interesting.
|
2016-03-19 22:14:29 +01:00
|
|
|
|
2016-03-30 07:24:29 +02:00
|
|
|
This repository provides a framework for implementing Hanabi strategies.
|
|
|
|
It also explores some implementations, based on ideas from
|
|
|
|
[this paper](https://d0474d97-a-62cb3a1a-s-sites.googlegroups.com/site/rmgpgrwc/research-papers/Hanabi_final.pdf).
|
2016-03-19 22:14:29 +01:00
|
|
|
|
2016-03-30 07:24:29 +02:00
|
|
|
In particular, it contains a variant of their "information strategy", with some improvements.
|
2016-03-30 19:24:21 +02:00
|
|
|
This strategy achieves the best results I am aware of for n > 2 (see below).
|
2016-03-30 07:24:29 +02:00
|
|
|
|
|
|
|
Please contact me if:
|
|
|
|
- You know of other interesting/good strategy ideas!
|
|
|
|
- Have questions about the framework
|
2016-03-19 22:14:29 +01:00
|
|
|
|
2016-03-30 07:24:29 +02:00
|
|
|
Some similar projects I am aware of:
|
2016-03-19 22:14:29 +01:00
|
|
|
- https://github.com/rjtobin/HanSim (written for the paper mentioned above)
|
|
|
|
- https://github.com/Quuxplusone/Hanabi
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
Install rust/rustc and cargo, and change the options in main.rs appropriately.
|
|
|
|
|
|
|
|
`cargo run -- -h`
|
|
|
|
|
|
|
|
```
|
|
|
|
Usage: target/debug/rust_hanabi [options]
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-l, --loglevel LOGLEVEL
|
|
|
|
Log level, one of 'trace', 'debug', 'info', 'warn', and 'error'
|
|
|
|
-n, --ntrials NTRIALS
|
|
|
|
Number of games to simulate
|
|
|
|
-t, --nthreads NTHREADS
|
|
|
|
Number of threads to use for simulation
|
|
|
|
-s, --seed SEED Seed for PRNG
|
|
|
|
-p, --nplayers NPLAYERS
|
|
|
|
Number of players
|
|
|
|
-h, --help Print this help menu
|
|
|
|
```
|
|
|
|
|
|
|
|
For example,
|
|
|
|
|
|
|
|
`cargo run -- -n 10000 -s 0 -t 2 -p 3`
|
|
|
|
|
2016-03-31 09:02:09 +02:00
|
|
|
## Results
|
2016-03-19 22:14:29 +01:00
|
|
|
|
|
|
|
Currently, on seeds 0-9999, we have:
|
|
|
|
|
|
|
|
| 2p | 3p | 4p | 5p |
|
|
|
|
----------|---------|---------|---------|---------|
|
|
|
|
cheating | 24.8600 | 24.9781 | 24.9715 | 24.9583 |
|
2016-03-31 09:02:09 +02:00
|
|
|
info | 18.5959 | 23.8846 | 24.7753 | 24.8719 |
|
2016-03-19 22:14:29 +01:00
|
|
|
|