Seu tabuleiro
Inimigo
Free online Battleship
Battleship is the guessing duel in which you bombard a hidden sea one square at a time, trying to sink the enemy fleet before the computer sinks yours. In this version each side hides five ships on an 8×8 grid, and the game boils down to one skill: squeezing the most information out of every shot. Below you will find the exact rules of this version, how the computer picks its targets, and some arithmetic that turns guessing into a method.
History
Battleship began as a pencil-and-paper pastime: two players drew a pair of grids, hid their ships and called out coordinates. Accounts suggest something similar was already played before the First World War, and printed pads appeared in the early decades of the twentieth century. The version most people remember arrived in 1967, when Milton Bradley released the plastic box with peg boards, a 10×10 grid and five ships of 5, 4, 3, 3 and 2 squares. The game is sold under other names around the world, including Hundir la flota in Spain.
How to play
Every game starts with both fleets already placed at random, so you never position your own ships. On the enemy board (the one on the right on a desktop, the lower one on a phone) click or tap a square to fire. It turns red if a ship was there and blue if it was open water. If that was a ship's last square, the message above the boards announces the sinking and names the ship, and the ship's squares get a light outline. The computer then fires at your board, where your fleet is already marked and its shots appear red (hit) or a lighter blue (miss). When it sinks one of your ships, the message names that one too.
Turns alternate strictly, one shot each, and a hit does not earn another shot. You always fire first. The two counters above the boards show each side's hits, and the first to reach 14, the number of squares a fleet occupies, wins. The new-game button reshuffles everything at any moment.
Rules
- An 8×8 grid for each side, 64 squares in all.
- Each fleet has five ships, for 14 squares in total: battleship (4), cruiser (3), submarine (3), destroyer (2) and patrol boat (2).
- Ships lie horizontally or vertically and cannot overlap, but they may touch each other.
- Both fleets are placed at random at the start of every game. There is no manual placement phase.
- One shot per turn, with no bonus shot for a hit. You always fire first.
- The game announces every sinking, yours or the computer's, by naming the ship, and outlines the sunk ship's squares.
- First to 14 hits wins. A draw is impossible, and nothing is saved between games.
Strategies
- Hunt on a checkerboard, starting in the middle. Within one colour, favour the central squares: more ship placements pass through them.
- When you hit, find the axis. Probe the four neighbours until a second hit shows the direction, then extend both ways until water closes each end.
- Finish a ship before going back to the hunt. An abandoned hit costs extra shots later, when you have to return to it.
- Let the water do the arithmetic. If misses wall off a gap shorter than four squares in a row, the 4-square ship cannot be hiding there. Once the battleship is announced as sunk, the 4 drops out of the count.
- Recount the fleet late in the game. The sinking announcements show what has already left it; when only a few hits remain to be found, search only the gaps where the missing ship still fits.
Sunk! What the announcement tells you
As on a physical set, when you hit a ship's last square the game tells you which one went down (“Sunk! You sank the CPU's cruiser.”). It only says that a ship fell, not where the others are, so deduction stays the heart of the game. A few readings that hold up:
- No ship is 1 square long. Every hit needs at least one neighbour that is also ship. If three sides of a hit are already water, the fourth side is a ship for certain.
- Long lines deceive. Because ships may touch, five hits in a row can hide a 3-square ship plus a 2-square one. The sinking message helps separate them: once the submarine is announced, you can take its squares out of the line.
- Names are sizes. The battleship is 4 squares, the cruiser and the submarine 3, the destroyer and the patrol boat 2. Each announcement removes one ship from the count: after the battleship, the biggest left is 3 squares.
- Use the counter: with 9 hits on the board, exactly 5 ship squares are still hidden somewhere.
How the computer shoots
The computer has two modes, and knowing them explains why it can be beaten.
In a simulation of 20,000 games of its exact logic, it needed about 47 shots on average to land all 14 hits, with most games between 36 and 57. A player who sweeps a checkerboard and follows a line after a hit needs about 37. Roughly ten shots fewer, and since you also shoot first, that is the size of your edge.
- Hunting. Until it hits something, it picks any square not yet fired on, every square equally likely. It uses no checkerboard pattern and ignores ship sizes.
- Chasing. After a hit it queues the four neighbouring squares (below, above, right, left, in that order) and fires at them one by one. Each new hit adds its own neighbours to the back of the queue.
- It ignores the sinking announcement, so it keeps firing at queued neighbours even around a finished ship. Those shots are wasted.
- It does not follow the direction of a ship either: it checks all four sides of the first hit before it extends along a line.
The arithmetic of an 8×8 grid
Two facts turn a hunch into a method.
- The checkerboard covers everything. Colour the grid like a chessboard and fire only at one colour: 32 squares. Every ship, 2 squares or longer, occupies adjacent squares, and adjacent squares always have different colours. No ship can slip through that sweep.
- The middle is likelier. Counting every possible placement of the fleet, a central square can be covered by 28 different ship positions and a corner square by only 10. The 4-square ship alone has 8 positions that cover a central square and 2 that cover a corner.
- Once the announcements have named both 2-square ships (the destroyer and the patrol boat), the smallest ship left is 3 squares long. You can then widen the sweep to one square in three along the diagonals and still touch every remaining ship.
How much does method matter?
The same simulations put numbers on it. A player who fires completely at random beats this computer in only about 5% of games. A player who uses the checkerboard sweep and follows lines after a hit wins close to 85%.
Shooting first helps, but only a little: between two identical players, the one who fires first wins about 52% of the time. Method beats the first shot by a wide margin.
Tips for beginners
- Start in the centre and open outward on alternating squares.
- After a hit, do not theorise: test the four neighbours.
- Watch the hit counter and the sinking announcements to know what is left of the enemy fleet.
- Every miss is information. Note which lines it closes.
- If you lose, check your own board: it shows how many shots the computer threw away.
Trivia
- The boxed game uses a 10×10 grid and a 17-square fleet (ships of 5, 4, 3, 3 and 2). This version shrinks that to 8×8 and 14 squares, which makes games noticeably shorter.
- A well-known variant called salvo gives each player as many shots per turn as they have ships still afloat. It is not the rule here.
- Like the boxed edition, this version gives its ships names, by size: battleship (4), cruiser and submarine (3), destroyer and patrol boat (2). There is no 5-square carrier, and the names are what the game uses to announce a sinking.
- Hunting hidden targets with partial information is a classic programming exercise. The checkerboard sweep and per-square probability counting described above are ideas that game-playing programs use.
Mobile version
On a phone the two boards stack, yours on top and the enemy's below, and each square is a button sized for a thumb. There are no letters or numbers to memorise: you tap the square you want to hit. You may need to scroll down to the enemy board before firing. The sinking message sits above the boards; if it scrolls out of view, the squares of a sunk ship also get a light outline on the board itself.
Frequently asked questions
How do I sink a ship?
Hit every square it occupies. After the first hit, test the neighbouring squares (above, below, left and right) until you find the direction, then follow the line both ways until you reach water at each end.
Does the game tell me when a ship is sunk?
Yes. When you hit a ship's last square, the game announces the sinking and names the ship (battleship, cruiser, submarine, destroyer or patrol boat); the same happens when the computer sinks one of yours. The squares of a sunk ship get a light outline, and 14 hits in total win the game.
Can I choose where my ships go?
Not in this version. Both fleets are placed at random when the game starts. Ships never overlap, but they may touch. All the strategy is in how you attack.
Does shooting first give an advantage?
You always fire first, and a hit gives no extra shot. The edge is small: in simulations between two players using the same method, the first to fire wins about 52% of games.
What is the best search strategy?
Fire at alternating squares, like a chessboard, starting in the centre. When you hit, find the direction and finish that ship before returning to the sweep.
How does the computer decide where to shoot?
With no clue it picks any untouched square at random. After a hit it attacks the four neighbours in turn, and it keeps doing so even after the ship has gone down because it ignores the sinking announcement.
Can the computer see my ships?
No. It never reads the position of your fleet. It only picks squares it has not fired on and, after a hit, explores the neighbouring squares.
Do I need to install anything or create an account?
No. Battleship runs straight in your browser, free and with no sign-up.