> For the complete documentation index, see [llms.txt](https://cardstock-studio.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardstock-studio.gitbook.io/docs/test/simulate-and-analyze.md).

# Simulate & Analyze

## Set Details

Before you run your simulation, set the number of games, and you can set the player personas. We suggest running a few games to see how it goes, to save time — eventually we suggest running 1,000 games for a strong average result.

### Personas

These are the bot personas assigned in the [Personas & Goals](/docs/test/personas-and-goals.md) step. Choose one for each seat — if you want to exclude a player (to test different player counts), set the seat to "*None (not in game)*".

#### Greedy & Random

"Greedy" players simply do whatever the best option is "right now" — they are not based on any advanced logic. "Random" players literally do random actions. Generally it's best to test with all players Greedy or all players Random, to check for structural issues such as 1st player advantage.

Otherwise, use Personas.

### Randomize Seats

When using *Personas*, turning this on will put each in a different seat, allowing you to more easily check for seat bias.

### Set variation

Optionally you may run two variations against each other, including the *Default*, or two defined *Variations*. When set, the first variation will run, then the alternative comparison, for the same number of games.

Click "*Run Simulation*" to run your game!

## Watching a Game

You can also click "*Watch a game*", "*Watch, start paused*" to run a single game, with the option of stepping through each turn. This is a great way to understand why the bots made the decisions, which helps you find edge cases and potential logical bugs in your simulation, to improve the output value.

<figure><picture><source srcset="/files/6w5TYaH55doFMNmeYOJv" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FmWxDrXqAEUY4jx8N9Wii%2FScreenshot%202026-07-19%20at%208.31.24%E2%80%AFPM.png?alt=media&amp;token=192e688b-4833-4fed-b0f9-50e295118a02" alt=""></picture><figcaption></figcaption></figure>

When you run a game like this, it resolves quickly, which is why you're able to step through the turns.

{% hint style="info" %}
There is a lot of data available when watching a game, which enables you to fully fine-tune the system. Check out what is availble and decide what's important for you at this moment — most likely you may not care about all of the information all at once, but will care about each at different times.
{% endhint %}

## Simulation Running

When running, there will be updates constantly, including Live decisions, results of games, and the current game steps + an estimate of time remaining.

<figure><picture><source srcset="/files/BEgD0gwTVeB3ADyDCh92" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FrziPvQTV5U1HYVYH32Av%2FScreen%20Recording%202026-07-19%20at%208.34.19%E2%80%AFPM.gif?alt=media&amp;token=c685f9d0-e838-4c79-b24a-fc3f592d8867" alt=""></picture><figcaption></figcaption></figure>

ideally you'll see a variety of personas and point values for each game. Wait until the end to see the averages, which will tell you more about potential balance or simulation code issues.

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FEvlvO0lziT9hNUw7rs1d%2FScreenshot%202026-07-19%20at%208.37.19%E2%80%AFPM.png?alt=media&amp;token=0c9b5090-30aa-4963-ba54-a401a37b8ade" alt="" width="563"><figcaption></figcaption></figure>

## Moves vs Turns

The system will show you the number of "Moves". This is not the same as the number of turns — each individual action is considered a "move". For example, if the turn is "Take two gems", there will be two moves — take one gem, and take one gem.

If you would like to see turns, be sure to add that to the [Measurements](/docs/test/measurements.md).

## Fixing Issues

Most likely you'll spot games where things didn't go right — perhaps the bots got into a loop and nothing progressed. When this occurs, attempt to figure out what they were doing in the loop, and then go back to the [Build Playtest Game](/docs/test/build-playtest-game.md) phase and make updates with the AI. Often these are edge cases that are only revealed through automated simulations.

Once fixed, they should not occur again, and your simulation will be even stronger.

## Analyze Past Simulations

The "Analyze" tab will show your past simulation results. Simply select a saved report to view.

## Analyzing Results with AI

When viewing results, you can click "*Export AI Instructions*" to have an AI analyze the results. We find that it helps to read their response while remembering they are not human and do not fully understand your game — only the numbers and words given to them. They can help illuminate things however.


---

# 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://cardstock-studio.gitbook.io/docs/test/simulate-and-analyze.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.
