> 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/graphical-user-interface.md).

# Graphical User Interface

We provide a [docker-compose.yml](https://github.com/bcollazo/catanatron/blob/master/docker-compose.yml) with everything needed to play and watch games (useful for debugging). It contains all the web-server infrastructure needed to render a game in a browser.

<figure><img src="/files/bbcQ1dZZbJTewNW28FTm" alt=""><figcaption><p>Catanatron Web UI</p></figcaption></figure>

To use, ensure you have [Docker Compose](https://docs.docker.com/compose/install/) installed, and run (from this repo's root):

```bash
docker compose up
```

You should now be able to visit [http://localhost:3000](http://localhost:3000/) and play!

You can also (in a new terminal window) install the `[web]` subpackage and use the `--db` flag to make the catanatron-play simulator save the game in the database for inspection via the web server.

```bash
pip install .[web]
catanatron-play --players=W,W,W,W --db --num=1
```

The link should be printed in the console.

{% hint style="info" %}
A great contribution would be to make the Web UI allow to step forwards and backwards in a game to inspect it (ala chess.com)!
{% endhint %}


---

# 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/graphical-user-interface.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.
