Skip to content
🃏 Classic1967Milton BradleyEASY

Battleship rebuild deck

EASY

Nothing here is hard — two grids, a placement phase, and hit-or-miss — so the whole game rests on the opponent, and a bot that fires at random is unplayable while a bot that hunts properly is thirty lines of probability.

You will get essentially the whole thing.

This is the one to build tonight. The board is an hour and the AI is the lesson: a random-fire bot needs about 96 shots, adjacent-hunting gets to roughly 65, and the probability map lands near 42. Watching that number fall as you improve the targeting is a better introduction to search heuristics than most tutorials, and you can see the whole thing on screen.

Difficulty
EASY · 1 of 5
First playable
An evening
The original
1 team-years
Released
1967 · Classic
Genre
Strategy
The one-shot build prompt
Build Battleship as a single self-contained HTML file with a competent AI opponent. Canvas 2D or DOM, no build step, no dependencies.

Requirements:
- Two 10x10 grids side by side. Standard fleet: carrier 5, battleship 4, cruiser 3, submarine 3, destroyer 2.
- Placement phase: drag ships onto your grid, R rotates, invalid placements refuse to drop. A 'random' button, because most people will use it every time.
- The AI is the whole game, so build it in two modes. HUNT: it maintains a probability density map — for every empty cell, count how many ways each remaining ship could still be placed over it — and fires at the maximum. TARGET: after a hit, it works the four neighbours, and once it has two hits in a line it fires along that line only.
- Show the AI's density map behind its grid on a debug toggle. It is the most interesting thing you will build and it should be visible.
- Shot feedback: hit, miss, and 'you sank my destroyer' naming the ship. A shot log for both sides.
- Track shots-to-win each game and keep a running average against the AI, persisted in localStorage.

Definition of done: the AI finishes a game in around 42 shots against random placement. If it is taking 60 the density map is wrong, and if it is taking 30 you are letting it cheat.
What you lose
  • The bluffing, because there is none — the original has no hidden information you can act on beyond where you guessed already
  • Online play against a stranger, which needs a server and a way to stop them reading your board
  • The physical satisfaction of the pegs, which is most of what people actually remember
  • Any real depth past the first hour, unless you add salvo fire or a bigger fleet
What to steal

Show the opponent's reasoning as a heatmap you can turn on

Bots are usually a black box that either humiliates you or throws the game, and either way you learn nothing about why. Render what the AI thinks the board looks like, and a loss stops feeling arbitrary — you watched it narrow down, you saw the moment it found the line, and losing to it reads as being outplayed instead of being cheated.

ScopeAn evening— build just this, not the game

Build an AI-reasoning overlay for any grid-guessing game as a single self-contained HTML file. Canvas 2D, no dependencies.

- Any hidden-information grid game will do — mines, ships, a hidden path.
- Every turn the AI produces a full probability distribution over unrevealed cells, not just its chosen move.
- Render that distribution as a heatmap directly on the board, updating each turn with a 200ms ease so the shift in belief is legible as motion.
- One key toggles the overlay. Off by default, so playing normally still feels like a game.
- Show the top three candidate moves with their scores, and mark which one it took.

Definition of done: with the overlay on I can predict the AI's next move before it makes it, and with it off I still enjoy playing.
Make it different

Not a clone — Battleship re-themed and cut down to something you can finish. The angle is the important reel: it is what turns a project into a weekend. 24,360 ways to land.

Fealty One Room

Battleship, but one level, done properly, set in a medieval kingdom at war. Rendered in CRT arcade with scanlines.

Themea medieval kingdom at war
Angleone level, done properly
LookCRT arcade with scanlines
Build a browser game called "Fealty One Room".

The pitch in one line: a strategy in the spirit of Battleship, but one level, done properly, set in a medieval kingdom at war.

WHAT THIS IS
Take the SHAPE of Battleship — its core loop, and whatever makes that loop good — and rebuild it as your own game in a different world at a smaller scope. Use your own names, art and audio, which you want anyway: a reskin of somebody else's game is less interesting than a new one that works the same way.

