Project Euler Lab - Problem 982

#982 - The Third Dice

● ResearchOfficial difficulty: 90%Two-player gamesTier C - reduced scale in browser; full scale in notebookNot viewed
↖ Euler Lab

Alice and Bob play the following game with two six-sided dice (numbered \(1\) to \(6\)):

  1. Alice rolls both dice; she can see the rolled values but Bob cannot
  2. Alice chooses one of the dice and reveals it to Bob
  3. Bob chooses one of the dice: either the one he can see, or the one he cannot
  4. Alice pays Bob the value shown on Bob's chosen dice

Each player devises a (possibly non-deterministic) strategy. An example strategy for each player could be:

  • Alice chooses to reveal the dice with value closest to \(3.5\), or if both are equidistant she chooses randomly with equal probability
  • Bob chooses the revealed dice if its value is at least \(4\); otherwise he chooses the hidden dice

In fact, these two strategies together form a Nash equilibrium. That is, given that Bob is using his strategy, Alice's strategy minimises the expected payment; and given that Alice is using her strategy, Bob's strategy maximises the expected payment.

With these strategies the expected payment from Alice to Bob is \(\frac{145}{36}\approx 4.027778\).

To make the game more interesting, they introduce a third (six-sided) dice:

  1. Alice rolls three dice; she can see the rolled values but Bob cannot
  2. Alice chooses two of the dice and reveals both to Bob
  3. Bob chooses one of the three dice: either one of the two visible dice, or the one hidden dice
  4. Alice pays Bob the value shown on Bob's chosen dice

Supposing they settle on a pair of strategies that form a Nash equilibrium, find the expected payment from Alice to Bob, and give your answer rounded to six digits after the decimal point.

This problem is taken from Project Euler, Problem 982.
Problem text © Project Euler, licensed under CC BY-NC-SA 4.0. Original: projecteuler.net/problem=982. Published Saturday, 31st January 2026, 01:00 pm. Solved by 144 members at time of mirroring.

Why this is useful

Probability Statistics. Expectation and state-based probability reasoning underpin pricing, risk, and statistical inference (Phases 7, 11, 13).

We classify relevance honestly - not every Euler problem is a trading application.

Learning mode

Pick how much scaffolding you want. Your choice is remembered per problem.

Scratchpad

Mathematical notes, formulas, pseudocode, hypotheses, complexity notes. Saved automatically with your progress.

Python workbench

Tier C - reduced scale in browser; full scale in notebook
Browser runs a reduced, clearly-labelled educational scale; the original scale is provided in a local notebook.

Real Python (Pyodide) in a sandboxed Web Worker - no network, no filesystem, no DOM access. Ctrl/Cmd+Enter runs. Escape leaves the editor. Stop terminates the worker.

Python runtime not loaded (it boots on first run - a one-time local load).

Check your answer

Answers are checked against a salted hash held in a separate file - not printed in this page. This prevents accidental spoilers; it is not cryptographic protection (see the build notes).

Progressive hints

Confidence

Low confidence schedules this problem for spaced review, even if you solved it.

Reference solution

Spoiler
The complete original explanation (interpretation, naive approach, insight, proof, complexity, Python implementation, tests, common mistakes, alternatives) is hidden and lazy-loaded. Reveal it only after a meaningful attempt - the struggle is where the learning happens.