> For the complete documentation index, see [llms.txt](https://docs.catanatron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catanatron.com/using-catanatron/interactive-blocks.md).

# Command Line Interface

### Basic Usage Examples

* Run 1,000 games with Random Players

  ```bash
  catanatron-play --num 1000 --players R,R,R,R 
  ```
* Run 10 1v1 games between VictoryPointPlayer and ValueFunctionPlayer

  ```bash
  catanatron-play --num 10 --players VP,F 
  ```
* Pit 3-player Catan with basically no discard limit

  ```bash
  catanatron-play --num 1 --players W,F,AB:2 --config-discard-limit 999
  ```
* Play 1v1 against ValueFunctionPlayer until 15 points with discard limit set to 9 (would not recommend :sweat\_smile:; its much better to play using the GUI)

  {% code overflow="wrap" %}

  ```bash
  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:10` is GreedyPlayoutsPlayer with rollouts = 10
* `AB:3:True` is AlphaBetaPlayer with 3 ply look-ahead and prunning turned on
* ...

For more information, use:

```bash
catanatron-play --help-players
```

<figure><img src="/files/n04Ox5JbqO1kb7OSbuOv" alt=""><figcaption><p>catanatron-play --help-players output</p></figcaption></figure>

### Saving Game Results

You can save the output of games using the `--output` and `--output-format` flags. For example:

#### JSON Format

```bash
catanatron-play --num 5 --players F,F,R,R --output data/ --output-format json
```

Inspecting the `data` directory you should see all 5 games.

```
data/
├── 2aba0ec4-51e7-47b6-b5a9-113874b2addf.json
├── 353a541b-59d2-4eb8-85ea-d6eb0d162e7f.json
├── 3c5f37ce-a73c-4180-91fd-28bf9f6dacd2.json
├── e31b00a3-845c-4bfd-92bd-c4a42cbafa27.json
└── ee547837-d5e2-4d9b-8420-583b2fdd793d.json

1 directory, 5 files
```

#### Other Formats

You can also generate data in **CSV** and **Parquet** for Machine Learning and similar applications. See more at [Data and Machine Learning](/advanced/data-and-machine-learning.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.catanatron.com/using-catanatron/interactive-blocks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