THE ANGLE — this is the important constraint, honour it above everything else
One level, done properly. A single space, built to a finish quality you could not sustain across twenty. Every prop and every sightline is deliberate.
This is what makes the project finishable. If a decision would push the scope back towards the original's, take the smaller option every time.

THE THEME
A medieval kingdom at war. Castles, levies and oaths. Siege logistics and feudal politics matter as much as the sword arm.
The theme is not a coat of paint. Let it change what the mechanics mean — a reload, a health pack and a locked door should all be things that make sense in this world and nowhere else.

LOOK
CRT arcade with scanlines. Post-process pass with scanlines, barrel distortion, phosphor bloom and slight chromatic aberration at the edges. Keep it subtle enough to read text through.

REQUIREMENTS
- Runs in a browser with no build step. Canvas 2D unless the angle genuinely requires 3D, in which case three.js.
- Fixed-timestep update loop with interpolated rendering, so it behaves the same at 60Hz and 144Hz.
- Every tuning constant in one CONFIG object at the top, exposed as live sliders in a debug panel. You will find the feel by dragging those, not by prompting.
- All content — levels, entities, balance numbers — in JSON or plain data files, never inline in the logic.
- Audio generated with the Web Audio API rather than asset files.
- Respect prefers-reduced-motion: keep the fades, drop the shake and the parallax.

BUILD ORDER
1. The core loop with placeholder rectangles, at the reduced scope the angle demands. No theme, no art, no audio. Make it fun as rectangles first.
2. The angle's consequences. Cutting to bots, or to turn-based, or to one level changes the design rather than just shrinking it — find out how and rewrite step 1.
3. The theme, as content and data.
4. The look, applied last as a rendering layer over a game that already works.

Start by writing a one-page plan: the core loop, what the angle removes and what that frees you to do properly, and what you are deliberately leaving out. Wait for me to approve it before writing code.
Prior art — read before you build

Half the time one of these already does what you wanted, and the other half it saves you a week of solving a problem someone documented in 1997.

Did you build it?
0Share on X

One count per game. No account — it is tied to a salted hash of your IP, which is not stored in a form anyone can reverse. Every build adds 1 team-years to the counter on the homepage.

Questions

How hard is Battleship to rebuild with an AI agent?

Yes — every game is buildable at some scope. The question is how hard, and Battleship is EASY (1 of 5). You will get essentially the whole thing. Nothing here is hard — two grids, a placement phase, and hit-or-miss — so the whole game rests on the opponent, and a bot that fires at random is unplayable while a bot that hunts properly is thirty lines of probability. Reckon on an evening to something you can actually play — not to something that matches the 1 team-years Milton Bradley spent.

What makes Battleship hard to rebuild?

Nothing here is hard — two grids, a placement phase, and hit-or-miss — so the whole game rests on the opponent, and a bot that fires at random is unplayable while a bot that hunts properly is thirty lines of probability. That is why it sits at EASY rather than a tier either side of it. If you want the idea without the project, the transferable part is show the opponent's reasoning as a heatmap you can turn on — an evening of work.

How long does it take to build a Battleship clone?

Wrong question, and it is worth saying why. Nobody rebuilds Battleship — the original took Milton Bradley on the order of 1 team-years, released in 1967 on Classic. What you can do is reach something playable and genuinely yours in about an evening, and then keep going for as long as it stays interesting. Any figure that claims otherwise is measuring a prototype and calling it a game.

What do I lose by building my own Battleship?

The bluffing, because there is none — the original has no hidden information you can act on beyond where you guessed already. Online play against a stranger, which needs a server and a way to stop them reading your board. The physical satisfaction of the pegs, which is most of what people actually remember. Those are the parts a prompt will not hand you.

Which AI coding agent should I use to build it?

Any of Claude Code, Codex or Cursor will handle this prompt. Paste it as your first message, let the agent scaffold the project, then iterate on feel — the second, third and tenth prompts are where a game actually gets good. Work in an empty folder or a fresh git branch so you can throw it away cheaply.

Get the next game

One email when new games go on the list. No other reason to email you, ever.