The Taste of Victory: Games Algorithm of the DICEGAME Platform Explained in a Few Bullet PointsAs there is no RNG, the question is following: How the winner is determined?
There is no one to decide, whether someone will benefit and someone will lose. The platform is only the organizer of the game, but not the opponent.
The answer is simple: everything is decided by the players by themselves, or rather their physical values directly come into the game.
How would this happen?Let us tell you.
Uniquely designed algorithm, which determines dice values (a.k.a. Algorithm of the winner determination) is recorded in a smart contract and bases on two main principles:
To completely eliminate the interest in cheating
To simplify verification of the results, and most importantly, its understanding.
The mechanics of the game are the following:
We take 2 physical parameters from each player. These verifiable parameters together influence the final result of the throw of both opponents.
To make it clear:
Parameter №1: T1, T2 — the number of milliseconds at the time of the call to the smart contract. Simply put, the most accurate time for a roll of the dice.
Parameter №2: P1, P2-value of the phone’s accelerometer.
Accelerometer is an instrument that measures the acceleration of objects during any movement.
In case of the DICEGAME platform, accelerometer applies to the shake movement you make to roll the dice.
In accordance, parameters T1, P1 are applicable to the player №1, and the parameters T2, P2 — to the player №2.
The combination of these parameters gives us only 4 possible variations of the dice values.
Dice №1: T1 P1 T2
Dice №2: T1 P1 P2
Dice №3: T1 T2 P2
Dice №4: P1 T2 P2This indicates that the outcome of the game depends on both players.
So, we eliminate the interest in cheating: to predict the results, players have to conspire, but it makes no sense, because they play against each other.
Verification of the algorithm is as simple as possible for verification: we take the sum of three parameters, divide them by 6, and add 1 to the indivisible excess (so that the values fall within the range from 1 to 6).
T1=101 T2=303
P1=202 P2=404
Dice №1:1. Sum of three parameters: 101 + 202 + 303 = 606
2. The sum is divided by 6: 606: 6 = 101
3. There is no indivisible excess, so it is equal to 0
4. Add 1 to the indivisible excess: 0 + 1 = 1 — this is the value of the first dice
Dice №2:1. Sum of three parameters: 101 + 202 + 404 = 707
2. The sum is divided by 6, and because 707 may not be divided by 6, we present this value as a sum: (702 + 5): 6 = 702: 6 + 5: 6. 702 is divided by 6; and 5, of course, is not
3. Indivisible excess — 5
4. Add 1 to the indivisible excess: 5 + 1 = 6 is the value of the second dice
Dice №3:1. Sum of three parameters: 101 + 303 + 404 = 808
2. The sum divided by 6, because 808 may not be divided by 6, we present this value as a sum: (804 + 4): 6 = 804: 6 + 4: 6. 804 may be divided by 6; and 4, of course, not
3. Indivisible excess — 4
4. Add 1 to the indivisible excess: 4 + 1 = 5 is the value of the third dice
Dice №4:1. Sum of three parameters: 202 + 303 + 404 = 909
2. The sum divided by 6, because 909 may not be divided by 6, then we present this value as a sum: (903 + 3): 6 = 903: 6 + 3: 6. 903 may be divided by 6; and 3, of course, not
3. Indivisible excess — 3
4. Add 1 to the indivisible excess: 3 + 1 = 4-this is the value of the fourth dice
If you noticed, the values of the first two dice are more affected by player # 1, so they will belong to him, and the 3d and the 4th belong to the second player for the same reason.
In this example the victory of the player number 2 is clearly in evidence: his 9 points against the 7 points of the player number 1.
The actual implementation is a bit more complex: the values of the parameters will be hashed. But in general, we see that the algorithm for determining the winner is simple in its nature and understandable to everyone who is friends with mathematics.
I do not understand all of these but it was interesting that they would have some background how the game is fair to everyone, I like the dice game because the game it self is fair and square and actually this is not a AI or program competitors it was a real person so the chance of winning is high and you need some strategy to perform of this game. Hoping to see soon your beta of this dice game.