Getting probability and numbers exactly right
In a randomized progression system, I removed probability differences by line position at the design stage, before the feature was released, and kept the numbers on screen from diverging from the server's bonus. Ahead of a higher auto-draw cap, I made the hot path about 2x faster.
Situation
Probabilities and numbers are what players watch most closely. Randomized items must have their probabilities disclosed, and if the numbers on screen differ from the actual bonus, it immediately becomes a matter of trust.
Decisions
Equipment effect reroll: A system that rerolls the three lines of random effects on a piece of equipment. I double-checked with an AI agent whether every line really has the same probabilities, and found that the sampling method could create differences. With the game designers, I settled on a sampling method that gives every line the same probabilities. We also agreed on a rule to store effects as ids, not values, and never to change an id once used.
Published rate table: Just before the equipment effect reroll update, I worked with an AI agent to check the rate table published in the game, row by row, against the server code and data.
Constellation growth: Content where the area of a shape formed by connecting vertices becomes a stat bonus. I compute the area from precomputed values and integer math, so the result is the same regardless of the server environment. The server also computes the area shown on screen with the same function as the bonus and sends it down, so the two never diverge.
Auto-draw: Before a large increase to the cap, I went through the profile with AI to find where the cost was concentrated, then moved repeated lookups out of the loop and merged the grants into one. The grant results stayed the same.
Result
Probability differences by line position were removed before the feature was released. In a benchmark that reproduced a real-scale user state, auto-draw ran about 2x faster at the new cap.