# Counterfactual Regret Minimization

**URL:** https://discourse.julialang.org/t/counterfactual-regret-minimization/19543
**Category:** Machine Learning
**Created:** [January 11, 2019, 9:41pm UTC](https://discourse.julialang.org/t/counterfactual-regret-minimization/19543 "2019-01-11T21:41:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ajkeith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ajkeith/32/970_2.png) [@ajkeith](https://discourse.julialang.org/u/ajkeith)
#### Post date: [January 11, 2019, 9:41pm UTC](https://discourse.julialang.org/t/counterfactual-regret-minimization/19543/1 "2019-01-11T21:41:24Z")

</div>

Is anyone aware of a Julia implementation of [Counterfactual Regret Minimization](http://poker.cs.ualberta.ca/publications/NIPS07-cfr.pdf) (CFR)? I found a [python implementation](https://github.com/tansey/pycfr) but I haven’t been able to find anything in Julia.

I’m thinking about writing a Julia implementation but I’m a little concerned that the reason I can’t find an implementation is because there are better options. Is there any other approach that you would recommend over CFR?

---

<div class="post-metadata">

### Author: ![ajkeith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ajkeith/32/970_2.png) [@ajkeith](https://discourse.julialang.org/u/ajkeith)
#### Post date: [February 15, 2019, 8:52pm UTC](https://discourse.julialang.org/t/counterfactual-regret-minimization/19543/2 "2019-02-15T20:52:11Z")

</div>

A couple of updates on this question.

1. I haven’t been able to find a CFR implementation in Julia, so I’m working on one.

2. According to [Brown, Lerer, Gross, and Sandholm (2018)](https://arxiv.org/pdf/1811.00164.pdf), external-sampling Linear Monte Carlo CFR ([Brown and Sandholm 2019](https://arxiv.org/pdf/1809.04040.pdf)) is the state of the art for two player zero sum extensive form games (at least in Poker applications). However, first order methods, such as [mirror prox](https://epubs.siam.org/doi/pdf/10.1137/S1052623403425629) and the [excessive gap technique](https://epubs.siam.org/doi/pdf/10.1137/S1052623403422285), have faster theoretical convergence and recent results suggest that they can be faster than CFR techniques with appropriate parameter tuning ([Kroer, Waugh, Kilinc-Karzan,and Sandholm 2018](https://link.springer.com/content/pdf/10.1007%2Fs10107-018-1336-7.pdf)).
