Draft:Brainfuck Minesweeper
Brainfuck Minesweeper is a programming game by User:KaleidoscopeFive in 2026. As the name suggests, it is Minesweeper played by brainfuck programs.
Overview
Brainfuck Minesweeper can either be played solo or tournament-style.
Each program gets their own minefield of a specified size which is the same for all players and a tape of 30,000 unsigned 8-bit cells that wraps at the edges. Because of this, the maximum size for a minefield is 256x256. The grid may not be square.
On initialization, all players receive copies of the same minefield. The first two cells of each tape contains the X and Y coordinates of the mine cell with zero neighbors, the third and fourth cells contain the width and height of the minefield, and the fifth cell contains the number of mines.
When there are two or more players, they are run in round-robin fashion in the order they were loaded.
The round continues until either all players have halted or 10,000,000 iterations have passed with at least one player still standing.
| Command | Description |
|---|---|
+
|
Same as in brainfuck. They wrap around. |
-
| |
<
| |
>
| |
[
|
If the current tape cell is zero, the instruction pointer jumps to the matching ].
|
]
|
If the current tape cell is nonzero, the instruction pointer jumps to the matching [.
|
,
|
Let X be the current tape cell and Y be the tape cell to the right of that and sets the current tape cell to the number of mine neighbors of the minefield cell (X, Y) if the cell is open, or 255 if it is closed. A point that is out of bounds will wrap around. |
.
|
Let X be the current tape cell and Y be the tape cell to the right of that and opens the cell on the minefield (X, Y). Opening a cell with no mine neighbors cascade-opens all of its neighbors. A point that is out of bounds will wrap around. |
Scoring
Work-in-progress, not implemented yet. Probably help wanted too?
Programs are scored based on the number of tiles they opened, how long they run for, and whether they halted naturally or kept running until the limit, or got killed by a mine.
Example strategies
Runner
This strategy just runs for it. This strategy is absolutely horrible, but it exists to give you an idea of what playing this game would look like.
<+ Initialize forever loop
[>
. Open starting tile
[ Open row
+. Move to next tile and open it
]
>+< Next row
<]
Minimized:
<+[>.[+.]<]