To validate the performance of a trained Pathmind policy, you will need to run a Monte Carlo experiment in AnyLogic. A Monte Carlo experiment executes thousands of simulation runs, using random initial seeds, which can be used to validate the results of the policy.

### Step 1: Determine which metrics to track.

In your AnyLogic model, note which metrics you'd like to measure (you'll have to reference them in the wizard). This can range from specific variables, to AnyLogic histogram data, or anything else.

### Step 2: Create a new Monte Carlo experiment.

### Step 3: Configure your Monte Carlo.

Select a name for the experiment.

Set the `Number of Iterations`

(i.e. the number of simulation runs) to 100, the minimum number we recommend.

Define the metrics you want to track.

**Title **- This is the graph label, and it can be anything. **Expression **- The metric you would like to track. Typically, this is a variable in your AnyLogic simulation. **Number of Intervals** - Range of possible values in your metric. **Initial Interval Size** - The size of each bar in your bar chart.

### Step 4: Run your Monte Carlo.

Change the Pathmind Helper "Mode" to "Use Policy" and point it to the policy zip file that you had exported from Pathmind.

Run your Monte Carlo. This may take **several hours,** depending on the length and complexity of your simulation.

### Comparing Results

At the conclusion of your Monte Carlo, you should see a normal distribution. The next step is to compare these results with a baseline. Typically, comparable baselines include:

- Random Actions
- FIFO
- Heuristics
- Optimizers such as OptQuest

## Example Comparison

**Monte Carlo Using Pathmind Policy **

As you can see, using the trained Pathmind policy, the number of balked customers is about 75 on average. Lower is better in this case.

**Monte Carlo Using Random Actions**

In comparison, the average number of balked customers is about 225 using random actions.

This is far worse than the trained policy, meaning that the trained policy drastically outperformed our baseline of random actions.