Economics in Games
Modeling the industries that make the games.
Saturday, October 24, 2026
Thursday, July 22, 2021
How to Tune a Feature (Part 2)
In the previous post we argued that volatility in a slot economy is determined in part by the casino operator when they set the terms of free, earned and purchased credits. In particular, it is important to understand how much time and effort managers put into the earned credits component, and to put into clear terms why they are doing it. It turns out they are correct to do so, and this article will begin to build a theory that can help organize how they go about this.
Previously when we looked at the earned credits component of the economy accounting identity, we assumed that the difficulty to complete was low or that players would complete the challenge. This simplification helped us focus on the main result that although there are many combinations of reward and difficulty that result in the same return to player for the individual from that feature, there was only one combination consistent with equilibrium given casino rake. The obvious reality though is that only a portion of the players will actually complete a feature. Predicting and measuring this proportion is our aim. We begin with an explicit form of earned credits.
EARNEDt(Bt,Bt-1) = k*Bt-1*I(Bt>=(1+c)*Bt-1), (1)
We are writing out the word EARNED because we are going to also use the mathematical expectation operator, E[...], and we we want to avoid confusion. I(Bt>=(1+c)*Bt-1) is the indicator function which is equal to 1 when Bt >= (1+c)*Bt-1 and is 0 otherwise. In words it guarantees that earned credits are 0 unless the player bets (1+c) times yesterdays bets, in which case they are awarded with k times yesterday's bets.
So what on average do we expect the players to earn (i.e. we take the expectation E[...])?
E[ EARNEDt(Bt,Bt-1) ] = E[ k*Bt-1*I(Bt>=(1+c)*Bt-1) ]. (2)
And by linearity of the expectation operator,
E[ EARNEDt(Bt,Bt-1) ] = k*Bt-1*E[I(Bt>=(1+c)*Bt-1) ]. (3)
Now we apply one more trick, which is probably one of the deeper and more useful results from probability and measure theory. The expectation of an indicator function is identical to the probability of that event.
So,
E[ EARNEDt(Bt,Bt-1) ] = k*Bt-1*P(Bt>=(1+c)*Bt-1). (4)
Our basic algebra combined with a little probability theory gives us a precise statement. We actually do need to understand the chance that players complete the challenge in order to manage the economy and keep it in equilibrium. Arguing as before, we fix return to player of the feature at 2%,
k/(1+c) = 2%, (5)
and combine it with the economy accounting identity in equilibrium to get,
k*P(Bt>=(1+c)*Bt-1) = c * rake. (6)
(See "How to Tune a Feature" to make these steps clearer).
Instead of two equations in two unknowns, k and c, to determine equilibrium and return to player as we did when we assumed the player always completed, now we must estimate the probability that the player will or can bet that much. Plugging in different guesses for P shows how substantially different the answers you might get are when compared to the naïve assumption of completion.
Luckily we have some ideas about P(Bt>=(1+c)*Bt-1). The first is that it is clearly a function of c. Intuitively as c gets larger it is harder to complete the feature and P decreases. Graphically we might assume something like the following.
The average player is pretty much guaranteed to complete so long as expected free and paid coins can cover the ask of (1+c) times yesterday's bets, Bt-1, after which point it begins to drop off. But how fast? and how do we account for different size bets? Those are the interesting and difficult questions which require brave and concrete models. Let's show how to proceed with the relevant variables and make a very strong assumption to show what is at the heart of the question.
P(Bt>=(1+c)*Bt-1) = P(St*avg(Bt)>=(1+c)*St-1*avg(Bt-1)), (7)Sunday, July 18, 2021
Volatility, Spins and RTP
Thursday, July 15, 2021
Inflation in Token Economies
Headline inflation is fundamental to most economies and your slot economy is no exception. Sometimes it is a slow and steady inflation as players are rewarded for moving up the experience curve. Other times it is a surprise event wherein the casino increases the rewards for all the inflows. This article will use the accounting identity for slot economies and the basic theories of feature tuning and sales to construct a larger analysis of a few simple strategies for inflating an economy. The core empirical result to capture is that economic activity in total scales by exactly the rate of inflation.
To start we will consider free coins Ft, earned coins Et(Bt,Bt-1) as a function of today's and yesterday's bets, Bt and Bt-1, and purchased coins Pt = Dt*Xt where Dt is $ demand and Xt is the exchange rate. RAKEt is the total amount of coins the casino rakes and Wt indicates wallets. To inflate the economy we will multiply free inflows, initial wallets and the exchange rate by 10.
So,
Ft + E(Bt,Bt-1) + Pt = Wt - Wt-1 + RAKEt (1)
becomes
10*Ft-1 + Et(Bt,Bt-1) + Dt*10*Xt-1 = Wt - 10*Wt-1 + RAKEt. (2)
It's clear the casino manager's job isn't finished as they also need to think about earned credits. Imagine first that they leave the same features running with the same rules as before the inflation,
meaning,
Et(Bt,Bt-1) = Et-1(Bt,Bt-1) = k*Bt-1*I(Bt>=(1+c)*Bt-1). (3)
(Today I've introduced the notation I(Bt>=(1+c)*Bt-1), which equals one if todays bets exceed (1+c) times yesterdays bets and is zero otherwise. It can be added into the previous feature tuning post for greater generality. But just ignore it, if it is confusing.)
The empirical result we see when inflating an economy is Bt = 10*Bt-1 and Wt =10*Wt-1. So substituting (3) into (2) and dividing through by Bt gives
ft-1 + et-1/10 + Dt*Xt-1 = rake. (4)
we see that to reach equilibrium $ demand Dt must increase a lot compared to Dt-1 or the casino must drop rake, because earned credits have been divided by 10. Maybe that will be too much of a change to ask of players. So, instead we can modify (3) by demanding that players spend 10 times (1+c)*Bt-1 and will reward them correspondingly with 10 times as much coins.
So,
Et(Bt,Bt-1) = 10*Et-1(Bt,10*Bt-1) =10*k*Bt-1*I(Bt>=10*(1+c)*Bt-1). (5)
Now, substituting (5) into (2) and dividing through by Bt =10*Bt-1 gives us the usual equilibrium condition:
ft-1 + et-1 + Dt*Xt-1/Bt-1 = rake. (6)
Equilibrium is reached with Dt = Dt-1 and we should expect no fundamental changes to the variables Ft, Et, Bt or Wt.
The force of the casino making a profit through inflating requires balancing between these two extremes. For example by only rewarding earned credits with a factor of 8x and requiring the players to purchase some small difference to reach equilibrium wallets. Any irrational exuberance from feeling richer that would make the players buy more coins doesn't seem to happen as a matter of logic or in practice without some prompting.
That being said there is a hidden part to this story. These variables like Bt are aggregates and this variable in particular, which is total bets made in coins, can be expressed as the product of total spins St and average bets,
or,
Bt = avg(Bt) * St. (7)
Understanding this means that even though Bt jumps up to 10*Bt, avg(Bt) does not have to. In fact I have seen St increase to make up the difference. Managers having grown used to an economy where median wallets tracked mean wallets but with less noise were surprised to see median wallets growing. In fact this had to happen because players were spinning more.
To understand this look at spins vs players bucketed by rtp before and after the inflation. The central limit theorem gives shape to two beautiful curves, but the one after the inflation will be taller and narrower. The curve with higher spins has a higher median player rtp.
Applying the accounting identity for slot economies to just those players around the median rtp gave very precise estimates of how much median wallets should have been growing. This leads us to the more interesting questions. Why did players' desire for volatility decrease? and what if anything should the casino do about it?
Eventually the average bets grew in size, spins dropped down to normal levels, and median and mean wallets moved in synchronization again. I conjecture this is a long run equilibrium condition deeply rooted in the players' tastes for volatility. In the next post we will see more precisely how spins St relates to volatility.
Sunday, July 11, 2021
Do Hangover Effects Exist?
Wednesday, July 7, 2021
How to Tune a Feature
Imagine having a feature that a casino plans to turn on a few times each week. The feature is meant to keep players engaged and give them goals, but isn't necessarily a big money mover, so that the dynamics of the economy should be mostly stable.
One way to interpret this is by observing the frequent truth of constant wallets. In terms of the economy equation derived in the previous post,
ft + et + pt = (Wt-Wt-1)/Bt + rake,
simplifies,
ft + et + pt = rake. (1)
Where the change of wallets (W-W') = 0. ft, et and pt are free, earned and purchased credits divided by total bets, respectively. Finally rake is the expected (1- return to player) of the casino.
The casino is going to pay out et = 2%, in an equilibrium economy with ft-1 + pt-1 = rake. This is enough to derive a useful equation, when we realize that ft=Ft/Bt , etc, and the casino is going to require an increase c in Bets before granting the reward. Since Bt = (1+c)Bt-1, we get from equation (1),
ft-1/(1+c) + et + pt-1/(1+c) = rake,
simplifies,
et*(1+c) = c * rake. (2)
The structure of et = k*St-1/Bt, or in words, the earned credits are equal to k times some player statistic, St-1. This allows us to rewrite (2) as,
k*St-1/Bt*(1+c) = c * rake. (3)
As stated above the casino targets 2% feature return, i.e.,
k*St-1/Bt = 2%. (4).
Again substituting Bt = (1+c)Bt-1, and assuming the casino uses a bet based player statistic we take St-1=Bt-1 which gives,
k/(1+c) = 2%, (5)
and,
k = c * rake. (6)
(5) and (6) are two linear equations in two unknowns, c and k, which means we can solve them. Taking rake = 8% we determine c = 33.3% and k = 2.67%.
The importance of this result is that you can choose rtp of the feature but then you must choose either how much you want players to increase bets or how much you want wallets to change. There is only one value of c and k consistent with 2% feature return and no change in wallets.
More generally we may want to decrease wallets in the hopes that players purchase to maintain them, etc. Following most of the above argument but with, (Wt-Wt-1)/Bt = dw, we would get
k - rake * c = dw, (7)
or
2%/(1+c) - rake * c = dw. (8)
The following is a plot of dw vs c from (8).
These simple equations should supplement the tuning of regularly occurring features, so that overall changes in wallets can be predicted and tracked. Too often the casino asks the players to increase bets by what "feels right" or doesn't test at all against the economy goals, with a resulting falling apart of the equilibrium. What is necessary is to make explicit rake, feature return and desired change in wallets. From there, a model that specifies "bet ask" can be identified.
