Skip to main content

Matrix Generator

· 3 min read
tony

Issue with slot34 (Dragon and the Fortune Pearl)

  • Currently, Slot34 saves a matrix after each spin to help choose the right payout. This is done by the AWP engine. However, the matrices are not diverse, making it hard to choose the right payout.

  • With 12 symbols and 15 cells, Slot34 can theoretically produce a trillion combinations. However, generating all of these would take over a century, making it impractical to store all results.

Solution

  • Heuristic technique → Pattern generator

Pattern generator

  1. Generate 1 million matrices and calculate their payouts.

  2. Create a pattern from each matrix and map it to its payout.

    • For example: "4101": ["AW0BDSW0CEWW00D", "W0WWDS0WBEA0WCF"].

    • Explain:

      • The pattern takes the form payout → [Patterns of matrices].

      • W and S stand for wild and scatter.

      • Numbers stand for symbol ids, which indicate the winning symbol.

      • Characters stand for any symbol.

  3. Construct a decision tree using the calculated payouts.

  4. Load each pattern and identify the optimal one based on:

    • Payout

    • Filled matrix

Test & Report

Payout combined

Payout rangeCountPatterns
0 - 1001499313817
100 - 2001498105038
200 - 400205229198
400 - 6004591732
≥ 60047142

Payout range

AWP + payout combined

// awp setting

{Min: 0, Max: 23000, MinHitRate: 0.25, MaxHitRate: 0.85, RtpAdjustment: 0.01, MaxPayoutMultiplier: 300, Weightages: []float64{35, 25, 20, 10, 10}}

payout_rangecountunique_matrix% (unique / count)
0.00 - 0.0052059140626378.04
0.00 - 1.0041267936879189.37
1.00 - 5.00385383695895.90
5.00 - 11.00135221314197.18
11.00 - 20.006679659998.80
20.00 - 33.503442340198.81
33.50 - 53.752169212898.11
53.75 - 84.121294126197.45
84.12 - 129.6958857597.79
129.69 - 198.0336935295.39
198.03 - 300.0012912395.35

Payout range

Resource