Simulator service (Kaleido.Gre.Simulator, :8082)
Real customer data is hard to get and unsafe to experiment on, so the simulator invents customers with personas, makes them play, and keeps the ground truth of what each one was built to like. It has three jobs:
- Batch runs: generate a world and post its events to the activity service.
- Streams: publish a world to Kafka at a target rate, which also makes it the load generator.
- Evaluation: measure the recommender against the ground truth and against a hidden future.
API
| Method | Path | Purpose |
|---|---|---|
| GET | /personas | The six personas |
| POST | /runs | Start a batch run: customers (1 to 100,000), days (1 to 365), seed, anchorDate, poolSize (20 to 20,000), taggedOnly |
| GET | /runs, /runs/{id} | Progress and counters |
| POST | /streams | Start a stream: adds tps (1 to 200,000), repeat (1 to 1,000), sourceId (ingestion) |
| GET, DELETE | /streams | Status; stop |
| GET | /customers?persona&after&size, /customers/{id} | Ground truth |
| POST | /evaluate | Persona fit of the current recommendations on a sample |
| POST | /evaluate/holdout | Hidden-future accuracy test with several blends |
| DELETE | /data | Forget runs and customers |
Determinism
Generator is pure. A customer depends only on (seed, index, catalogue), and their events on (customer, seed, catalogue, anchor date, days). Each customer gets its own random stream derived from a SplitMix-style hash of seed, index and a salt, so customers can be generated in any order or in parallel, and event ids (NewGuid(rng)) repeat exactly. Re-running the same seed and anchor date adds nothing, because the activity service sees the same ids and counts them as duplicates.
How a customer is generated
Daily activity then follows these rules:
| Aspect | Rule |
|---|---|
| Sessions per day | Poisson with mean SessionsPerWeek / 7 x activity, x1.4 at weekends, x0.9 on weekdays |
| Which game | A favourite (weighted 1, 1/2, 1/3...) unless exploring; when exploring, with chance Taste a game tagged like a favourite, else any game by persona weight |
| Start time | Normal around 20:00 with a 3.5-hour spread |
| Length | SessionMinutes x log-normal, clamped to 1 to 240 minutes |
| Rounds | minutes x SpinsPerMinute, clamped to 1 to 150 |
| Stake per round | MeanWager x wager level x U(0.5, 1.5), rounded to 0.05 EUR |
| Payout | 30% chance; exponential multiplier scaled so the expected return equals the game's RTP |
| Future | Nothing after "now": a run anchored today stops at the current time |
Personas
| Key | Share | Likes | Favourites | Exploration | Sessions per week | Minutes | Mean wager | New-release bias | Taste |
|---|---|---|---|---|---|---|---|---|---|
high-roller-slots | 8% | Slots | 4 | 0.10 | 4 | 35 | 8 | 0.2 | 0.7 |
casual-slots | 35% | Slots | 8 | 0.35 | 2 | 12 | 0.4 | 0.5 | 0.6 |
table-strategist | 15% | Table games | 4 | 0.12 | 3 | 40 | 5 | 0.1 | 0.6 |
live-social | 15% | Live casino | 5 | 0.15 | 3 | 60 | 3 | 0.1 | 0.6 |
explorer | 17% | Anything | 0 | 1.0 | 5 | 6 | 0.5 | 0.3 | 0.3 |
new-release-hunter | 10% | Slots | 3 | 0.55 | 4 | 15 | 2 | 4.0 | 0.4 |
Game pool
A whole catalogue spread over a few hundred customers is too thin for patterns, so a world plays a pool (Pool.Choose): every tagged game first, then random untagged games up to poolSize. With taggedOnly, only tagged games. The pool is fetched from /similarity/export, which also supplies each game's tag neighbours for the Taste rule.
Batch run sequence
Stream sequence
The publisher is idempotent with acks=all, LZ4 compression, 20 ms linger and a 500,000-message queue. A full queue makes the producer wait, so if Kafka or the consumers cannot keep up, ActualTps drops below TargetTps and shows it.
repeat sends the same events again; they get new offsets, so they are real duplicates and inflate totals. It exists for longer load tests.
Evaluation
/evaluateasks the recommender for a sample of customers and measures type fit (share of recommended games whose type the persona likes), distinct studios, average score and empty lists, overall and per persona./evaluate/holdoutis the honest accuracy test. See Evaluation.