Win a Game of Bingo

by Alex Irpan and Justin Yokota

Answer:
DOCTOR STRANGE

It's time to play Bingo!

As displayed on the puzzle page, a random Bingo game is generated based on a given seed, and your goal is to win. We have a grid of 5x5 numbers. The opponent has a grid of 5x5 numbers. Last, there is a numbers called grid, showing the numbers that will be called in the game. The game stops the first time we or the opponent have a horizontal, vertical, or diagonal line of five numbers. Theoretically, the puzzle can be solved by playing until we get lucky. Practically, this is exceptionally unlikely and we'll need to be smarter.

We can enter an arbitrary seed into the input box, as long as it's 1 to 9 unique letters. We're looking for the seed that lets us rig the Bingo game in our favor. By taking a fixed seed and tweaking one letter at a time, we first find that only some letters affect each grid. The 1st, 4th, 7th letters affect our numbers, the 2nd, 5th, 8th letters affect the opponent's numbers, and the 3rd, 5th, 9th letters affect the numbers called. We can view each letter like a function that transforms the grid. If the seed is shorter than 9 letters, the corresponding functions are skipped. We start with the opponent's numbers first, since they're easiest to understand.

Opponent's Numbers:

The opponent's grid has the same numbers as the numbers called grid, in the same order, except with some out of place negatives -1, -2, etc.

The way this grid works is that each letter maps to a position 0 to 24 in the grid. Let that position be x. Then:

  • 2nd letter places a negative number at x
  • 5th letter places a negative number at x and x+1, rolling over if at the end
  • 8th letter places a negative number at x and x+3, again rolling over if needed.

The remaining spots are filled with the numbers called grid, left-to-right then top-down.

The values of x can be found by entering various 2-letter seeds and checking what gets covered. The mapping between letters and positions is:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
1704160620131411923153722124291110522118

Our Numbers + Numbers Called

Our numbers and the numbers called work identically. Each letter is a function that is applied to the existing grid of numbers. For our grid, the function for the 1st letter is applied, then 4th, then 7th. For the numbers called grid, it's 3rd, 6th, then 9th. Once we understand this is how it works, we can first try a seed shorter than 3 letters to get the original numbers called grid, then try varying 3-letter seeds to observe each function in isolation.

Most functions shuffle the numbers around, then adjust all numbers in the grid by some amount. The full list of functions is below. Not all functions need to be derived to solve the puzzle.

LetterOperationThen add:
AShift row 1 left by 1-3
BShift column 3 up by 2-1
CShift rows by 0/1/2/1/0 right-2
DShift 1st row left by 1, last row right by 10
EShift columns down by 0/1/2/3/4-4
FSwap rows 2 and 4-1
GSwap columns 1 and 5-2
HShift columns up by 0/1/2/3/4-3
IShift 1st row right by 1, last row left by 1-4
JSwap corners diagonally-1
KShift row 4 right by 1-3
LRotate 180 degrees (same as reversing)-3
MSubtract 4 from last row0
NSwap 3rd and 5th column0
OKeep numbers in place-3
PShift first 2 columns down by 2-2
QShift column 3 down by 2-3
RShift last 2 columns up by 2-1
SMove 1 forward along a spiral, starting top-left and going clockwise, with center looping to top left1
TReflect across top-left bot-right diagonal-1
UReflect vertically across y-axis-2
VShift rows left 0/1/2/1/00
WConsider the 3x3 center. Swap corners of that center diagonally-2
XReflect across top-right bot-left diagonal-1
YReflect horizontally across x-axis-2
ZShift row 2 right by 1-1

These functions all ensure that if our original grid is 25 unique numbers, then the new grid is 25 unique numbers. The exception is the letter M. If any grid ends with a duplicate number, the game is declared invalid, but the output grids are still displayed.

Deriving Initial State

After determining enough functions, we should be able to regenerate the original configuration. The initial numbers called grid can be found with any seed shorter than 3 letters, and the initial version of our grid can be found by trying a known 1-letter seed and applying the function in reverse. The largest numbers in our grid and the smallest numbers in the numbers called grid are highlighted, for reasons that will be clear later.

Our grid:

81541011
53733023
25332134
129261348
214051527
81541011
53733023
25332134
129261348
214051527

Numbers called:

7788826181
8071965397
6770669190
7647947469
9246737968
7788826181
8071965397
6770669190
7647947469
9246737968

Rigging the Bingo

The smallest number in the numbers called grid is 46. The 5th largest number in our grid is 33. For a bingo to even be possible, we must bring at least the 46 to the 33, covering a distance of 13. Covering any less distance would leave at most 4 common numbers between the two grids.

Functions range from offsetting by +1 to -4, with only one +1 function, so the bingo is only possible if we apply three -4 functions to numbers called and one +1 function to our numbers. This forces the seed to be length 9. It also means the winning numbers should start as exactly 13 larger than the 5 largest numbers in our grid. These are the numbers highlighted above in the numbers called grid.

