Tuesday 2 May 2017

Two game mechanics (2)

Here are two more observations that was made long time ago but recently came into my mind in some other form again.

Question from a Monopoly-like board game

If you have played Monopoly before you must have met situations where you really want to land on a certain grid for whatever reason (to grab a set of lands, to build houses etc) right? In that case the only thing you can do it to ride you luck and hope that you diced the right number.

Of course, however, in online games these can be easily negotiated. Item comes into play and give certainty on what number you can get from the dice, with some cost as well. You want to use those item wisely, so here is our model:

- A circular board of 22 grids.
- A fair square dice is used each round by default. Items maybe used to specify the dicing outcome.
- 4 bonus grids spreads uniformly over the 21 grids (except the starting grid). One must land on that grid exactly to receive bonus.
- 6 rounds in total. Note that it is theoretically possible to get all 4 bonuses regardless of the bonus distribution.
Goal: we want to land on all 4 bonus grids every time, while minimizing the usage of items.

*

You would expect that 3~5 items are used each time: if the distance from treasure is less than 6 you have no choice but to use an item to make sure that you reach the treasure. Sometimes you have to stretch faraway enough to reach those grids.

But what about the average usage of each of those numbers 1/2/3/4/5/6? Are they the same?


Well, simple simulation shows that the distribution is approximately geometric. But it turns out that my average usage on all 6 items are almost the same, which is an interesting fact to investigate at. Below is my thoughts:

First of all, it's natural to use a lot of 1/2 according to our distribution. At the same time if we uses lots of 1/2 then we might need to use more 5/6 as the rest of the grids are more sparsely spread.  What about 3/4? This is in fact the most mysterious part in my point of view but a possible reason is that the most probable distance that requires multiple rounds is of course the 7-9 range, and there is a high chance that you will need to use 3/4 to correct your position.

(For instance if the distance is 8 then there is a 4/9 chance that you will be using 3/4 once. This can be done by simply listing all possible outcomes. (x) is the correction step:

6 - (2)
5 - (3)
4 - (4)
3 - (5)
2 - 6
2 - 5 - (1)
2 - 4 - (2)
2 - 3 - (3)
2 - 2 - (4)
2 - 1 - (5)
1 - 6 - (1)
1 - 5 - (2)
1 - 4 - (3)
1 - 3 - (4)
1 - 2 - (5)
1 - 1 - (6)

Therefore the chance is 2/6 + 4/36 = 4/9.)

But given the geometric/exponential nature 7-9 won't happen that often after all. It is still very hard to explain my uniform usage of those items.

Of course, this is not even a problem for the developers -- this is something that only the players should worry about. Imagine that the board game comes from an extremely popular online game where 24/7 grinding + unlimited potion is required to get a rank up high, and the actual usage is uneven ("the alternative hypothesis"), knowing the correct distribution would save you several minutes from going back to the shop, hence giving you an edge over other players ---

Luckily the game I mentioned, is not competitive at all.

Exponential effort resulting in linear growth

Systems requiring exponential effort for linear growth is a canonical choice. It appears in most RPG (as well as idle games), based on the fact that exponential growth overwhelms any polynomial growth from whatever percentage bonus. The implementation is usually simple too. EXP bar that grows exponentially, item prices that grow exponentially, time requirements that grow exponentially...

But are there more implicit implementation of this trick? Some may suggest an item forging system so that when you forge A into B, A gains a fraction of the power of B -- you can still see the exponential nature behind: you need $2^N$ items to boost the item $N$ times (proportionally, and if we ignore the higher terms).

But recently there is a game that allows unlimited forging on the same item: on the Nth forge, 1/(N+r)k fraction of the power is merged into the item, where r and k are constants.

The developer is using harmonic series smartly here, with the fact that harmonic series is asymptotic to the log function. Let us do the mathematics here:

Suppose we have $2^N-r$ identical items of power 1. By forging everything into the same item, the new power is given by:

$1 + \sum _{i=r}^{2^N}\frac{1}{ik} \approx 1 + k^{-1}(N\ln 2 - \ln r)$

And if we have $2^N$ items and we forge it in the usual `exponential way' we get

$(1+\frac{1}{rk})^N  \leq 1 + \frac{5}{4}\frac{N}{rk}$

we use the constant 5/4 as for a generous upper bound.

Exponential effort is clearly necessary for linear growth. It prevents players from forging items using the usual `exponential way' as well. This is clear by checking the following equation

$N \ln 2 - \ln r - \frac{5}{4}\frac{N}{r} \geq 0$

to be feasible for most reasonable $r, N$, like $(N,r) = (5,3)$.


No comments:

Post a Comment