Steering a path you cannot steer
Anthill is a puzzle about shortest paths. An ant sits at its nest and wants to reach a crumb on the other side of the grid. It always takes the shortest route, and you cannot tell it otherwise. The only thing you can do is drop pebbles onto the grid, which the ant walks around. Your goal is to make the shortest route exactly a certain length, not too short and not too long. This article covers how the puzzle works, the controls, the rules about pebble placement, and the thinking that turns a grid of squares into a solved board.

How the puzzle works
The grid shows a nest and a crumb, dropped on two random open squares rather than in fixed corners, along with a scatter of fixed rocks that were there before you arrived. The ant moves from square to square, one step at a time, and it can only go up, down, left, or right. It cannot move diagonally. It always takes the shortest route from the nest to the crumb, and the game draws one such route on the grid as a pale trail.
Your job is to drop pebbles onto empty squares. The ant cannot step on a pebble, so it has to walk around them. Each pebble you place might change the shortest route, making it longer. The scoreboard shows the current route length, and the puzzle gives you a target length. When the shortest route is exactly the target length, you have won.
Placing and removing pebbles
Tap any open square to drop a pebble on it. Tap a pebble to pick it back up. You can place and remove pebbles as many times as you like. The route redraws itself after every change, so you always see the effect of what you just did.
There is one restriction. The game will not let you place a pebble that would seal the crumb off entirely. An ant with no route at all has not been sent the long way round; it has been trapped, and that is not the puzzle. Any placement that would leave no path from the nest to the crumb is simply refused.
Controls and difficulty levels
The Ground dropdown offers three sizes: Small, Medium, and Large. A small grid has fewer squares and fewer pebbles to work with, so the puzzle tends to be more direct. A large grid has more room, which means more possible pebble positions and a longer target route. The puzzles on larger grids require more careful thinking about where the bottlenecks are.
A New game button generates a fresh puzzle at any time. You do not have to use all the pebbles available. If the route hits the target length with pebbles left over, you have still won. The pebble count is a limit, not a requirement.
Find the bottleneck
The most important skill in Anthill is learning to read the trail and find the bottleneck. A bottleneck is a square that every shortest route must pass through. If the trail has to go through a narrow gap between two obstacles, every pebble you place near that gap changes the route. A pebble placed far from the trail, where the ant has plenty of room to go around, achieves nothing.
Look at the trail carefully after each pebble. Ask yourself: is there a square where the trail is squeezed into a one-square-wide corridor? That is where your next pebble matters. Placing it right at that narrow point forces the ant into a longer detour. Placing it in the middle of an open field does not change the route at all.
Detours usually add two, not one
When an obstacle forces the ant to step sideways, it costs a step out and a step back. That means most detours add two to the route length, not one. This is because the ant moves on a grid without diagonals. Going one square to the left and then one square to the right to get past a pebble costs two extra steps compared to walking straight through.
This has a practical consequence. If you need to add three to the route length, you cannot always do it with one pebble. One pebble in a tight spot might add two, and then you need another arrangement to add the remaining one. Understanding that lengths tend to move in even jumps helps you plan which pebbles to place and where to put them. Odd increases are possible but they usually require a pebble at a corner or near an edge where the geometry is different from the open grid.
The trail moves as you place
A common trap is to find a good bottleneck, place a pebble there, and then keep looking at the same spot. But the trail has moved. Blocking one route makes a different route the shortest, and the squares worth blocking change with it. You need to re-read the trail after every pebble.
Sometimes a pebble that helped earlier becomes useless after a later pebble changes the trail completely. When that happens, pick the first one up and try it somewhere else. Since you can remove pebbles freely, there is no penalty for moving them around as the picture changes.
Where the target length comes from
Each puzzle is generated by placing pebbles at random on the grid, making sure none of them cuts the crumb off entirely. The game then measures the shortest route that results, and that length becomes the target. This means the target is always a length the board can actually produce. The board is also checked to make sure the target is meaningfully longer than the open-grid distance, since a target only one step above the minimum would be no puzzle at all.
The shortest route is found by breadth-first search, which checks every possible path starting from the nest and expanding outward one step at a time. This is why the word shortest is exact, not approximate. Every route of a given length is found before any longer route is considered.
Common mistakes and how to fix them
A few patterns come up often when people are learning the game, and each one has a straightforward fix.
- Placing pebbles far from the trail. Only pebbles on or very near the current shortest path can change the route length. A pebble in an empty corner does nothing.
- Trying to make the route as long as possible. The target is an exact number. Going over is just as wrong as falling short, so do not pile pebbles on blindly.
- Forgetting you can pick pebbles back up. A pebble that helped when the trail ran one way might be useless now. Move it to where the new trail is squeezed.
- Placing a single pebble in a wide-open area and expecting it to help. The ant needs only one clear square to go around a lone pebble in open ground, and that barely changes the route.
- Not re-reading the trail after each change. The trail redraws every time, and the bottleneck shifts with it. What mattered a moment ago may not matter now.
Strategy for hitting the exact number
Start by looking at how far the current route length is from the target. If the gap is large, you need pebbles in places that force big detours. A pebble that blocks a narrow corridor between two walls can add four or six steps in one move. If the gap is small, be more careful and place pebbles that add only two steps each.
Work in stages. Close the gap by half, then re-read the trail. Close it by half again. As you get closer to the target, each pebble placement becomes more precise. If you overshoot, pick up the last pebble and try a position that adds less. Since placement and removal are free, this trial approach costs nothing.
Everything stays on your device
The puzzle runs entirely inside your browser. Nothing is uploaded, there is no account, and once the page has loaded it works offline. The route calculation, the pebble logic, and the puzzle generation all happen right here on your device. There is no limit on how many puzzles you play, and no registration or sign-up is needed.
No personal data is collected or stored. Your progress stays in this browser on this device only, and clearing your browser data is the only way to lose it.
