誰にもズルができないサイコロ ── ハッタリ飛び石の「封」Dice nobody can cheat: the “seal” in Bluff Stones

/ WAITROOM 運営事務局WAITROOM Operations Office

ハッタリ飛び石は、自分だけが見たサイコロの目を宣言し、ほかの人がそのウソを見抜くゲームです。それぞれの端末で遊ぶとき、目を誰が決めればズルができないのか。その答えとして使っている「封」の仕組みを説明します。In Bluff Stones you call out a die roll only you saw, and everyone else tries to spot the lie. When everyone plays on their own device, who should decide the roll so that nobody can cheat? Here is the “seal” we use.

01

誰がサイコロを振るのか

1台の端末を回して遊ぶときは簡単です。振った人だけが画面を見て、ほかの人は目をそらせば済みます。難しいのは、部屋コードでそれぞれの端末から遊ぶときです。目は振った人の端末にだけ表示し、しかも誰も好きな目を選べないようにしなければなりません。

素直に考えると、決め方は3通りあります。どれにも穴があります。

02

素直な決め方には、どれも穴がある

手番の人の端末で目を決める方法では、端末の中のプログラムを書き換えれば好きな目を出せてしまいます。ウソをつかずに済む目を毎回出せるなら、このゲームは成り立ちません。

部屋を作った人(ホスト)の端末で決めて配る方法では、ホストには全員の目が見えてしまいます。ホストだけがいつもウソを見抜けることになります。

全員が同じ「種」から目を計算する方法は、ほかのゲームでは公平さの土台になっています。しかしこのゲームでは、全員が同じ目を計算できてしまうので、隠す意味がなくなります。

03

答え:封をしてから、みんなで混ぜる

WAITROOM では、次の手順で目を決めています。まず、手番の人の端末が秘密の値を1つ作ります。その値そのものは送らず、値から計算した「指紋」(ハッシュ)だけを先に全員へ送ります。これを「封」と呼んでいます。指紋から元の値を割り出すことはできませんが、あとで値を見せれば、指紋と合うかどうかは誰でも確かめられます。

封が届いたら、ほかの人の端末がそれぞれ乱数を1つずつ出します。サイコロの目は、「手番の人の秘密」と「みんなの乱数」をまとめて計算した指紋から決まります。

04

なぜズルができないのか

手番の人は、封を出したあとで秘密を変えられません。変えれば、あとで開けたときに封と合わなくなるからです。しかも、みんなの乱数は封より後に出てくるので、どんな目になるかを前もって選ぶことはできません。

ほかの人は、自分の乱数は知っていても手番の人の秘密を知らないので、目を計算できません。ホストも同じです。目が分かるのは、秘密とみんなの乱数の両方を持っている手番の人の端末だけです。

現実にたとえるなら、目を書いた紙を封筒に入れて先に机に置き、そのあとでみんながくじを引き足すようなものです。封筒を置いた人は中身をすり替えられず、ほかの人には封筒の中が見えません。

05

「ウソだ」と言われたら封を開ける

ほかの人が「ウソだ」と言ったら、手番の人の端末が秘密を開けます。全員の端末がそれぞれ、秘密が封と合っているか、そこから計算した目が表示されていた目と同じかを確かめます。

疑われたのに秘密を開けなかった場合は、ウソをついたものとして扱います。黙っていたほうが得になってしまうと、この仕組みは意味をなさないからです。

06

目指していること

手番の人も、ほかの人も、部屋を作ったホストも、ほかの人より有利にならないこと。部屋コードで遊ぶゲームは、どれもそれを目標に作っています。ハッタリ飛び石では、ウソを見抜く楽しさを損なわないために、この「封」の仕組みが欠かせませんでした。

01

Who rolls the die?

With one device passed around, it is easy: only the roller looks, and everyone else looks away. The hard case is a room-code match on separate devices. The roll must appear only on the roller’s device, and nobody may be able to choose it.

There are 3 obvious ways to decide it. All of them have a hole.

02

Every obvious way has a hole

If the roller’s device decides, someone who modifies the code on their device can roll whatever they like. If you can always roll a number you never need to lie about, the game falls apart.

If the room creator’s (host’s) device decides and hands it out, the host sees everyone’s rolls and can always spot the lie.

If everyone computes the roll from the same seed, which is the basis of fairness in our other games, then everyone can compute the same roll and there is nothing hidden.

03

The answer: seal first, then everyone mixes in

WAITROOM decides the roll like this. First, the roller’s device creates a secret value. It does not send the value; it sends only a “fingerprint” computed from it (a hash). We call this the seal. You cannot work the value out from the fingerprint, but once the value is shown, anyone can check that it matches.

After the seal arrives, each other player’s device contributes a random number. The roll is decided by the fingerprint of the roller’s secret combined with everyone’s random numbers.

04

Why nobody can cheat

The roller cannot change the secret after sending the seal; if they did, it would not match when opened. And everyone else’s random numbers arrive after the seal, so the roller cannot pick the outcome in advance.

The other players know their own random numbers but not the roller’s secret, so they cannot compute the roll. Neither can the host. Only the roller’s device, which has both the secret and everyone’s numbers, knows it.

In real-world terms: write the roll on paper, seal it in an envelope and put it on the table first, then everyone adds a lottery draw. Whoever placed the envelope cannot swap its contents, and nobody else can see inside.

05

When someone says “Liar!”, the seal is opened

When another player calls “Liar!”, the roller’s device reveals the secret. Every device checks for itself that the secret matches the seal and that the roll computed from it matches the roll shown.

If the roller is challenged and does not reveal the secret, it counts as a lie. If staying silent paid off, the whole scheme would be pointless.

06

What we aim for

Neither the roller, nor the other players, nor the host who created the room should have an edge over anyone else. That is the goal of every room-code game. In Bluff Stones, the seal was essential to keep the fun of spotting a lie intact.

GAMES

この記事に出てくるゲームGames in this note

MORE

ほかの開発ノートMore dev notes