GPU-Accelerated Counterfactual Regret Minimization
Juho Kim
TL;DR
This work tackles the computational bottleneck of counterfactual regret minimization (CFR) in large imperfect-information games by reexpressing CFR as a sequence of dense and sparse matrix and vector operations, enabling GPU-wide parallelism at the cost of higher memory usage. The authors implement a GraphBLAS-inspired framework that encodes the game tree with adjacency, level-graph, and masking matrices, and perform the CFR update steps through linear-algebra recurrences rather than recursive tree traversal. Across 20 OpenSpiel-discrete games, the GPU-accelerated CFR demonstrates orders-of-magnitude speedups over the Python baseline (up to 401.2×) and substantial gains over the C++ baseline (up to 203.6× for large games), with additional insights into memory tradeoffs and precision effects. The approach shows practical potential for solving larger games faster and provides a foundation for future enhancements, including integration of CFR variants and pruning strategies within the matrix-based framework.
Abstract
Counterfactual regret minimization is a family of algorithms of no-regret learning dynamics capable of solving large-scale imperfect information games. We propose implementing this algorithm as a series of dense and sparse matrix and vector operations, thereby making it highly parallelizable for a graphical processing unit, at a cost of higher memory usage. Our experiments show that our implementation performs up to about 401.2 times faster than OpenSpiel's Python implementation and, on an expanded set of games, up to about 203.6 times faster than OpenSpiel's C++ implementation and the speedup becomes more pronounced as the size of the game being solved grows.
