Slot Engine is in Beta - Stable, but may contain minor bugs
Slot EngineSlot Engine

Analyzing your Game

Get insights on your game


Introduction

Configure analysis to get useful statistics about your game.

Analyzing your game is quite simple:

Simply adjust your runTasks() configuration to include analysis:

game.runTasks({
  // ...
  doAnalysis: true,
  analysisOpts: {
    gameModes: ["base"],
    // Optionally analyze hit rates of tagged simulations
    tagStats: [
      { groupBy: ["symbolId", "kind", "spinType"] }, // Hit rates of win combinations
      { groupBy: ["criteria"] }, // Hit rates of criteria
    ],
  },
})

Analyze Hit Rates

Using the option tagStats, you can generate the stats_tags.json file to get a breakdown of hit rates for simulations with arbitrary tags. Hit rates are calculated considering the weights in the lookup table.

tagStats is an array of configurations, where a config item is built like this:

interface TagStatsConfig {
  /**
   * Properties to group by from the tagged search entries.
   * E.g. `["symbolId", "kind", "spinType"]` for symbol hit rates.
   */
  groupBy: string[]
  /**
   * Optional filter to only include tags matching these values.
   */
  filter?: Record<string, string>
  /**
   * Optional custom name for this stats group in the output.
   */
  name?: string
}

The resulting file will look like this:

stats_tags.json
[
  {
    "gameMode": "base",
    "groups": [
      {
        "name": "symbolId_kind_spinType",
        "groupBy": ["symbolId", "kind", "spinType"],
        "items": [
          {
            "key": "L3|5|basegame",
            "properties": {
              "symbolId": "L3",
              "kind": "5",
              "spinType": "basegame"
            },
            "count": 39979,
            "hitRateString": "1 in 12",
            "hitRate": 11.739591272077966
          }
          // ...
        ]
      }
      // ...
    ]
  }
]

Output Files / Publish Files

The output will be written to the __build__ directory.

stats_payouts.json

Contains, per win range, how many simulations fall into it, how many unique payouts it has, and the chance of hitting it during play.

stats_summary.json

Contains various statistics about volatility, hit rates, etc.

stats_tags.json

Arbitrary hit rate analysis.

Use of AI on this page: Some texts were improved with or written by AI.

On this page