Command Line Interface
Basic Usage Examples
Run 1,000 games with Random Players
catanatron-play --num 1000 --players R,R,R,RRun 10 1v1 games between VictoryPointPlayer and ValueFunctionPlayer
catanatron-play --num 10 --players VP,FPit 3-player Catan with basically no discard limit
catanatron-play --num 1 --players W,F,AB:2 --config-discard-limit 999Play 1v1 against ValueFunctionPlayer until 15 points with discard limit set to 9 (would not recommend 😅; its much better to play using the GUI)
{% code overflow="wrap" %}
catanatron-play --num 1 --players F,H --quiet --config-discard-limit 9 --config-vps-to-win 15{% endcode %}### Using Different Players
Many of the Bots are ready to be used from the CLI using the --players flag. Specify players by using <id>:<param1>:<param2>:... syntax. For example,
G:10is GreedyPlayoutsPlayer with rollouts = 10AB:3:Trueis AlphaBetaPlayer with 3 ply look-ahead and prunning turned on...
For more information, use:
catanatron-play --help-players
Saving Game Results
You can save the output of games using the --output and --output-format flags. For example:
JSON Format
Inspecting the data directory you should see all 5 games.
Other Formats
You can also generate data in CSV and Parquet for Machine Learning and similar applications. See more at Data and Machine Learning.
Last updated