About once every six months, I go through articles on game design and game analytics. Unfortunately, they contain many subjective experiences and little reproducible solutions. Today I decided to write a short article about the βrock-paper-scissorsβ balance based on the soulless theory of probability. The approach is available to any diligent reader. Of course, in the absence of a minimal mathematical culture, you will have to sort out
The article consists of 3 parts:
Formulation of the problem
Formalization (transition to formulation in mathematical language)
Decision
Formulation of the problem
Let there be three classes of ships - battleships, cruisers and destroyers. Each of them has hit points, damage done to the enemy on hit and accuracy. It is necessary to adjust these parameters in such a way that in 60% of cases, each type defeats its antagonist:
Battleships defeat cruisers
Cruisers are defeated by destroyers
Destroyers defeat battleships
Formalization
As an initial assumption, we will assume that the opponents are shooting at each other in turn, with the antagonist shooting the second. This assumption does not affect further reasoning and can be modified for a specific task. My goal is to show the way, not to provide a comprehensive solution for all possible variations of balance problems.
:
1 . β p1
dam= dam1, dam1 β , . dam= 0. 2 dam
2 0 (hp2 <= 0), 1, 2
2 . β p2
dam= dam2, dam2 β , . dam= 0. 1 dam
1 0 (hp1 <= 0), 2, 1 1
3
1 k
1
1
(hp1, dam1, p1), (hp2, dam2, p2). , hp dam k=hp/dam. , 6 4, (k1, p1), (k2, p2).
, , 1 k k2
(.. k-1 k2-1 , k- ). 2, k-1 k1 .
(.. 2 min(k1-1, k-1) ). , 1 , k
2
, 1, , . , ( , 0,0001).
3
2 β . 3 , .
, (hp, dam, p) , . :
0.595 <= p(, ) <= 0.605
0.595 <= p(, ) <= 0.605
0.595 <= p(, ) <= 0.605
: 60, β 200 ( , , )
: 8, β 15
0.01, β 10, β 1.
(k1, p1), (k2, p2) , 0.595 <= p(x, y) <= 0.605 (p(x, y) β x y . 2)
(k1, k2, k3, k4, k5, k6, p1, p2, p3) , 1.1
, , .
s β 0 1,
(hp1, dam1, p1), (hp2, dam2, p2), (hp3, dam3, p3) β .
4 . .. () . () . s , , s= 1.3 β 30% .
, . , , . , ..
, ,
, , , . . ,
, , . , , ;)