Consider the numbers called grid first. There are only 2 functions that subtract 4 from all squares, E and I. The M function subtracts 4, but only from the last row of numbers. All 5 target numbers (highlighted above) must get -4 applied three times, so we must apply functions E and I in some order to get all 5 to the last row for M. The correct application order is I, E, M.

Seed so far: ??I??E??M

After I:

7773847857
7667924993
6366628786
7243907065
4269756488
7773847857
7667924993
6366628786
7243907065
4269756488

After I + E:

7365868389
7269716682
5963806061
6862887484
3839584553
7365868389
7269716682
5963806061
6862887484
3839584553

After I + E + M:

7365868389
7269716682
5963806061
6862887484
3435544149
7365868389
7269716682
5963806061
6862887484
3435544149

We need to stop the opponent from winning. Since our 5 winning numbers are the last 5 numbers called, all 25 numbers will be called in the game. This means all opponent squares will be filled before our bingo, except for the negatives. We need to place 5 negatives in the grid such that filling all 20 other squares does not result in a bingo.

For this to occur, there must be exactly one negative number in each row and column. Let x, y, z be the positions of the 3 letters used. Negatives are placed at x, y, y+1, z, z+3. Since we cannot have y and y+1 in the same row, y must be 4 mod 5 (in the last column).

y5y1
y1y2
y2y3
y3y4
y4y5
y5y1
y1y2
y2y3
y3y4
y4y5

Any choice of y will cover the 1st and 5th columns. The z and z+3 locations must also be in different rows, but also cannot be in either the 1st or 5th column. This forces z to be 3 mod 5, in the 4th column.

y5z5z1y1
y1z1z2y2
y2z2z3y3
y3z3z4y4
y4z4z5y5
y5z5z1y1
y1z1z2y2
y2z2z3y3
y3z3z4y4
y4z4z5y5

This leaves placing x in the middle column.

y5z5x1z1y1
y1z1x2z2y2
y2z2x3z3y3
y3z3x4z4y4
y4z4x5z5y5
y5z5x1z1y1
y1z1x2z2y2
y2z2x3z3y3
y3z3x4z4y4
y4z4x5z5y5

By doing some casework (place y, then z, then x), we find there are 4 solutions that block all rows, columns, and diagonals:

  • x=12, y=4, z=18
  • x=12, y=19, z=2
  • x=17, y=24, z=8
  • x=7, y=24, z=13

Looking at our letter to position map:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
1704160620131411923153722124291110522118

There is no 12 and there is no 8. The only solution left is x=7, y=24, z=13, giving letters ORH.

Seed so far: ?OI?RE?HM

For our grid, there is only 1 function that adds 1, letter S (which applies a spiral). There are then 3 other functions that add 0, from D,N,V. We want to combine S with two of these letters (in some order) such that the 5 smallest numbers all end up on one Bingo line. By playing around with the functions in varying orders, we find the answer is to apply N, then S, then V.

Final seed: NOISREVHM

After N:

81511104
53723303
25333412
129481326
214027165
81511104
53723303
25333412
129481326
214027165

After N + S:

359161211
26548245
131034314
22491423
412817627
359161211
26548245
131034314
22491423
412817627

After N + S + V:

359161211
54824526
343141310
49142322
412817627
359161211
54824526
343141310
49142322
412817627

Entering seed NOISREVHM into the site gives

WIN! You consider the importance of looking back on how you got here.

"Looking back" is a hint to reverse the seed, giving MH VERSION.

This is a pointer to Mystery Hunt Bingo, which supports taking a seed as input. Using seed NOISREVHM on Mystery Hunt Bingo gives the following grid.

Puzzle where teams must create a music video.Puzzle about Magic: the Gathering.Puzzle about a webcomic.Puzzle about Taylor Swift.Puzzle is a Konundrum.
Puzzle whose crucial step is realizing it matches an MIT landmark.Puzzle uses grad-level math or higher.Something given at the start of Hunt is a puzzle.No errata is issued during Hunt.Puzzle where anagramming is part of the intended solution.
Puzzle references previous Mystery Hunts.Puzzle requires playing out a board game.FREE SQUARE: "This is not a puzzle."Puzzle uses a video game released in the past 2 years.Puzzle uses element symbols.
Multiple teams are on the final runaround simultaneously.A puzzle is part of at least two metapuzzles.Hunt is won on Monday (Eastern time zone).First meta is solved in the first 2 hours.Puzzle involves playing a video game.
Puzzle which has the phrase HERRING or RED HERRINGFirst puzzle is solved in the first 10 minutes,Puzzle uses a TV show that stopped airing before 1990.Puzzle uses an anime that started airing in the past 2 years.Hunt is won before Sunday (Eastern time zone).

Index into each square with the numbers from our bingo grid to get the letters

DOCTO
RSTRA
NGEIS
YOURA
NSWER
DOCTO
RSTRA
NGEIS
YOURA
NSWER

The answer is DOCTOR STRANGE.

Authors' Notes

Doctor Strange considers all 1200316978276 future bingo games before seeing the one that wins.