Dice: Golden Ticketにおけるプロバブリーフェアの仕組み
CloudbetでのDice: Golden Ticketの遊び方と、各出目・各Golden Ticket抽選がプロバブリーフェアであることを確認する方法をご紹介します。
Dice: Golden Ticketの遊び方
Dice: Golden Ticket(DGT)は、Cloudbetの定番Diceと同じように遊べますが、1つの追加要素があります。それは、通常の勝利に加えてボーナス倍率を支払う可能性のある、隠された目標値です。
ベースゲーム: Roll Over(2.00~99.99)またはRoll Under(0.01~98.00)を選び、ベットします。ダイスが選んだ側の目標値に対して当たれば、その目標値が示す配当で勝利します(目標値が狭いほど倍率は大きくなります)。
Golden Ticketボーナス: 各ラウンドでは、もう1つの隠された値——Golden Ticket——も盤面上に設定され、3倍から200倍の間で独自のボーナス倍率を持ちます。ダイスの出目がGolden Ticketの位置から±1.75の範囲内に収まった場合、追加のベットなしに、その倍率でボーナス配当が即座に自動的に付与され、通常の勝利と合算されます。
Golden Ticket自体を直接狙うことはできません——ターゲットにしたり影響を与えたりすることはできず、各ラウンドで盤面のどこかに必ず存在するだけであり、その付近に着地することは通常のプレイに対するボーナスとなります。
Cloudbet Originals Dice: Golden Ticket
CloudbetオリジナルのDGTは、99%のRTP、最大x6,730のダイス倍率、そして最大$1,000,000の勝利額を備えています。
Dice: Golden Ticket(DGT)は、すべてのCloudbet Originalsと同じプロバブリーフェアの基盤を使用しています——一般的な仕組み(サーバーシード、クライアントシード、ノンス、SHAKE256、リジェクションサンプリング)については、プロバブリーフェアの仕組みをご覧ください。ダイス値のサンプリング方法も通常のDiceと同じ仕組みで、DGTはそこにGolden Ticketの値と倍率を追加しています。以下では、その乱数列が具体的にどのようにDGTの結果になるのかを説明します。
乱数からゲーム結果への変換
DGTでは、ダイスの値とGolden Ticketの値という2つの値が検証可能なランダム性によって決定されることを証明する必要があります。
手順はシンプルです。まず、0から10000(両端を含む)の整数を1つサンプリングし、これが最終的なダイスの値になります。次に、175から9825(両端を含む)の整数をもう1つサンプリングし、これが最終的なGolden Ticketの値になります。両方の値を100で割ることで、それぞれ小数点以下2桁を持つ値になります——ダイスは0から100、Golden Ticketは1.75から98.25の範囲です。
Golden Ticketの範囲があえて0~100ではなく1.75~98.25に制限されているのは、Golden Ticketがどこに着地しても、その周囲に常に3.5幅の「ゴールデンゾーン」が確保され、ダイスの値がそこに着地すればボーナスを獲得できるようにするためです。もし範囲が端(0または100)まで及んでいた場合、端付近に着地したGolden Ticketはゴールデンゾーンが狭くなり、中央に着地した場合よりも不利な確率になってしまいます。
DGTにはもう1つ独自の特徴があります。Golden Ticketの倍率自体も、プロバブリーフェアなプロセスによって生成されるという点です。簡単に言うと、0から1の間の3つ目の乱数が引かれ、それが切断パレート分布を使って3倍から200倍の間の倍率に変換されます。

