A loot system designed as a math model, verified by Monte Carlo simulation, then simplified
Loot system design: key results
On one of our projects we handled loot system design — and the game balance behind it — for a game where the player collects a very large number of items, and where those items are modeled on real objects with continuous, interacting properties. We did not build it and tune it by feel. We wrote the math first, ran a Monte Carlo simulation of it, and showed the client what a player would receive at every step, and therefore how the player would feel, before the system was implemented.
Three results came out of that order of work. The client saw the experience as numbers and charts before the system was built. The drop engine went from a first version with 14 tuning parameters to a final one with 5. And the behavior of the final engine is known in advance: in a simulation of 200,000 sessions, the share of sessions that go 20 finds without a top find falls from 12.2% to 5.3%, while the long-run drop rate of top finds stays at 10%.
This article walks through the proof, the model, the engine, the simplification and the measurements. We cannot name the project or its setting, so the item attributes below carry neutral names.
Proving the loot system with a Monte Carlo simulation
The usual way to tune loot is to build it, play it and adjust until it feels right. Each pass through that loop needs a working build and ends with an opinion.
With the model written as formulas, a simple Monte Carlo analysis answers the same questions with numbers: what a player holds after each step, how long the wait for the first good find is, how long the worst dry streak is, how much one session differs from another. We could put those answers in front of the client and prove the experience before implementing it. Changing a constant meant rerunning a simulation, not rebuilding and replaying the game.
The same simulation lives next to the code as an editor tool, so the analysis can be repeated after any change. The numbers in this article come from a rerun of that analysis on the final engine, and the full table is in the section “Monte Carlo simulation results”.
Why a classic loot table did not fit
The requirement was a familiar one: the player finds items, and the items differ in worth. The standard answer is a loot table. You define rarity tiers, give each tier a drop weight, and roll.
We started there, and it did not hold, for two reasons.
The first reason is that the items in this game are modeled on real objects that are graded on continuous scales. Two items of the same kind can differ in several independent properties, and the game needs those properties to interact the way they do in reality. A table with five rarity rows cannot express that. A table with enough rows to express it becomes impossible to balance by hand.
The second reason is volume. A player collects a very large number of items per session. With discrete tiers, the player sees the same few outcomes hundreds of times, and the tier boundaries become the only thing that matters.
So we built the math from scratch, in five steps: define the attributes, define how they interact, collapse them into one value number, invert the functions so that items can be generated from numbers in the range 0 to 1, and put a feedback engine on top that shapes the sequence of drops.
How we built the loot system math model in 5 steps
Step 1. Item attributes
Every item has three graded attributes and a size. We normalize each attribute to the range 0 to 1 and call them , and . The size spans a ratio of between the smallest and the largest possible item.
Attributes and are “more is better”. Attribute is different: its best value is in the middle of the scale, and both extremes are bad. This comes directly from how the real objects are graded, and it is the property that a tier table handles worst.
Step 2. How the attributes interact: the quality formula
For the sweet-spot attribute we use a parabolic peak centered at 0.5 with half-width :
A parabola is flat near the ideal, so an item that is close to perfect still scores high, and it falls off quickly toward the extremes. Outside the interval from 0.1 to 0.9 the score is zero.
The three factors are combined with a weighted geometric mean. The sweet-spot attribute carries half of the weight and the other two carry a quarter each:
We chose a geometric mean over a plain product and over an arithmetic mean for specific reasons. A plain product punishes good items: three factors of 0.8 multiply to 0.512, while their geometric mean is 0.8. An arithmetic mean lets one excellent attribute hide a ruined one. The geometric mean keeps the weakest-link rule, because any factor at zero drives the quality to zero, and it still lets an item with all factors high approach 1.
Figure 1. Quality as a function of the sweet-spot attribute, for three levels of the other two attributes.
The model is pluggable per item family. A second family in the same game has no use for attribute and inverts the role of , so that less is better:
Both families output the same thing: one number between 0 and 1. Everything downstream works on and does not need to know which family produced it.
When the three attributes are rolled uniformly, the quality distribution over seven equal grades looks like this (4 million simulated items):
Figure 2. Share of drops per quality grade, uniform attribute rolls.
The lowest grade holds 23.4% of drops, because 20% of uniform rolls put in the dead zone and score exactly zero. The top grade holds 3.1%. We got a rarity pyramid without writing a single drop weight: it follows from the grading rules.
Step 3. One item value number
Quality alone is not worth. A flawless item the size of a grain of sand is a curiosity. The common value characteristic is the product of quality and size:
This is the number the rest of the game reasons about, and it is comparable across item families.
Step 4. Backward functions for item generation
A forward model tells you what an item is worth. To generate items, and to test the model, you need to go the other way.
For size we use inverse-transform sampling with a shaping exponent . One uniform random number produces one size:
The distribution is log-uniform for and shifts toward small items as grows. It has a closed form, which makes it easy to reason about:
With the baseline , the median item is 12.6 times the minimum size, and 17.4% of items land in the top size decade and above (1,000 times the minimum or more). This matches the real-world pattern we were modeling: most finds are small, and large ones are rare and never impossible.
Figure 3. Size as a function of the random number, for the baseline exponent and the two clamp values.
For quality, the forward function maps many attribute combinations to the same , so the inverse needs a convention. We fix the sweet-spot attribute at its ideal and split the rest evenly:
Substituting back gives . For the second family the inverse is and . Any system that thinks in quality can ask for an item with a given and receive attributes that grade back to the same number.
Step 5. Making it fun: the drop engine
A correct distribution is not automatically a good experience. Independent random rolls produce long dry streaks and lucky clusters, and with a large number of finds per session a player will meet both. We wanted the sequence to hold the player near the edge: not left in misery, and not handed all the best items at once. That edge is what produces the “one more try” feeling.
We call the engine a Bayesian-Bernoulli luck reservoir. The name describes the idea: every find is a Bernoulli trial (it is a top find or it is not), the engine holds a prior expectation of the success rate, and it compares the player’s observed history against it. The implementation is deliberately simpler than a full posterior: one expected rate, one observed frequency.
Calibration. At start the engine simulates 5,000 drops at the baseline exponent with a fixed seed, so every client derives the same numbers. It computes the mean value , defines a top find as any item with , where
and records the expected rate of top finds, . With our constants, is about 10%.
Feedback. After every find the engine updates the observed rate and moves the size exponent for the next find:
Here is the number of finds so far, is the number of top finds, , , and . A player who is running hot gets a larger exponent, which makes large items rarer. A player who is running cold gets a smaller one. At the clamp values the chance of a top find per roll is 15.9% (cold limit) and 5.9% (hot limit), against 10.0% at baseline.
Three properties of this design matter to us.
The engine steers one continuous parameter, not a probability table. It can never produce an item the model does not allow, and it does not touch quality at all, so the grading rules from step 2 stay intact.
The long-run economy is unchanged. The only fixed point of the feedback loop is and . The engine changes the order of outcomes, not their totals.
It is cheap. The state is two integers.
Figure 4. One simulated session. A miss on the first find drops the exponent to 1.40; an early top find pushes it to the upper clamp; after that the corrections shrink.
From the full engine to the simple one
The engine described above is the second version. The first was a full implementation: a pluggable layer of four interchangeable strategies, each adjusting the random number before it reached the size function. A pool drew predetermined outcomes without replacement, so every cycle contained a fixed share of good results. A pity counter raised the roll after each consecutive miss and forced the maximum at a threshold. A karma balance accumulated the gap between expected and actual results and let it decay. A sliding window compared the recent average against a target. All four are established techniques.
We replaced them for three reasons, and each one only became visible once the value model existed.
They act on the random number itself. An additive boost followed by a clamp to the range 0 to 1 moves a block of probability onto the endpoint: a boost of 0.2 turns 20% of rolls into exactly 1, which is the largest item the model can produce, and a pity trigger does the same with certainty. The size function in step 4 was built so that the largest items stay rare. Steering the exponent reshapes the whole curve and never piles outcomes onto its end.
Their targets are set by hand. A pool needs a target rate, a window needs a target mean, a karma balance needs an expected result, and each of those has to be chosen again whenever the value model changes. The reservoir derives its reference from the model during calibration, so a change in the grading rules retunes the engine with no manual step.
They carry many variables. The four strategies exposed 14 tuning parameters between them, plus pools, buffers and counters to keep consistent. The reservoir has 5 parameters and two integers of state, in one class of about 100 lines.
Dropping the variables this project did not need was the point of the second version. Every tuning parameter is one more dimension to simulate, explain and defend. With five, the full behavior of the engine fits in one table and one chart, a designer can predict what a change will do before making it, and the code is small enough to review in one sitting.
Monte Carlo simulation results: drop rates with and without the engine
For this article we reran the analysis on a standalone implementation of the formulas: 200,000 sessions of 300 finds each, with the engine on and with a fixed exponent.
| Metric | Pure random | With the engine |
|---|---|---|
| Top-find drop rate over the session | 9.98% | 10.03% |
| Spread of that rate between sessions (standard deviation) | 1.73 pp | 1.39 pp |
| Finds until the first top find, median | 7 | 5 |
| Finds until the first top find, 90th percentile | 22 | 16 |
| Sessions with no top find in the first 20 finds | 12.2% | 5.3% |
| Sessions with no top find in the first 30 finds | 4.3% | 1.2% |
| Longest dry streak in the session, median | 35 | 35 |
| Longest dry streak in the session, 99th percentile | 74 | 70 |
| Mean value per find, relative to pure random | 100.0% | 100.5% |
Figure 5. Share of sessions still waiting for their first top find.
The opening of a session is where the engine works hardest. The share of sessions that go 20 finds without a single top find falls from 12.2% to 5.3%, and the share that go 30 finds falls from 4.3% to 1.2%. Sessions also become more alike: the spread of the top-find drop rate between sessions drops by 20%. The long-run rate and the mean value per find stay within 0.5% of the pure random baseline, which confirms the fixed-point argument.
Limits and when to use this approach
The observed rate is cumulative, so each new find moves it by roughly . After a few dozen finds the corrections are small, and dry streaks deep in a long session are almost as long as in pure random play: the median longest streak is 35 finds in both cases. That is the trade-off of a two-integer state. A windowed or decaying memory would keep the engine responsive late in a session, at the cost of a stronger and more detectable intervention.
When a classic loot table is enough
This approach pays off when a game has many items with continuous, interacting properties and the player collects them in large numbers — exactly where a hand-tuned loot table breaks down. For a small set of discrete rewards, a classic table is simpler and enough.
Key takeaways for loot system design
Model the domain before modeling the drops. Once the attributes and their interactions were right, the rarity pyramid, the value number and the generation functions all followed from the same few formulas, and the designers tune a handful of constants instead of a table.
Keep the fun layer separate from the truth layer. The value model describes what an item is. The engine only decides which way to lean on the next roll. Each can be tested, simulated and retuned without touching the other.
Measure the feeling. “One more try” is a design goal, and it can be checked with a simulation and a table before a single player sees the build.
Simplify after you understand. The full version of the engine showed us which variables mattered. The simple one keeps only those, and it is more predictable, easier to control and cheaper to maintain.
Need your game economy or loot system proven before it is built? Our engineers design and simulate game systems as part of full-cycle game development. Talk to our team.
About the author
Vitalii Khokh is Head of Engineering at Kevuru Games. His remit covers engineering, QA, technical art, VFX and game design, along with the studio’s AI pipelines and the working link between the art departments and engineering. He has been programming for 21 years, 11 of them in games, across narrative titles, multiplayer systems and live-ops, including a mobile game with more than 10 million installs on each of Android and iOS.
He holds a bachelor’s degree in software engineering and a master’s degree with honours in systems programming. During his doctoral research he authored 34 scientific publications on expert systems, fuzzy logic, decision models and the robustness of recommendation systems. That is where the habit in this article comes from: write the math, simulate it, then build.
Selected peer-reviewed publications on ORCID: orcid.org/0000-0002-5608-4632



