habara-k / cfr-rs

A rust implementation of Counterfacutual Regret Minimization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CFR-rs

Build Status License: MIT

CFR-rs is a rust implementation of Counterfactual Regret Minimization[1].

The library calculates ε-Nash equilibrium of all Imperfect-Information Extensive-Form Game satisfying

  • finite
  • two-person
  • zero-sum
  • perfect recall
  • relatively small

This library reads all the rules of a game from a JSON file. The implementation is not specific to any particular game, so you can analyze any game that meets the above conditions.

Quick Start

You can calculate an ε-Nash equilibrium strategy for Kuhn poker in 1,000,000 steps.

$ cargo build --release --bin main
$ RUST_LOG=debug target/release/main --rule src/rule/kuhn.json --step 1000000

Benchmark

  • Rule: Kuhn poker, an extremely simplified form of poker.
  • Step: 1,000,000
  • Environments:
    • 3.2 GHz CPU
    • 8 GB RAM

The library calculates a strategy in 16.8 ± 0.7 sec.

The value of NashConv, A common metric for determining the rates of convergence, decreases in O(1/√step).

Documents

doc

Licence

MIT

Author

habara-k

References

[1] Zinkevich, Martin, et al. "Regret minimization in games with incomplete information." Advances in neural information processing systems 20 (2007): 1729-1736.

About

A rust implementation of Counterfacutual Regret Minimization

License:MIT License


Languages

Language:Rust 98.8%Language:Python 1.2%