技術的な詳細
SHAKE256によって生成されたランダムなバイト列は、0から2³²-1の範囲の4バイト符号なし整数に分割されます。ダイスの値には10001通りの結果があり得るため(0~10000、両端を含む)、リジェクションサンプリングではP = 10001を使用します。Golden Ticketの値には9651通りの結果があり得るため(175~9825、両端を含む)、そのP = 9651です。(この手順が重要な理由についてはプロバブリーフェアのページをご覧ください。)
ダイスとGolden Ticketの値の選択: ダイスの乱数を10001で割った余りを取り、その値とします。Golden Ticketの乱数についても同様に9651で割った余りを取った後、175を加えます(これにより175~9825の範囲になります)。どちらも最後に100で割ります。
Golden Ticketの倍率の選択(統計の知識があると理解しやすくなります):32ビットの乱数を1つ引き、それを取り得る最大値で割ることで、0から1の間で一様に分布する数値を得ます。その値は切断パレート分布(下限3、上限200、アルファ値1.343——これはDGTの99%というRTP目標を維持するため、倍率の期待値が9になるよう選ばれています)に変換され、小数点以下2桁に丸められます。
ゲームプレイ
ダイスとGolden Ticketの両方の値は、サーバー側で生成され、ラウンドが終了するまで非公開のまま保持されます——プレイが開始された後は、気づかれずに変更することはできません。ベットを確定すると、選択した目標値がダイスの値と比較され、さらにGolden Ticketとダイスの値との距離が1.75の「ゴールデンゾーン」の範囲内かどうかが判定され、ボーナスの当落が決まります。
独自検証のためのコード
CloudbetにおけるDGTの実装に忠実なコードです——サーバーシード、クライアントシード、ノンスを入力すれば、ご自身のゲームを検証できます。(Cloudbetでゲームのサーバーシードを公開するには、すでに新しいサーバーシードに移行している必要があります。)
依存関係:
npm install js-sha3
コード:
// If you are running this yourself, then you can input your own data here
// You can then compare:
// 1) Cloudbet's provided Commitment to the Commitment outputted here. This proves that the Server Seed was not altered during gameplay.
// 2) Cloudbet's provided game outcome to the game outcome outputted here. This proves that your game's outcome was determined solely by the pre-game seeds and was not altered afterwards.
let myServerSeed = 'your_server_seed'; // ✍️YOUR_INPUT✍️: Enter your (unhashed) Server Seed here
let myClientSeed = 'your_client_seed'; // ✍️YOUR_INPUT✍️: Enter your Client Seed here
let myNonce = 1; // ✍️YOUR_INPUT✍️: Enter your Nonce here
const usingCustomData = false; // Change this to true if you are using your own data
// Load libraries
const crypto = require('crypto');
const { sha3_256, shake256 } = require('js-sha3');
// Step 1: Generate a Server Seed and Commitment
// And generate a Client Seed - either by player input or by the player's browser
function generateServerSeed() {
let seed = crypto.randomBytes(32).toString('hex');
if (usingCustomData) { seed = myServerSeed; }
const commitment = sha3_256(seed);
return { 'serverSeed': seed, 'commitment': commitment };
}
function getClientSeed() {
let seed = crypto.randomBytes(32).toString('hex');
if (usingCustomData) { seed = myClientSeed; }
return seed;
}
// Step 2: Create a Round Signature with SHA3 using a Server Seed, Client Seed and Nonce
function createRoundSignature(serverSeed, clientSeed, nonce) {
return sha3_256(`${serverSeed}:${clientSeed}:${nonce}`);
}
// Step 3: Create a SHAKE256 stream generator from a Round Signature.
// To simplify this example program, this function doesn't create a stream, but instead a sequence of custom length.
function* createRandomNumberSequence(numbersToGenerate, roundSignature) {
const numOfBytes = 4 * numbersToGenerate; // 4 bytes (32 bits) per random number we generate
const byteStream = shake256.create(8 * numOfBytes); // shake takes bits as input
byteStream.update(roundSignature); // Use the Round Signature to seed the generator
const buf = Buffer.from(byteStream.digest()); // The Buffer class lets us package every 4 bytes into one 32-bit integer
for (let i = 0; i < numbersToGenerate; i++) {
yield buf.readUInt32BE(i * 4); // Read buf in 4-byte steps
}
throw new Error("No more numbers in the random number sequence! Fix: make 'numbersToGenerate' larger.");
}
// Step 4: Draw from the random number sequence to calculate the game result
function getGameResult(rng) {
// Dice
// Ranges from 0 to 100, with two decimal places
const diceMinValue = 0;
const diceMaxValue = 10000;
let diceValue = sampleFromRange(diceMinValue, diceMaxValue, rng);
diceValue = diceValue / 100; // Now the value ranges from 0 to 100
// Golden Ticket
// Ranges from 1.75 to 98.25 due to fairness
// (If it landed on 99, for example, then the chance of the dice landing near
// it would be smaller than the guarantee of 3.5%)
const gtMinValue = 175;
const gtMaxValue = 9825;
let goldenTicketValue = sampleFromRange(gtMinValue, gtMaxValue, rng);
goldenTicketValue = goldenTicketValue / 100;
// Golden Ticket Multiplier
const multiplier = getRandomNumberTruncatedPareto(rng); // Complicated maths, can be ignored ;)
return { diceValue, goldenTicketValue, multiplier };
}
// Sample a number using the truncated Pareto distribution
function getRandomNumberTruncatedPareto(rng) {
// Get a uniformly distributed number between 0 and 1
let randomInt32 = rng.next().value;
const fraction = randomInt32 / 0xFFFFFFFF;
// Truncated Pareto distribution. The expected value is 9.00
const m0 = 3;
const m1 = 200;
const alpha = 1.343;
const r = Math.pow(m0 / m1, alpha);
const inner = 1 - fraction * (1 - r);
let randomNumber = m0 / Math.pow(inner, 1 / alpha);
randomNumber = Math.round(randomNumber * 100) / 100; // Round to 2 decimal places
return randomNumber;
}
// Sample a number between 'min' to 'max' (inclusive) using Rejection Sampling
function sampleFromRange(min, max, rng) {
const P = max - min + 1;
const maxAcceptable = Math.floor(0x100000000 / P) * P;
// Rejection sampling
let rand;
do {
rand = rng.next().value;
} while (rand >= maxAcceptable);
// Modulo operation
const sampled_number = rand % P;
return sampled_number + min;
}
// Example usage
(function main() {
let nonce = 1;
if (usingCustomData) { nonce = myNonce; }
const { serverSeed, commitment } = generateServerSeed();
const clientSeed = getClientSeed();
const roundSignature = createRoundSignature(serverSeed, clientSeed, nonce);
const numbersToGenerate = 3 * 2; // We need 3 random numbers, however due to rejection sampling we may need more
const rng = createRandomNumberSequence(numbersToGenerate, roundSignature);
const { diceValue, goldenTicketValue, multiplier } = getGameResult(rng);
console.log('📝 Commitment (shown before the game):', commitment);
console.log('🔒 Server Seed (revealed after the game):', serverSeed);
console.log('🎲 Client Seed:', clientSeed);
console.log('🔢 Nonce:', nonce);
console.log('🔁 Round Signature (can be verified after the game):', roundSignature);
console.log('🎯 Dice landed on:', diceValue);
console.log('🎫 Golden ticket landed on:', goldenTicketValue);
console.log('⭐ Multiplier:', multiplier);
})();
