Attempt to work through An Introduction to Counterfactual Regret Minimization of Todd W. Neller and Marc Lanctot.
make buildTo run examples of CRF using default values
To compute the average mixed strategies for both player in a RPS game:
make run_rpsTo compute the average mixed strategies for both player in a Colonel Blotto game:
make run_bltThe executable is located in .\build\bin\main.
Usage:
main RPS [seed N] # Run Rock-Paper-Scissor
main Blotto [seed N B S] # Run Colonel Blotto
Options:
seed Seed used
N Number of Monte-Carlo Steps
B Number of battlefields (Blotto only)
S Number of soldiers (Blotto only)A python script is included to visualize the convergence of the Monte-Carlo algorithm towards an average mixed strategy. It will create a gif using the iterated average strategies of player 1 during the Monte-Carlo algorithm. The exported data are located in export_avg_strategy.csv and the produced gif in average_strategies.gif.
make installmake animFor a Colonel Blotto with 3 battlefields and 5 soldiers using a seed of 20, we have the following average strategies:
Internally a strategy is encoded using a combinatorial number system. For instance the strategy 0 for a Blotto with 3 battlefields and 5 soldiers represents:
- 5 soldiers in the battlefield 0
- 0 soldiers in the battlefield 1
- 0 soldiers in the battlefield 2
